04.05.2011, 21:12
(
Последний раз редактировалось BigETI; 04.05.2011 в 23:01.
)
Oh now I got it:
pawn Код:
OnPlayerSpawn(playerid)
{
//Add this after all of your spawn infos
if(InAfkZone[playerid]==1)
{
new pname[MAX_PLAYER_NAME], msg[128];
GetPlayerName(playerid, pname, sizeof(pname));
switch(random(...)) //Add inside the 'random' the max amount of spawns (if you have 4 spawns so write '4' there)
{
case 0: SetPlayerPos(...); //Add here the data of the first spawn
case 1: SetPlayerPos(...); //Same as I mentioned above.
....//And so on... Example: If you have 4 spawns so you have to write the cases 0-3 since randoms min choose amount is 0 and not 1
}
format(msg, sizeof(msg), "%s(%d) has been respawned in DM Zone.", pname, playerid);
SendClientMessageToAll(0xFF6600FF, msg);
}
}