SA-MP Forums Archive
Question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question (/showthread.php?tid=520854)



Question - ShoortyFl - 20.06.2014

Can i do something that will check if player is logged, because now i can use commands before i log-in.
Is there anythig that will automatically check that if player for example

LoggedOn[playerid] == 0; if player is not logged in he can't use the command.


Re : Question - MCZOFT - 20.06.2014

PHP код:
OnPlayerRequestSpawn(playerid)
{
  {
  if(
IsPlayerLoggedIn[playerid] == 0);
 
   
//Then add your Stuff you want to check here ..
     
}
    return 
0;
  }
  return 
1;




Re: Question - ShoortyFl - 20.06.2014

I know that, i want to create something that will prevent players from using commands like /kick /ban or even normal messages before login.


Re: Question - RenovanZ - 20.06.2014

pawn Код:
CMD:whatever(playerid, params[])
{
    if(LoggedOn[playerid == 0) return SendClientMessage(playerid, -1, "You are not logged in!");
    //do something
}