18.07.2012, 21:27
Tente acrescentar isso.
Topo do GM
Adicione essa public
Adapte isso no seu OnPlayerSpawn
Topo do GM
pawn Код:
forward SetPlayerRandomSpawn(playerid);
new iSpawnSet[MAX_PLAYERS];
new Float:RandomSpawn[][6] =
{
{-973.6733,1061.2589,1345.6721,85.6553},
{-1027.8649,1081.1333,1343.2194,282.9058},
{-1025.7057,1082.3707,1343.3472,67.0405},
{-1039.5646,1085.4370,1343.3317,154.3409},
{-1062.0338,1070.1962,1343.4124,121.8743},
{-1069.0345,1092.3414,1343.1663,116.1298}
};
new iSpawnedCar[MAX]=-1;
new OnSkyDiving[MAX];
new Float:gRandomPlayerSpawns[28][3] = {
{1958.3783,1343.1572,15.3746},
{2199.6531,1393.3678,10.8203},
{2483.5977,1222.0825,10.8203},
{2637.2712,1129.2743,11.1797},
{2000.0106,1521.1111,17.0625},
{2024.8190,1917.9425,12.3386},
{2261.9048,2035.9547,10.8203},
{2262.0986,2398.6572,10.8203},
{2244.2566,2523.7280,10.8203},
{2335.3228,2786.4478,10.8203},
{2150.0186,2734.2297,11.1763},
{2158.0811,2797.5488,10.8203},
{1969.8301,2722.8564,10.8203},
{1652.0555,2709.4072,10.8265},
{1564.0052,2756.9463,10.8203},
{1271.5452,2554.0227,10.8203},
{1441.5894,2567.9099,10.8203},
{1480.6473,2213.5718,11.0234},
{1400.5906,2225.6960,11.0234},
{1598.8419,2221.5676,11.0625},
{1318.7759,1251.3580,10.8203},
{1558.0731,1007.8292,10.8125},
{-857.0551,1536.6832,22.5870},
{817.3494,856.5039,12.7891},
{116.9315,1110.1823,13.6094},
{-18.8529,1176.0159,19.5634},
{-315.0575,1774.0636,43.6406},
{1705.2347,1025.6808,10.8203}
};
pawn Код:
public SetPlayerRandomSpawn(playerid)
{
if (iSpawnSet[playerid] == 1) {
new rand = random(sizeof(gCopPlayerSpawns));
SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]);
SetPlayerFacingAngle(playerid, 270.0);
}
else if (iSpawnSet[playerid] == 0) {
new rand = random(sizeof(gRandomPlayerSpawns));
SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]);
}
return 1;
}
pawn Код:
//OnPlayerSpawn
SetPlayerRandomSpawn(playerid);