26.01.2017, 11:39
How to give out better randon spawns? they should not spawn at the same spawn
OnPlayerSpawn
How to apply this?
http://forum.sa-mp.com/showpost.php?...3&postcount=13
Код:
enum SpawnLocation { Spawnname[256], Float:SpawnX, Float:SpawnY, Float:SpawnZ, Float:SpawnAngle } new const TruckerSpawn[][SpawnLocation] = { // Positions, (Spawnname, X, Y, Z and Facing Angle) //{"Tierra Robada",-1278.0699,2709.5935,50.2663,299.5070}, //{"Shady Creeks",-1561.4307,-2733.6567,48.7435,236.4525}, {"UNKOWN Spawn_Name", 2269.3945,-2343.9868,13.5469,314.4856} };
Код:
//regular code new rand = random(sizeof(TruckerSpawn)); SetPlayerPos(playerid, TruckerSpawn[rand][SpawnX], TruckerSpawn[rand][SpawnY], TruckerSpawn[rand][SpawnZ]); SetPlayerFacingAngle(playerid, TruckerSpawn[rand][SpawnAngle]); SetCameraBehindPlayer(playerid); // code added static last,current; while( last == current) { current = random(sizeof(TruckerSpawn)); } SendClientMessageToAll(-1, TruckerSpawn[current]); last = current;
http://forum.sa-mp.com/showpost.php?...3&postcount=13