Problems in command /engine
#2

PHP код:

CMD
:engine(playeridparams[])
{
    new 
        
string[265],
        
engine,
        
lights,
        
alarm,
        
doors,
        
bonnet,
        
boot,
        
objective,
        
vehicleid GetPlayerVehicleID(playerid);

    if(
IsBicycle(vehicleid))
        return 
SendClientMessage(playerid0xE74C3CFF"You are not driving a vehicle with engine!");

    if(
GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
        return 
SendClientMessage(playerid0xE74C3CFF"You are not driving a vehicle!");

    
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);

    if(
engine == 1)
    {
        
engine 0;
        
format(stringsizeof(string), "%s stops the engine of a %s."GetName(playerid), GetVehicleName(vehicleid)); 
        
SendClientMessage(playerid0xFF66FFAAstring); 
        
RangeDetector(playerid30.0string0xFF66FFAA); 
        
SetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective); 
    }
    else
    {
        if(
Fuel[vehicleid] < 0)
            return 
SendClientMessage(playerid0xFF66FFAA"Your vehicle is out of fuel!");

        
engine 1;
        
format(stringsizeof(string), "%s starts the engine of a %s."GetName(playerid), GetVehicleName(vehicleid)); 
        
SendClientMessage(playerid0xFF66FFAAstring); 
        
RangeDetector(playerid30.0string0xFF66FFAA);
        
SetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);        
    }
    return 
1;

Reply


Messages In This Thread
Problems in command /engine - by JaskaranSingh - 02.04.2018, 12:18
Re: Problems in command /engine - by Sabur - 02.04.2018, 12:32
Re: Problems in command /engine - by JaskaranSingh - 02.04.2018, 12:52
Re: Problems in command /engine - by JaskaranSingh - 02.04.2018, 13:04

Forum Jump:


Users browsing this thread: 1 Guest(s)