How can I know the ID of some car? - 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: How can I know the ID of some car? (
/showthread.php?tid=87621)
How can I know the ID of some car? -
krawN - 21.07.2009
Hi.
How could I know the ID of some car? I need it for make an autoexplosion.
Thx.
Re: How can I know the ID of some car? -
Grim_ - 21.07.2009
https://sampwiki.blast.hk/wiki/Category:Vehicle ?
Re: How can I know the ID of some car? -
krawN - 21.07.2009
Quote:
Originally Posted by Swift_
|
No, it is not what I'm searching.
I want know the ID of the car (ingame), for example, ID 0, 1, 2... for make a function which only affects to the car which have that ID. For example, if you're driving the car that have ID "0" shows a message...
THX.
Re: How can I know the ID of some car? -
Snickers - 21.07.2009
// this will go above main(), as this is a global variable, its the car you want to use.
and then, under OnGameModeInit or OnFilterScriptInit
Код:
car = CreateVehicle(Car_ID, closed_X, closed_Y, closed_Z, closed_rad_X, closed_rad_Y, closed_rad_Z);
Start with that.
Re: How can I know the ID of some car? -
krawN - 21.07.2009
Quote:
Originally Posted by sɹǝʞɔıus
// this will go above main(), as this is a global variable, its the car you want to use.
and then, under OnGameModeInit or OnFilterScriptInit
Код:
car = CreateVehicle(Car_ID, closed_X, closed_Y, closed_Z, closed_rad_X, closed_rad_Y, closed_rad_Z);
Start with that.
|
Yes, I just did that but it still doesn't work, when I check if any player is in the vehicle nothing happens:
pawn Код:
if(carid==0)
{
SendClientMessage(playerid, COLOR_RED, "You are in");
}
Re: How can I know the ID of some car? -
Snickers - 21.07.2009
What is carID 0?
I can't script too good, to be honest
Re: How can I know the ID of some car? -
krawN - 21.07.2009
Quote:
Originally Posted by sɹǝʞɔıus
What is carID 0?
I can't script too good, to be honest ![Embarrassed](images/smilies/redface.gif)
|
CarID it's the same as "car"
carid = CreateVehicle(515,-2669.7776,-34.4391,4.1402,180.2401,20,1, 2000); // id 0