get vehicle id - 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)
+--- Thread: get vehicle id (
/showthread.php?tid=348051)
get vehicle id -
TheDiscussionCafe - 04.06.2012
hey. is there a "if" statement like this:
if(getvehicleNameOrId == 411)
or something like that so it can check if player is in vehicle 411?
i want to use in a command!
Re: get vehicle id -
thefatshizms - 04.06.2012
pawn Код:
if(GetPlayerVehicleID(< 411)
i think it something like that but im just guessing
still it gives u an idea
Re: get vehicle id -
[NWA]Hannes - 04.06.2012
Quote:
Originally Posted by TheDiscussionCafe
hey. is there a "if" statement like this:
if(getvehicleNameOrId == 411)
or something like that so it can check if player is in vehicle 411?
|
Yes, there is.
if(GetVehicleModel(GetPlayerVehicleID(playerid)) ==
411)
https://sampwiki.blast.hk/wiki/GetVehicleModel
Quote:
Originally Posted by thefatshizms
pawn Код:
if(GetPlayerVehicleID(< 411)
i think it something like that but im just guessing
still it gives u an idea
|
No, your statement is invalid, that wont work.
Re: get vehicle id -
TheDiscussionCafe - 04.06.2012
Quote:
Originally Posted by [NWA]Hannes
|
works thanks!
Re: get vehicle id -
thefatshizms - 04.06.2012
Quote:
Originally Posted by [NWA]Hannes
|
soz
was just guessing
im still learning -.-
Re: get vehicle id -
MP2 - 04.06.2012
Quote:
Originally Posted by thefatshizms
pawn Код:
if(GetPlayerVehicleID(< 411)
i think it something like that but im just guessing
still it gives u an idea
|
If you have no clue whatsoever what you're talking about (which you don't - you haven't even grasped how a basic statement works) then posting in someone's help topic is a bit stupid. Not only does it make you look like a fool but it's hardly helping the guy that created the topic.
Learn yourself, THEN teach people.