Help me please engine system
#1

hello
PHP код:
#include <a_samp>
#include <zcmd>
public OnGameModeInit()
{
      
ManualVehicleEngineAndLights(); // Initalization engine systems
      
return true;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    new 
vehicleid GetPlayerVehicleID(playerid);
    if (
vehicleid) {
        if ((
newkeys KEY_SUBMISSION) && GetPlayerVehicleSeat(playerid) == 0) {
             new 
enginelightsalarmdoorsbonnetbootobjective;
             
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
             if (!
engineengine 1;
             else 
engine 0;
             
SetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
             return 
true;
        }
    }
    return 
true;
}
CMD:engine(playerid,params[])
{
            new 
enginelightsalarmdoorsbonnetbootobjective;
            new 
vehicleid GetPlayerVehicleID(playerid);
if(
IsPlayerInAnyVehicle(playerid))
{
            
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
            
SetVehicleParamsEx(vehicleid, !enginelightsalarmdoorsbonnetbootobjective);
            
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;

i have this script , its work , i press 2 engine start , BUT after 10 seconds the car is turned off automatically?

how to fix it pleasee.
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: 3 Guest(s)