Help me please engine system
#6

Are you using gamemode to make a engine system?
Try this..
PHP код:
#include <a_samp>
#include <zcmd>




public OnFilterScriptInit() // Use it as filterscript instead..
{
      
ManualVehicleEngineAndLights();
      return 
1;
}

public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    new 
vehicleid GetPlayerVehicleID(playerid);
    if (
vehicleid) {
        if ((
newkeys KEY_SUBMISSION) && GetPlayerVehicleSeat(playerid) == 0
        {
            new 
enginelightsalarmdoorsbonnetbootobjective;
            
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
            if (
engine == 0engine 1;
            else 
engine 0;
            
SetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
            return 
1;
        }
    }
    return 
1;
}

CMD:engine(playerid,params[])
{
    new 
enginelightsalarmdoorsbonnetbootobjective;
    new 
vehicleid GetPlayerVehicleID(playerid);
    if(
IsPlayerInAnyVehicle(playerid))
    {
        
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
        
SetVehicleParamsEx(vehicleid1lightsalarmdoorsbonnetbootobjective);
        
SendClientMessage(playerid0xFFFFFFFF"Your vehicle's engine is now turned [ON].");
    }
    else
    {
        
//Send a message telling he is not in a vehicle to manipulate an engine
    
}
    return 
1;

Reply


Messages In This Thread
Help me please engine system - by Rafaeloo - 19.10.2015, 14:38
Re: Help me please engine system - by Rafaeloo - 19.10.2015, 14:45
Re: Help me please engine system - by [ABK]Antonio - 19.10.2015, 15:23
Re: Help me please engine system - by Scottylad - 19.10.2015, 15:29
Re: Help me please engine system - by Rafaeloo - 19.10.2015, 18:32
Re: Help me please engine system - by karemmahmed22 - 19.10.2015, 18:48
Re: Help me please engine system - by Rafaeloo - 19.10.2015, 19:35
Re: Help me please engine system - by [ABK]Antonio - 19.10.2015, 19:59
Re: Help me please engine system - by Crystallize - 19.10.2015, 21:02
Re: Help me please engine system - by karemmahmed22 - 20.10.2015, 05:42

Forum Jump:


Users browsing this thread: 1 Guest(s)