01.09.2012, 07:25
Код:
forward SetPlayerRandomCopSpawn(playerid); // Forwarding the function public SetPlayerRandomCopSpawn(playerid) // Setting it up { new rand = random(sizeof(attackerSpawns)); // Making it select random options instead of a definite one SetPlayerPos(playerid, attackerSpawns[rand][0], attackerSpawns[rand][1], attackerSpawns[rand][2], attackerSpawns[rand][3], attackerSpawns[rand][4], attackerSpawns[rand][5]); return 1; } forward SetPlayerRandomCriminalSpawn(playerid); public SetPlayerRandomCriminalSpawn(playerid) { new rand = random(sizeof(defenderSpawns)); SetPlayerPos(playerid, defenderSpawns[rand][0], defenderSpawns[rand][1], defenderSpawns[rand][2], defenderSpawns[rand][3], defenderSpawns[rand][4], defenderSpawns[rand][5]); return 1; }
EDIT: was told to put this out of all callbacks, I really don't know where, any help? D: