29.01.2010, 08:42
when i did make a script ( succesfully ) 1 of my releases ( the only 1 lolz ) i thought first to use the OnPlayerConnect function...but it didnt work
i had this at the top of the script :
however it succesfully compiled and everything but this i did:
i didnt have any errors but when i tested it i locked the server reconnected it sayed : "Sorry. Server is locked. Try Later."
but it didnt kick me
should i use return 0;
?
becouse it might say the script not to execute or what?
i had this at the top of the script :
pawn Код:
enum SERVER_LOCKED {
Locked
}
new ServerCfg[SERVER_LOCKED];
pawn Код:
OnPlayerConnect(playerid)
{
if (ServerCfg[SERVER_LOCKED] = 1)
{
SendClientMessage(playerid,red,"Sorry. Server is locked. Try later.");
kick(playerid);
}
return 1;
}
but it didnt kick me
should i use return 0;
?
becouse it might say the script not to execute or what?