[Include] car id's into car names
#1

hey guys,

i have just made this small simple include which makes it easier to add a car somewhere in your GM/FS.

what does it do:
as first i have defined every carid into carnames so now when u do AddStaticVehicle or PutPlayerInVehicle or any other option then you dont have to enter the id of the car you want there but you can just simply add the car name there and it will recognise it as the id which is defined in the include.

How to install and use it:

as first download cardefines.inc.
then place it in your folder Pawno/include/cardefines.inc
then go to your GM/FS and open it.
add on top of the script under #include <a_samp> #include <cardefines>.
so it will look like this:
pawn Code:
#include <a_samp>
#include <cardefines>
ok well then compile your script and it will probably give no errors.(if it does then post here wut your error is)
and have fun with the include

DOWNLOAD:
Solidfiles:
http://solidfiles.com/d/90a1362d8f/download/
Mediafire:
http://205.196.122.130/tlu21kui47eg/...cardefines.inc
Pastebin:
http://pastebin.com/1C07ta3E

have fun
greets niels

EDIT:

on some suggestions of players i made a version 2 of this, so now it will remove errors/warnings in truck scripts or other scripts

as first i explain how it works in this version:

in the previous version you had to do for example: Addstaticvehicle(bus,........................);

but ****** and Toreno said that would cause problems so i recreated this with their suggestions( i only didnt made it with BIGG letters cuz then i had to rewrite it completely XD this already took me 1 hour so if you really want it in bigg letters then you may do it yourself XD

ok so nowyou have to do it like this:

addstaticvehicle(v_bus,........................);

that v_ means for EVERY vehicle so you have to put v_ before every vehicle, so for v_bus, v_cheetah, v_infernus, etc....

also i made it in the define with ( and )

you dont have to type that in your script, they only said it would be faster or something XD, so i added it to the ids of the car, it doesnt affects the names just type v_bus,

so for example in the include:

#define v_bus (431)

download it from here:

Solidfiles:
http://www.solidfiles.com/d/add494dab7/

pastebin:
http://pastebin.com/5rykQ4Za

also i recommend the ones who already had the other one and didnt had errors to not use this one, cuz then it maybe can cause errors, but you may always try


greets niels
Reply
#2

Useful....
Reply
#3

This is really helpfull, great job man
Reply
#4

thnx XD i just amde it in 20 mins XD but thnx
Reply
#5

very useful
this could help me alot thx
Reply
#6

np XD
Reply
#7

*cough* fsdebug.pwn *cough*
Reply
#8

Very useful,nice work.
Reply
#9

surely have took a while i appreciate your work
Good!
Reply
#10

most impressive my good sir!
Reply
#11

Nice INC but you said you can type car name instead of ID in PutPlayerInVehicle but what if I have 2 cars of same model (ex. 2 Cheetah)? In which one will function put player? Is it in first created one?
Reply
#12

Well done, niels44. It's really good include, and you should update with ******' suggestion. I wanna add something as well, before the vehicle name comes, type;
pawn Код:
#define V_BUS (431)
I think this might be better, and won't cause problems at all.
Reply
#13

hmm thnx guys for the suggest XD i didnt readed this for a while but i will make it, also i didnt new about this ( and ) XD

and i will make it with V_BUS, but why i have to make it in BIGG letters? XD

EDIT: and ***** XD could you maybe dont use such good english XD, i only got half of what you said XD i am not that good in english XD

EDIT again XD: and i think yuou can just use cheeta 2 times in the script, cuz its the same as the id... tell me if this causes problems...
Reply
#14

Quote:
Originally Posted by Fmfan
Посмотреть сообщение
Nice INC but you said you can type car name instead of ID in PutPlayerInVehicle but what if I have 2 cars of same model (ex. 2 Cheetah)? In which one will function put player? Is it in first created one?
Well, I think he is wrong, because this can't be used with PutPlayerInVehicle, it uses the vehicle ID not the vehicle model.
And, hard effort, yeah.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)