LMB for Nos
#1

Here is the Code. But it show error when i compile it. The error is: error 017: undefined symbol "PRESSED"

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_FIRE))
{
if (IsPlayerInAnyVehicle(playerid))
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
}
return 1;
}


I tried to #define PRESSED but it comes alot more errors? I need help ,please
Reply
#2

Add this then:
pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
Reply
#3

Thanks! It worked TYVM man !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)