28.07.2016, 02:11
Hi guys.
Whenever someone in my server spawns for like a second, they are spawned at the "AddPlayerClass" x,y,z position. However after that they spawn at their previous position. I was just wondering if there is a way to be able to not spawn at the "AddPlayerClass" position and just straight away go to the previous position. Here is my AddPlayerClass code, and OnPlayerSpawn code.
Any idea's would be greatly appreciated. Thanks for your time.
Whenever someone in my server spawns for like a second, they are spawned at the "AddPlayerClass" x,y,z position. However after that they spawn at their previous position. I was just wondering if there is a way to be able to not spawn at the "AddPlayerClass" position and just straight away go to the previous position. Here is my AddPlayerClass code, and OnPlayerSpawn code.
PHP код:
for(new i = 1; i != 311; i++) AddPlayerClass(i, -1968.9745,137.8568,27.6875,88.8534, 0, 0, 0, 0, 0, 0); // This is under ongamemodeinit
PHP код:
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid,0);
SetPlayerColor(playerid,COLOR_PLAYER);
TextDrawShowForPlayer(playerid,txtTimeDisp);
TextDrawShowForPlayer(playerid, urlText);
TextDrawShowForPlayer(playerid, JoinText);
SetPlayerPos(playerid, PlayerInfo[playerid][pXPos], PlayerInfo[playerid][pYPos], PlayerInfo[playerid][pZPos]);
SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pAPos]); //Sets the player position to his last position
for(new i=0; i<MAX_PLAYERS; i++){TextDrawShowForPlayer(i, Zones[i]);}
return 1;
}