26.03.2015, 09:24
When setting his pLS, pSF or pLV to 1, you should reset the others.
Right now what you're doing is:
*Player selects LS*
pLS = 1
*Then afterwards the player selects SF*
pSF = 1
So both pLS and pSF would be set to 1, instead you should reset the others:
*Player selects LS*
pLS = 1
pSF = 0
pLV = 0
*Then afterwards the player selects SF*
pSF = 1
pLS = 0
pLV = 0
And your OnPlayerSpawn can only detect if his pLS is set to 1, not the others.
And it also seems wrong as well, i think you should do:
Right now what you're doing is:
*Player selects LS*
pLS = 1
*Then afterwards the player selects SF*
pSF = 1
So both pLS and pSF would be set to 1, instead you should reset the others:
*Player selects LS*
pLS = 1
pSF = 0
pLV = 0
*Then afterwards the player selects SF*
pSF = 1
pLS = 0
pLV = 0
And your OnPlayerSpawn can only detect if his pLS is set to 1, not the others.
And it also seems wrong as well, i think you should do:
pawn Код:
if(pData[playerid][pLS])
{
new Random = random(sizeof(RandomSpawnLS));
SetPlayerPos(playerid, RandomSpawnLS[Random][0], RandomSpawnLS[Random][1], RandomSpawnLS[Random][2]);
}