GetVehicleModel - 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: GetVehicleModel (
/showthread.php?tid=243715)
GetVehicleModel -
xir - 24.03.2011
Hello..
I need some help
this code
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 596 & 597) return SendClientMessage(playerid, Red, "To arrest players they need to be in your police car");
How can I make it work so you can only arrest when you are in a police car, if you are not in a police car it returns that
AW: GetVehicleModel -
Pablo Borsellino - 24.03.2011
Uhh, anything new for me or why you use 596 & 597? How can the Vehicle have more then one Modelid at the time?
pawn Код:
GetVehicleModel(GetPlayerVehicleID(playerid))==596||GetVehicleModel(GetPlayerVehicleID(playerid))==597)
Re: GetVehicleModel -
xir - 24.03.2011
596 597 is the vehicle id of police cars...
how can I make it , if they not in them they cannot use that command?
Re: GetVehicleModel -
Calgon - 24.03.2011
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 596 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 597) return SendClientMessage(playerid, Red, "To arrest players they need to be in your police car");
Re: GetVehicleModel -
xir - 24.03.2011
Thanks Calgoone, I will try it later
Also can you help me with this one?
pawn Код:
if(GetPlayerVehicleSeat(pid) == -1) return SendClientMessage(playerid, Yellow, "This player is not in your police car");
Would this work?
Re: GetVehicleModel -
Calgon - 24.03.2011
Yes, that will work.
Re: GetVehicleModel -
xir - 24.03.2011
Ok thank you so much Calg00ne