In deinem OnDialogResponse fehlen unten Klammern.
Schreibe das ganze public so:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
#if RconProtect == true
case DIALOG_RCON:
{
new
string[130]
;
if(!response)
{
format(string, sizeof(string), "** Player %s(ID:%d) has been automatically kicked by the Server (Attempting to logged in RCON)", pName(playerid), playerid);
SendClientMessageToAll(COLOR_GREY, string);
print(string);
#if LOG == true
SaveLog("rcon.txt", string);
#endif
return KickDelay(playerid);
}
if(response)
{
if(!strcmp(RconPass, inputtext) && !(!strlen(inputtext)))
{
format(string, sizeof(string), "** Player %s(ID:%d) has accessed the RCON Protection successfully!", pName(playerid), playerid);
SendAdmin(COLOR_GREY, string);
print(string);
#if LOG == true
SaveLog("rcon.txt", string);
#endif
_RCON[playerid] = true;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~g~Authorized ~w~Access!~n~~y~Welcome Administrator!", 3000, 3);
}
else
{
if(_RCONwarn[playerid] == MAX_RCON_WARNINGS+1)
{
format(string, sizeof(string), "** Player %s(ID:%d) has been kicked by the Server (Attempting to logged in RCON)", pName(playerid), playerid);
SendClientMessageToAll(COLOR_GREY, string);
print(string);
#if LOG == true
SaveLog("kicklog.txt", string);
#endif
KickDelay(playerid);
return 1;
}
_RCONwarn[playerid] ++;
format(string, sizeof(string), "You have been warned for incorrect 2nd RCON Password (Warnings: %i/%i)", _RCONwarn[playerid], MAX_RCON_WARNINGS);
SendClientMessage(playerid, COLOR_GREY, string);
SD(playerid, DIALOG_RCON, DP, ""green"2nd RCON Password", ""grey"The RCON password is protected by JakAdmin3\nPlease type the 2nd RCON Password to access the RCON.", "Access", "Kick");
}
}
}
case DIALOG_REGISTER:
{
new
string[128],
hashpass[129]
;
if(response)
{
if(!IsValidPassword(inputtext))
{
SD(playerid, DIALOG_REGISTER, DP, ""lightblue"JakAdmin3 - Register", ""grey"Welcome to the Server!\nYour account doesn't exist on our database, Please insert your password below.\n\nTIPS: Make the password long so no one can hack it.\nERROR: Invalid Password Symbols.", "Register", "Quit");
return 0;
}
if (strlen(inputtext) < 4 || strlen(inputtext) > 20)
{
SD(playerid, DIALOG_REGISTER, DP, ""lightblue"JakAdmin3 - Register", ""grey"Welcome to the Server!\nYour account doesn't exist on our database, Please insert your password below.\n\nTIPS: Make the password long so no one can hack it.\nERROR: Password length shouldn't go below 4 and shouldn't go higher 20.", "Register", "Quit");
return 0;
}
WP_Hash(hashpass, 129, inputtext);
SetPlayerScore(playerid, STARTING_SCORE);
GivePlayerMoney(playerid, STARTING_CASH);
//Time = Hours, Time2 = Minutes, Time3 = Seconds
new time, time2, time3;
gettime(time, time2, time3);
new date, date2, date3;
//Date = Month, Date2 = Day, Date3 = Year
getdate(date3, date, date2);
format(User[playerid][accountDate], 150, "%02d/%02d/%d %02d:%02d:%02d", date, date2, date3, time, time2, time3);
new
query[750+1000]
;
format(query, sizeof(query),
"INSERT INTO `users` (`username`, `IP`, `joindate`, `passwort`, `admin`, `kills`, `deaths`, `score`, `money`, `warn`, `mute`, `Prison`, `Prisonsec`, `hours`, `minutes`, `seconds`) VALUES ('%s','%s','%s','%s',0,0,0,%d,%d,0,0,0,0,0,0,0,0,0,0,'%s','%s')",\
DB_Escape(pName(playerid)),
DB_Escape(User[playerid][accountIP]),
DB_Escape(User[playerid][accountDate]),
DB_Escape(hashpass),
User[playerid][accountLevel],
User[playerid][accountGeld],
);
db_query(Database, query);
new
count,
DBResult: result
;
result = db_query(Database, "SELECT * FROM `users`");
count = db_num_rows(result);
db_free_result(result);
User[playerid][accountID] = count;
SendClientMessage(playerid, -1, "You have successfully registered from the database.");
format(string, sizeof(string), "You are now handling accountID %i from the JakAdmin3 system.", count);
SendClientMessage(playerid, COLOR_ORANGE, string);
SendClientMessage(playerid, COLOR_YELLOW, "Proceeding to the Security Question.");
SD(playerid, DIALOG_QUESTION, DI, ""lightblue"Security Question", ""grey"Welcome to JakAdmin3's security question, Where you'll setup your account's security question.\nYou can use the Security Question incase you forgot your password, you can rely on it 100 percent.\n\nPut your question below:", "Setup", "");
}
else
{
KickDelay(playerid);
}
}
case DIALOG_LOGIN:
{
new
hashp[129],
string[900]
;
if(response)
{
WP_Hash(hashp, 129, inputtext);
if(!strcmp(hashp, User[playerid][accountPasswort], false))
{
LoginPlayer(playerid);
}
else
{
User[playerid][WarnLog]++;
if(User[playerid][WarnLog] == 3)
{
SD(playerid, DIALOG_BEGIN, DM, ""lightblue"Kicked", ""grey"Du wurdest vom Server gekickt, du hast zu oft das falsche passwort eingegeben!\nVersuche es nochmal, Reconnect (Verlasse den Server und versuche es nochmal.)", "Verlassen", "");
KickDelay(playerid);
return 0;
}
format(string, sizeof(string), "Invalid password! - %d out of 3 Warning Log Tires.", User[playerid][WarnLog]);
SendClientMessage(playerid, COLOR_RED, string);
format(string, sizeof(string), ""grey"Welcome back to the server!\nYour account exists on our database, Please insert your account's password below.\n\nTIPS: If you do not own the account, Please /q and find another username.\nERROR: Wrong password (%d/3 Warnings Log)", User[playerid][WarnLog]);
SD(playerid, DIALOG_LOGIN, DP, ""lightblue"JakAdmin3 - Login", string, "Login", "Forget");
}
}
}
}
return 0;
}