[Help] /hotwire system
#4

PHP код:
command(hotwireplayeridparams[])
{
    if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridWHITE"You are not in a vehicle!");
    
    new    
        
realvehicleid GetPlayerVehicleID(playerid),
        
vehicleid GetVehicleFileIDEx(playeridrealvehicleid);
    
    static 
        
engine,
        
lights,
        
alarm,
        
doors,
        
bonnet,
        
boot,
        
objective;
    
    
GetVehicleParamsEx(realvehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
    if(
engine == VEHICLE_PARAMS_ON) return SendClientMessage(playeridWHITE"You cannot hotwire a vehicle that is already on.");
    
    if((
engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET))
    {        
        static
            
string[128];
    
        if(
random(2))
        {
            
// message
        
            
return 1;
        }
    
        
format(stringsizeof(string), "** %s tweaks with the vehicle's wires under the dashboard."GetName(playerid));
        
NearByMessage(playeridSCRIPTPURPLEstring);
        
        
SetTimerEx("SetVehicleEngine"17000"dd",  vehicleidplayerid);
        
        
CarHotwireStatus{vehicleid} = 1;
    }
    
    return 
1;

Reply


Messages In This Thread
[Help] /hotwire system - by BigGreen - 03.09.2015, 15:45
Re : [Help] /hotwire system - by Dutheil - 03.09.2015, 16:49
Re: Re : [Help] /hotwire system - by BigGreen - 03.09.2015, 17:14
Re : [Help] /hotwire system - by Dutheil - 03.09.2015, 17:19
Re: [Help] /hotwire system - by Admigo - 03.09.2015, 17:21
Re: Re : [Help] /hotwire system - by Freezo - 03.09.2015, 17:27
Re : [Help] /hotwire system - by Dutheil - 03.09.2015, 17:33
Re: Re : [Help] /hotwire system - by BigGreen - 03.09.2015, 17:37
Re: Re : [Help] /hotwire system - by Admigo - 03.09.2015, 17:40
Re: [Help] /hotwire system - by Freezo - 03.09.2015, 21:19

Forum Jump:


Users browsing this thread: 1 Guest(s)