need help with randomspawn
#2

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;
}
Reply


Messages In This Thread
need help with randomspawn - by niels44 - 30.11.2011, 16:17
Re: need help with randomspawn - by Kostas' - 30.11.2011, 16:26
Re: need help with randomspawn - by niels44 - 01.12.2011, 12:43
Re: need help with randomspawn - by Kostas' - 01.12.2011, 12:51
Re: need help with randomspawn - by niels44 - 01.12.2011, 13:21
Re: need help with randomspawn - by niels44 - 01.12.2011, 14:19
Re: need help with randomspawn - by Kostas' - 01.12.2011, 14:20
Re: need help with randomspawn - by niels44 - 01.12.2011, 17:13
Re: need help with randomspawn - by niels44 - 01.12.2011, 17:30
Re: need help with randomspawn - by niels44 - 01.12.2011, 17:54

Forum Jump:


Users browsing this thread: 4 Guest(s)