04.11.2014, 21:41
I wanna fix the spawn like when someone spawning if he got pNacija =1 to spawn in different place if he got an pNacija = 2 to spawn in another place, im trying to figure out this:
Here its how it look before:
And here its what im trying to do:
Here its how it look before:
pawn Код:
// Spawning
if(PlayerInfo[playerid][pX] == 0 && PlayerInfo[playerid][pY] == 0 && PlayerInfo[playerid][pZ] == 0)
{
SetPlayerPos(playerid, 958.9146,-1411.4772,13.3833); // THE SPAWN D
SetPlayerFacingAngle(playerid, 93.3274);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
else
{
SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVW]);
SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
SetCameraBehindPlayer(playerid);
SetPlayerPos(playerid, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ]);
// HP and Armor
if(PlayerInfo[playerid][pHealth] <= 0) PlayerInfo[playerid][pHealth] = 1;
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
}
pawn Код:
// Spawning
if(PlayerInfo[playerid][pX] == 0 && PlayerInfo[playerid][pY] == 0 && PlayerInfo[playerid][pZ] == 0 && SpawnPlayer(playerid))
{
else if(PlayerInfo[playerid][pNacija] = 1)
{
SetSpawnInfo( playerid, 0, 101, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
}
else if(PlayerInfo[playerid][pNacija] = 1)
}
SetSpawnInfo( playerid, 0, 102, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
}
else
{
SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVW]);
SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
SetCameraBehindPlayer(playerid);
SetPlayerPos(playerid, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ]);
// HP and Armor
if(PlayerInfo[playerid][pHealth] <= 0) PlayerInfo[playerid][pHealth] = 1;
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
}
}