OnPlayerKeyStateChange
#4

pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
   
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_NO))
    {
        if (IsPlayerInAnyVehicle(playerid))
        {
            new vehicleid = GetPlayerVehicleID(vehicleid);
            new engine, lights, alarm, doors, bonnet, boot, objective;
            GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
        }
    }
    return 1;
}
Reply


Messages In This Thread
OnPlayerKeyStateChange - by RonnyCZ - 03.12.2014, 15:47
Re: OnPlayerKeyStateChange - by RonnyCZ - 03.12.2014, 16:25
Re: OnPlayerKeyStateChange - by Galletziz - 03.12.2014, 16:32
Re: OnPlayerKeyStateChange - by HY - 03.12.2014, 17:01
Re: OnPlayerKeyStateChange - by M4D - 03.12.2014, 17:01

Forum Jump:


Users browsing this thread: 1 Guest(s)