01.11.2013, 15:07
First, do this
then OnPlayerSpawn
Hope it works for you
pawn Код:
COMMAND:exitdm(playerid,params[])
{
dmarena[playerid] =0;
SetPlayerHealth(playerid,0);
SpawnPlayer(playerid);
return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
if(dmarena[playerid] == 1)
{
new rand = random(sizeof(DMRandomSpawns));
SetPlayerPos(playerid, DMRandomSpawns[rand][0], DMRandomSpawns[rand][1], DMRandomSpawns[rand][2]);
SetPlayerSkin(playerid, 230);
else {
dmarena[playerid] =0;
SpawnPlayer(playerid);
}
}
return 1;
}