Something wrong with this code??
#1

public OnPlayerRequestClass(playerid)
{
SetTimer("SpawnLastSaved",100,false);
return 1;
}
forward SpawnLastSaved(playerid);
public SpawnLastSaved(playerid)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), ARS_SERVERFILES, name);
SetPlayerPos(playerid, dini_Float(file, "LocX"),dini_Float(file,"LocY"),dini_Float(file,"L ocZ"));
SetPlayerFacingAngle(playerid,dini_Float(file,"Loc A"));
SetPlayerInterior(playerid,dini_Int(file,"LocI"));
SpawnPlayer(playerid);
return 1;
}

My problem is when i login im the only person well i spawned where i last was well if someone else joins it respawns me again
Reply
#2

You need to use SetTimerEx and pass playerid as a parameter for individual players
pawn Код:
SetTimerEx("SpawnLastSaved", 1000, false, "i", playerid);
Also enclose your code in the forums in [pawn][/ pawn] tags (without a space) check bbcode usage on ****** if you don't get me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)