Need help with specific vehicle models
#1

hello there. Is there anyway I can make my script work only if the player is sitting a in one out of 5 specific vehicle models?

I know this can be done by adding staticvehicles and using their Id but when people buy cars at my server the ID's change so that wont work I guess..

Any help?
Reply
#2

GetVehicleModel will help you.

This forum requires that you wait 120 seconds between posts. Please try again in 1 seconds. Seriously?
Reply
#3

Well, you can define their vehicles as a specific ID like,
at the top...
pawn Код:
new VEH;
then where ever
pawn Код:
VEH = CreateVehicle(blah);
Then
pawn Код:
if(GetPlayerVehicleID(playerid) == VEH)
if that's what you want
Reply
#4

I wrote something a very long time ago similar to this, here it is.

pawn Код:
stock IsCarTruck(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 514 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 403
|| GetVehicleModel(GetPlayerVehicleID(playerid)) == 515)
{
return true;
}
return false;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)