17.04.2011, 20:06
Are you asking for something like this
And if you want him to spawn randomly every time he spawns, just leave it like this:
[pawn]
Are you asking for something like this

pawn Код:
OnPlayerDeath(playerid)
{
SetPVarInt(playerid, "ToSpawnAfterDeath", 1);
return 1;
}
OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid) == 1)
{
new rand=random(4)//you can change 4 for the number of positions you have
switch(rand)
{
case 0:SetPlayerPos(playerid, X, Y, Z); // WHERE X, Y and Z are the coordinates of the place where you want him to spawn so is a must change.ґ
case 1:SetPlayerPos(playerid, X, Y, Z); // WHERE X, Y and Z are the coordinates of the place where you want him to spawn so is a must change.
case 2:SetPlayerPos(playerid, X, Y, Z); // WHERE X, Y and Z are the coordinates of the place where you want him to spawn so is a must change.
case 3:SetPlayerPos(playerid, X, Y, Z); // WHERE X, Y and Z are the coordinates of the place where you want him to spawn so is a must change.
}
}
}
[pawn]
Are you asking for something like this

pawn Код:
OnPlayerDeath(playerid)
{
SetPVarInt(playerid, "ToSpawnAfterDeath", 1);
return 1;
}
OnPlayerSpawn(playerid)
{
new rand=random(4)//you can change 4 for the number of positions you have
switch(rand)
{
case 0:SetPlayerPos(playerid, X, Y, Z); // WHERE X, Y and Z are the coordinates of the place where you want him to spawn so is a must change.ґ
case 1:SetPlayerPos(playerid, X, Y, Z); // WHERE X, Y and Z are the coordinates of the place where you want him to spawn so is a must change.
case 2:SetPlayerPos(playerid, X, Y, Z); // WHERE X, Y and Z are the coordinates of the place where you want him to spawn so is a must change.
case 3:SetPlayerPos(playerid, X, Y, Z); // WHERE X, Y and Z are the coordinates of the place where you want him to spawn so is a must change.
}
}