how can i do this?
#5

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (newkeys & KEY_LOOK_BEHIND  && IsPlayerInAnyVehicle(playerid))
    {
        new EngineStatus, lights, alarm, doors, bonnet, boot, objective;
        new vid = GetPlayerVehicleID(playerid);      
        GetVehicleParamsEx(vid,EngineStatus,lights,alarm,doors,bonnet,boot,objective);
        if(vid != INVALID_VEHICLE_ID && EngineStatus== 0)
        {
            SetVehicleParamsEx(vid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective); //engine started
        }
        else if(vid != INVALID_VEHICLE_ID && EngineStatus== 1)
        {
            SetVehicleParamsEx(vid, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective); //engine stopped
        }
    }
    return 1;
}
Reply


Messages In This Thread
how can i do this? - by kingcrome - 18.11.2013, 19:00
Re: how can i do this? - by Evocator - 18.11.2013, 19:02
Re: how can i do this? - by Konstantinos - 18.11.2013, 19:02
Re: how can i do this? - by Inn0cent - 18.11.2013, 19:37
Re: how can i do this? - by Inn0cent - 18.11.2013, 19:45
Re: how can i do this? - by PakistaniBaba - 18.11.2013, 19:54

Forum Jump:


Users browsing this thread: 1 Guest(s)