If player logged in
#1

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
Reply
#2

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
Reply
#3

I placed it in OnPlayerSpawn but there nothing happened
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)