if not registered could not spawn. - 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: if not registered could not spawn. (
/showthread.php?tid=450029)
if not registered could not spawn. -
Champ - 11.07.2013
I know how to make this. But i have some problem.
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(!GetPVarInt(playerid, "Logged", 0))
{
SendClientMessage(playerid,COLOR_GREEN,"You need to /register.");
return 0;
}
return 1;
}
correct this. Thank You.
Re: if not registered could not spawn. -
exclide1 - 11.07.2013
Код:
if(GetPVarInt(playerid, "Logged") == 0) return SendClientMessage(playerid,COLOR_GREEN,"You need to /register.");
Re: if not registered could not spawn. -
Konstantinos - 11.07.2013
Quote:
Originally Posted by exclide1
Код:
if(GetPVarInt(playerid, "Logged") == 0) return SendClientMessage(playerid,COLOR_GREEN,"You need to /register.");

|
that will return 1 and spawn the player. You
must return 0 to prevent this from happen; however, the check was correct.
Re: if not registered could not spawn. -
Champ - 11.07.2013
didn't worked perfectly...
Re: if not registered could not spawn. -
exclide1 - 11.07.2013
Quote:
Originally Posted by Champ
didn't worked perfectly...
|
Код:
public OnPlayerRequestSpawn(playerid)
{
if(GetPVarInt(playerid, "Logged") == 0)
{
SendClientMessage(playerid,COLOR_GREEN,"You need to /register.");
return 0;
}
return 1;
}