Random spawn need help
#2

pawn Код:
#include <a_samp> // SA-MP includes all (or most) of those includes automatically now.
//#include <core>
//#include <float>
//#include <a_players>


new Float:RandomSpawn[6][4] = {
{297.0665,-1149.0099,85.1389,146.4700},
{293.2118,-1138.4779,85.1250,205.0405},
{299.8486,-1154.1123,81.3728,171.4901},
{325.2620,-1143.8159,81.5934,223.8173},
{316.0294,-1139.3528,81.5934,309.0682},
{311.2324,-1121.3932,80.9141,136.7566}
};

public OnGameModeInit()
{
    SetGameModeText("0.3b R2");
    AddPlayerClass(115,2048.9133,-2448.0999,17.8742,268.2145,0,0,0,0,0,0);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    new rand = random(sizeof(RandomSpawn));
    SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
    SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
    return 1;
}
Try that, and try refrain from using '#pragma tabsize' unless it's completely necessary. (my compiler disregarded the errors and failed to spit any out when I compiled your code so I'm unsure if this is error-free)
Reply


Messages In This Thread
Random spawn need help - by nicoud - 03.10.2010, 02:34
Re: Random spawn need help - by Calgon - 03.10.2010, 06:27
Re: Random spawn need help - by nicoud - 03.10.2010, 13:50

Forum Jump:


Users browsing this thread: 1 Guest(s)