06.12.2012, 15:57
Код:
public OnPlayerSpawn(playerid) { if(DM[playerid] == true) { new rand = random(sizeof(RandomSpawnDM)); SetPlayerPos(playerid, RandomSpawnDM[rand][0], RandomSpawnDM[rand][1],RandomSpawnDM[rand][2]); ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 24, 20000); GivePlayerWeapon(playerid, 25, 20000); GivePlayerWeapon(playerid, 29, 20000); SetPlayerVirtualWorld(playerid, 2); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); } if(DM1[playerid] == true) { new rando = random(sizeof(RandomSpawnDM1)); SetPlayerPos(playerid, RandomSpawnDM1[rando][0], RandomSpawnDM1[rando][1],RandomSpawnDM1[rando][2]); ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 24, 20000); GivePlayerWeapon(playerid, 25, 20000); GivePlayerWeapon(playerid, 29, 20000); SetPlayerVirtualWorld(playerid, 2); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); } return 1; }
Код:
new Float:RandomSpawnDM1[][4] = { {3141.1995,-1470.5856,5.1300,231.2364}, {3145.8940,-1505.7411,5.1300,282.6237}, {3173.8682,-1507.9838,5.1300,97.4653} }; new Float:RandomSpawnDM[][4] = { {-1303.1121,2542.2937,93.3047,174.8515}, {-1318.7681,2540.9197,87.6752,172.9792}, {-1311.6586,2519.6934,87.2836,152.9255} };