Anyone know a car spawner?
#1

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
Reply
#2

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.
Reply
#3

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

Mine is better

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


Forum Jump:


Users browsing this thread: 1 Guest(s)