15.03.2010, 16:38
Quote:
|
Originally Posted by laborgward
Quote:
pero no me funciona nose q le pasara ya explike q e s lo q susede |
por ejemplo si pones 15 cordenadas distintas pones
Код:
new randomSpawn = random(15);
Код:
case 0: SetPlayerPos(playerid, X, Y, Z);
case 1: SetPlayerPos(playerid, X, Y, Z);
case 2: SetPlayerPos(playerid, X, Y, Z);
case 3: SetPlayerPos(playerid, X, Y, Z);
case 4: SetPlayerPos(playerid, X, Y, Z);
case 5: SetPlayerPos(playerid, X, Y, Z);
case 6: SetPlayerPos(playerid, X, Y, Z);
case 7: SetPlayerPos(playerid, X, Y, Z);
case 8: SetPlayerPos(playerid, X, Y, Z);
case 9: SetPlayerPos(playerid, X, Y, Z);
case 10: SetPlayerPos(playerid, X, Y, Z);
case 11: SetPlayerPos(playerid, X, Y, Z);
case 12: SetPlayerPos(playerid, X, Y, Z);
case 13: SetPlayerPos(playerid, X, Y, Z);
case 14: SetPlayerPos(playerid, X, Y, Z);
Код:
public OnPlayerSpawn(playerid)
{
new randomspawn = random(15);
switch(randomspawn)
{
case 0: SetPlayerPos(playerid, X, Y, Z);
case 1: SetPlayerPos(playerid, X, Y, Z);
case 2: SetPlayerPos(playerid, X, Y, Z);
case 3: SetPlayerPos(playerid, X, Y, Z);
case 4: SetPlayerPos(playerid, X, Y, Z);
case 5: SetPlayerPos(playerid, X, Y, Z);
case 6: SetPlayerPos(playerid, X, Y, Z);
case 7: SetPlayerPos(playerid, X, Y, Z);
case 8: SetPlayerPos(playerid, X, Y, Z);
case 9: SetPlayerPos(playerid, X, Y, Z);
case 10: SetPlayerPos(playerid, X, Y, Z);
case 11: SetPlayerPos(playerid, X, Y, Z);
case 12: SetPlayerPos(playerid, X, Y, Z);
case 13: SetPlayerPos(playerid, X, Y, Z);
case 14: SetPlayerPos(playerid, X, Y, Z);
}
return 1;
}


