stock SpawnEx(playerid) { new Float:Spw_[][] = { {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0} }; SetPlayerPos(playerid, Spw_[0][random(sizeof(Spw_))], Spw_[1][random(sizeof(Spw_))], Spw_[2][random(sizeof(Spw_))]); return true; }
Код:
stock SpawnEx(playerid) { new Float:Spw_[][] = { {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0} }; SetPlayerPos(playerid, Spw_[0][random(sizeof(Spw_))], Spw_[1][random(sizeof(Spw_))], Spw_[2][random(sizeof(Spw_))]); return true; } |
stock SpawnEx(playerid) { new Float:Spw_[][] = { {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0} }; SetPlayerPos(playerid, Spw_[random(sizeof(Spw_))][0], Spw_[random(sizeof(Spw_))][1], Spw_[random(sizeof(Spw_))][2]); return true; }
stock SpawnEx(playerid) { static const Float:Spw_[2][3] = { {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0} }; new rand = random(sizeof(Spw_)); SetPlayerPos(playerid, Spw_[rand][0], Spw_[rand][1], Spw_[rand][2]); return true; }
new Float:Spawns[][4] = {
{0,0,0}, }; em onplayerspawn new rand = random(sizeof(Spawns)); SetPlayerPos(playerid, Spawns[rand][0], Spawns[rand][1], Spawns[rand][2]); SetPlayerFacingAngle(playerid,Spawns[rand][3]); } |
new Float:SpawnA[][3] = { {Coordenada X,Coordenada Y, Coordenada Z}, {Coordenada X,Coordenada Y, Coordenada Z} }; public OPlayerSpawn(playerid) { new rand = random(sizeof(SpawnA)); SetPlayerPos(playerid, SpawnA[rand][0], SpawnA[rand][1], SpawnA[rand][2]); return 1; } |