SA-MP Forums Archive
Help needed - : - - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help needed - : - (/showthread.php?tid=515314)



Help needed - : - - Johnson_Brooks - 25.05.2014

pawn Код:
else if(gTeam[playerid] >= 9)
    {
        TogglePlayerControllable(playerid,0);
        new Random = random(sizeof(RandomSpawns));
        SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
        SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
        SetCameraBehindPlayer(playerid);
    }
The above code is forcing the civilians to spawn randomly (Coords are given on a
pawn Код:
new
but the problem is that they spawn in LV in a 24/7 store . Why ?


Re: Help needed - : - - Eth - 25.05.2014

show me the randomspawns float.


Re: Help needed - : - - Johnson_Brooks - 25.05.2014

pawn Код:
new Float:RandomSpawns[][] =
{

{-2638.4055,229.7158,4.3281,109.5973},
{-2500.0615,389.3120,27.7656,48.3531},
{-2124.8713,649.1783,52.3704,83.0798},
{-2243.8044,943.8950,66.6484,88.6631},
{-2243.4663,753.3155,49.4393,86.9318},
{-2442.1355,746.6382,35.0156,176.9609},
{-1984.5894,138.2576,27.6875,90.5403}

};
All of them are in SF


Re: Help needed - : - - Johnson_Brooks - 25.05.2014

bump


Re: Help needed - : - - Konstantinos - 25.05.2014

Where did you place it? Is it under OnPlayerSpawn callback? And if it is, make sure that after setting the position, it doesn't set another position at the bottom of the callback.


Re: Help needed - : - - Johnson_Brooks - 25.05.2014

yes under onplayerspawn callback and that function is at the bottom .
..


Re: Help needed - : - - Johnson_Brooks - 25.05.2014

no-one is helping tho...


AW: Help needed - : - - Macronix - 25.05.2014

Are you setting the team correctly ?