[HELP]Need help about hotkeys and instant repair.......plz HELP
#4

On top of script write:
PHP код:
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) 
Then:
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
PRESSED(KEY_SUBMISSION))
    {
        new 
id GetPlayerVehicleID(playerid);
        if(
id)
        {
            
SetVehicleHealth(id1000);
            
SendClientMessage(playerid0x00FF00"Vehicle Repaired!");
        }
    }
    return 
1;

This will fix the car whenever the player pressed the "KEY_SUBMISSION" (which is '2' or '+' by default)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)