30.11.2011, 16:26
pawn Код:
#include <a_samp>
new Float:RandomSpawnStreetRacers[][] =
{
// Positions, (X, Y, Z and Facing Angle)
{-2796.9854, 1224.8180, 20.5429, 192.0335},
{-2454.2170, 503.8759, 30.0790, 267.2932},
{-2669.7322, -6.0874, 6.1328, 89.8853}
};
public OnGameModeInit()
{
// Normal the AddPlayerClass here
AddPlayerClass(105, 2497.2693, -1676.9578, 13.3398, 23.6501, 0, 0, 0, 0, 0, 0);
AddPlayerClass(106, 1048.4546, 1928.2059, 10.8203, 261.0777, 0, 0, 0, 0, 0, 0);
AddPlayerClass(107, 2497.2693, -1676.9578, 13.3398, 23.6501, 0, 0, 0, 0, 0, 0);
AddPlayerClass(115, 2497.2693, -1676.9578, 13.3398, 23.6501, 0, 0, 0, 0, 0, 0);
AddPlayerClass(108, 2497.2693, -1676.9578, 13.3398, 23.6501, 0, 0, 0, 0, 0, 0);
return 1;
}
// It should be on OnPlayerSpawn
public OnPlayerSpawn(playerid)
{
new Random = random(sizeof(RandomSpawnStreetRacers));
SetPlayerPos(playerid, RandomSpawnStreetRacers[Random][0], RandomSpawnStreetRacers[Random][1], RandomSpawnStreetRacers[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawnStreetRacers[Random][3]);
return 1;
}