If player logged in - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: If player logged in (
/showthread.php?tid=276831)
If player logged in -
Deviant96 - 15.08.2011
How to make a script like, if player logged in the script will set world id to 0 and set player position to 0.0,0.0,0.0
Re: If player logged in -
[MG]Dimi - 15.08.2011
PHP код:
new LoggedIn[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
if(LoggedIn[playerid] == 1)
{
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,0.0,0.0,0.0);
return 1;
}
return 1;
}
Now you should make account system and replace mine LoggedIn with your's account login variable
Re: If player logged in -
Deviant96 - 15.08.2011
I placed it in OnPlayerSpawn but there nothing happened
Re: If player logged in -
grand.Theft.Otto - 15.08.2011
Why would you want it to only happen for only logged in players? Why not everyone .. ?
And are you sure you don't already have a PlayerLoggedIn or something similar in your script? That might be why its not working, search for " logged " in your script and tell us if you have a different variable.