Add VehicleModel ?
#1

pawn Код:
new newkeys,l,u;
GetPlayerKeys(playerid, newkeys, l, u);
new i;
if(Holding(KEY_FIRE))
{
       if(GetPlayerWeapon(playerid) == 42)
       {
with the code above, if I can use code like this?

pawn Код:
new newkeys,l,u;
new vehicleid = GetPlayerVehicleID(playerid);
GetPlayerKeys(playerid, newkeys, l, u);
new i;
if(Holding(KEY_FIRE)
{
       if(GetPlayerWeapon(playerid) == 42 && (GetVehicleModel(vehicleid) == 407))
       {
Reply
#2

You can use it like this.

pawn Код:
if(GetPlayerWeapon(playerid) == 42 && (GetVehicleModel(vehicleid) == 407))
This will check for both of these conditions to be true.
Reply
#3

I'm not sure if it will work, I think no weapon is returned when you are inside a vehicle...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)