SA-MP Forums Archive
spawn problem.. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: spawn problem.. (/showthread.php?tid=215500)



spawn problem.. - RoiKy - 23.01.2011

hey..
i make a TDM system and i have a problem..

PHP код:
new Float:TDMSpawn[][3] =
{
    {-
2100.1328,-275.8592,35.3203},
    {-
2136.8108,-276.5698,35.3203},
    {-
2136.2761,-238.6222,35.3203},
    {-
2098.9109,-196.9363,35.3203},
    {-
2155.8967,-224.4192,35.3203},
    (-
2154.4788,-191.3053,35.3203),
    (-
2148.6934,-183.5631,35.3203),
    (-
2119.3906,-178.8080,35.3203),
    (-
2152.0713,-148.9486,36.4875),
    (-
2156.2773,-173.7079,35.3203),
    (-
2155.0154,-112.0047,35.3203),
    (-
2154.8555,-84.9406,35.3203),
    (-
2137.3311,-82.3819,35.3273),
    (-
2098.4006,-83.0742,35.3273),
    (-
2097.6616,-110.6172,35.3203),
    (-
2112.1028,-111.5435,35.3203),
    (-
2137.3740,-115.2843,35.3273),
    (-
2145.5188,-112.1664,41.5820),
    (-
2098.5171,-176.9662,35.3203),
    {-
2111.8049,-151.4789,35.3203}
}; 
and i use it like that:

PHP код:
        new rand random(sizeof(TDMSpawn));
        
SetPlayerPos(playerid,TDMSpawn[rand][0],TDMSpawn[rand][1],TDMSpawn[rand][2]); 
and it didnt work... its send the player to the air and then to a place like a farm...


Re: spawn problem.. - xPawn - 23.01.2011

Help us


Re: spawn problem.. - xPawn - 24.01.2011

Help Please


Re: spawn problem.. - Fool - 24.01.2011

Yeah Here is the issue:

SetPlayerPos(playerid,TDMSpawn[rand][0],TDMSpawn[rand][1],TDMSpawn[rand][2]);

You need to go on BTW here: new Float:TDMSpawn[][22] =


I Think that will help so


SetPlayerPos(playerid,TDMSpawn[rand][0],TDMSpawn[rand][1],TDMSpawn[rand][2],TDMSpawn[rand][3] // Go on!);


Re: spawn problem.. - Stigg - 24.01.2011

Check your coord's.

Peace...


Re: spawn problem.. - Fool - 24.01.2011

Quote:
Originally Posted by Stigg
Посмотреть сообщение
Check your coord's.

Peace...
fail....


Re: spawn problem.. - Stigg - 24.01.2011

Quote:
Originally Posted by Porsche911
Посмотреть сообщение
fail....
I think not. i told him to check the array. Which is where the fault was.

Peace...


Re: spawn problem.. - iggy1 - 24.01.2011

Quote:
Originally Posted by Stigg
Посмотреть сообщение
I think not. i told him to check the array. Which is where the fault was.

Peace...
+1
There is nothing wrong with the code it has to be the co-ords. Also make sure they are in the correct interior.


Re: spawn problem.. - Lorenc_ - 24.01.2011

Stigg you might be right lol, acctaully if your in the air, that means your interior is wrong by chance.. Might wanna set the interior to the player, or?

EDIT: Iggy tellem :P


Re: spawn problem.. - RoiKy - 24.01.2011

nope.. if i use it like that
SetPlayerPos(playerid,-2100.1328,-275.8592,35.3203);
(thats the first cord) its work :O