Spawn Bug
#6

Added instructions

pawn Код:
//Add This at top of script or at where you are making enums
enum RandSpawn
{
    Float:XPOS,
    Float:YPOS,
    Float:ZPOS,
    Float:Angle,
};
then

pawn Код:
//Add This at center of script
new Float:RandomPlayerSpawns[][RandSpawn] =
{
    {2451.5474,-2020.9169,13.5469,341.4067}, // Randomspawn lva
    {1606.9009,1826.6042,10.8203,347.5937}, // Randomspawn aa
    {1248.5216,251.1522,19.5547,32.4184}, // Randomspawn sfa
    {-2725.4590,-313.1409,7.1875,45.0576}, // randomspawn lsa
    {484.7791,-1464.4720,18.6131,301.9811}, // randomspawn lv
    {-1858.4734,-1650.4854,26.6446,124.1645}, // randomspawn sf
    {671.6703,-610.4697,16.3359,334.4921}, // randomspawn ls
    {1384.9999,-955.8557,34.3933,14.6513},
    {-2521.3293,1215.9065,37.4283,266.6969}, // randomspawn sf
    {2107.7537,1000.6898,11.0094,0.1267}, // randomspawn ls
    {2646.2292,2225.8186,10.8060,180.7247}, // randomspawn ls
    {1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
    {1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
    {1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
    {718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
    {722.3772, -1477.2856, 5.4688, 272.3814}, // Randomspawn
    {-2076.0566,1421.1305,7.1007,176.6188},
    {-2108.3713,903.5490,76.6209,353.5211},
    {1454.8717,2346.8708,10.8203,177.7089},
    {1055.0553,1401.2302,5.8203,357.6070},
    {1830.2111,-1604.7515,13.5469,121.5940},
    {2443.3550,-1644.4709,13.4693,175.4878}
};
new Float:PlayerPos[4];
then

pawn Код:
public OnPlayerSpawn(playerid)
{
    new randomspawn = random(sizeof(RandomPlayerSpawns));
    PlayerPos[0] = RandomPlayerSpawns[randomspawn][XPOS];
    PlayerPos[1] = RandomPlayerSpawns[randomspawn][YPOS];
    PlayerPos[2] = RandomPlayerSpawns[randomspawn][ZPOS];
    PlayerPos[3] = RandomPlayerSpawns[randomspawn][Angle];
   
    SetPlayerPos(playerid,PlayerPos[0],PlayerPos[1],PlayerPos[2]);
    SetPlayerFacingAngle(playerid, PlayerPos[3]);
    SetCameraBehindPlayer(playerid);
    return 1;
}
Reply


Messages In This Thread
Spawn Bug - by anassmaroc - 21.09.2015, 11:55
Re: Spawn Bug - by IceBilizard - 21.09.2015, 12:32
Re : Re: Spawn Bug - by anassmaroc - 21.09.2015, 12:41
Re: Spawn Bug - by IceBilizard - 21.09.2015, 12:43
Re : Spawn Bug - by anassmaroc - 21.09.2015, 12:48
Re: Spawn Bug - by IceBilizard - 21.09.2015, 12:50
Re : Spawn Bug - by anassmaroc - 21.09.2015, 12:54
Re: Spawn Bug - by IceBilizard - 21.09.2015, 12:55
Re : Spawn Bug - by anassmaroc - 21.09.2015, 13:01
Re: Re : Spawn Bug - by IceBilizard - 21.09.2015, 13:48

Forum Jump:


Users browsing this thread: 4 Guest(s)