OnPlayerConnect Problem ( 0.3a )
#1

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 :
pawn Код:
enum SERVER_LOCKED {
    Locked
}

new ServerCfg[SERVER_LOCKED];
however it succesfully compiled and everything but this i did:

pawn Код:
OnPlayerConnect(playerid)
{
  if (ServerCfg[SERVER_LOCKED] = 1)
{
  SendClientMessage(playerid,red,"Sorry. Server is locked. Try later.");
  kick(playerid);
}
  return 1;
}
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?
Reply


Messages In This Thread
OnPlayerConnect Problem ( 0.3a ) - by Micko9 - 29.01.2010, 08:42
Re: OnPlayerConnect Problem ( 0.3a ) - by cmg4life - 29.01.2010, 08:47
Re: OnPlayerConnect Problem ( 0.3a ) - by ғαιιοцт - 29.01.2010, 08:48
Re: OnPlayerConnect Problem ( 0.3a ) - by Micko9 - 29.01.2010, 09:06
Re: OnPlayerConnect Problem ( 0.3a ) - by cmg4life - 29.01.2010, 09:08

Forum Jump:


Users browsing this thread: 5 Guest(s)