SA-MP Forums Archive
Anyone know a car spawner? - 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: Anyone know a car spawner? (/showthread.php?tid=95764)



Anyone know a car spawner? - [mad]MLK - 04.09.2009

Hey there, I'm curious if someone could direct me to the link of a car spawner as mine dose not support vehicle names (The one i coded) And i would like to take a look at the code of one that supports names so that i could learn how to do it thanks.
MLK


Re: Anyone know a car spawner? - Zezombia - 04.09.2009

Edit:

http://pastebin.com/f1a9e9846

That should fit your description (tested).

_________________________________________________

Finding a peice of text in an array is easy enough.

pawn Код:
new array[][]
{
    "a",
    "b"
};
pawn Код:
array[0]
Would return "a".

pawn Код:
array[1]
Would return "b".

_________________________________________________

pawn Код:
new names[][]
{
    "Bullet",
    "Infernus"
};

for(new i = 0; i < 2; i++) if(strfind(names[i], "Bul", true) != -1 /*-1 is "not found"*/) printf("%d", names[i]);
That would print "Bullet", because it finds "Bul" in the first (names[0] == "Bullet") param.

Add every vehicle name to an array (in order of ID) and add 400. For example:
Landstalker should be in the first param, so if found it will be in param 0. 0 plus 400 = 400.
Bravura should be in the second param, so if found it will be in param 1. 1 plus 400 = 401.


Re: Anyone know a car spawner? - [mad]MLK - 07.09.2009

theres a small problem with that script , when someone spawns a car if another player spawns a car it deleats the first players car


Re: Anyone know a car spawner? - Eazy_Efolife - 07.09.2009

Mine is better

Take it out of my script http://forum.sa-mp.com/index.php?topic=117948.0