17.12.2009, 21:33
(WOW
In my admin FS, I am trying to make it so if you don't login or register, it kicks you, but when I use the Kick(playerid); thing, it doesn't work
and the compiler says that it doesn't recognize the command.... heres what I have:
In my admin FS, I am trying to make it so if you don't login or register, it kicks you, but when I use the Kick(playerid); thing, it doesn't work
and the compiler says that it doesn't recognize the command.... heres what I have:
Код:
public OnPlayerSpawn(playerid) { if(!udb_Exists(PlayerName(playerid))) { SendClientMessage(playerid, COLOR_RED, "You have been kicked due to not registering! Please reconnect to the server and use"); SendClientMessage(playerid, COLOR_RED, "/register <password> to create an account."); Kick(playerid); // THIS IS WHATS MESSED UP AND WON'T COMPILE!!! return true; } if(udb_Exists(PlayerName(playerid))) { SendClientMessage(playerid, COLOR_RED, "You have been kicked due to not registering! Your account was created/ existed but"); SendClientMessage(playerid, COLOR_RED, "You failed to use /login <password> If this was a mistake, please reconnect to the"); SendClientMessage(playerid, COLOR_RED, "server and use /login <password> or if you have NEVER registered on this server, reconnect"); SendClientMessage(playerid, COLOR_RED, "To the sevrer with a different name and use /register <password>"); Kick(playerid); // THIS IS WHATS MESSED UP AND WON'T COMPILE!!! return true; } PlayerData[playerid][Logged] = 0; PlayerData[playerid][Muted] = 0; PlayerData[playerid][AdminLevel] = 0; PlayerData[playerid][Kicks] = 0; PlayerData[playerid][Bans] = 0; return true; }