GetVehicleModel
#1

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
Reply
#2

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)
Reply
#3

596 597 is the vehicle id of police cars...

how can I make it , if they not in them they cannot use that command?
Reply
#4

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");
Reply
#5

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?
Reply
#6

Yes, that will work.
Reply
#7

Ok thank you so much Calg00ne
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)