I can use something like IsPlayerInVehicle(playerid, vehicleid) in a NPC script?
#1

I can use something like IsPlayerInVehicle(playerid, vehicleid) in a NPC script?


Thanks for all help.
Reply
#2

No, but you can use GetPlayerVehicleID function.

So you can do something like this:
pawn Код:
if(GetPlayerVehicleID(playerid) == vehicleid)
{
  // code.
}
or your own function:
pawn Код:
stock IsPlayerInVehicle(playerid, vehicleid)
{
  if(GetPlayerVehicleID(playerid) == vehicleid) return true;
  return false;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)