How can I know the ID of some car?
#1

Hi.

How could I know the ID of some car? I need it for make an autoexplosion.

Thx.
Reply
#2

https://sampwiki.blast.hk/wiki/Category:Vehicle ?
Reply
#3

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

// this will go above main(), as this is a global variable, its the car you want to use.
Код:
new car;
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.
Reply
#5

Quote:
Originally Posted by sɹǝʞɔıus
// this will go above main(), as this is a global variable, its the car you want to use.
Код:
new car;
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");
    }
Reply
#6

What is carID 0?

I can't script too good, to be honest
Reply
#7

Quote:
Originally Posted by sɹǝʞɔıus
What is carID 0?

I can't script too good, to be honest
CarID it's the same as "car"

carid = CreateVehicle(515,-2669.7776,-34.4391,4.1402,180.2401,20,1, 2000); // id 0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)