Starting Engine dures twice :?
#9

PHP код:
CMD:engine(playeridparams[])
{
    
#define charsmax(%1) sizeof(%1)-1
    
    
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        new 
tmpbEnginevehicleid GetPlayerVehicleID(playerid);
        
GetVehicleParamsEx(vehicleidbEnginetmptmptmptmptmptmp);
       
        new 
bState = (bEngine == VEHICLE_PARAMS_OFF || bEngine == VEHICLE_PARAMS_UNSET);
        
SetVehicleParamsEx(vehicleidbStatebState, -1, -1, -1, -1, -1);
       
        new 
string[64];
        
GetPlayerName(playeridstringcharsmax(string));
        
format(stringcharsmax(string), "* %s turn the ignition and %s the engine."stringbState ? ("starts") : ("turns off"));
        
        
SendNearbyMessage(playerid15stringCOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLE)       
    }
    return 
1;

Use this code. It don't need any extra variables.
Reply


Messages In This Thread
Starting Engine dures twice :? - by Mey6155 - 29.05.2014, 12:58
Re: Starting Engine dures twice :? - by R0 - 29.05.2014, 13:02
Re: Starting Engine dures twice :? - by d3ll - 29.05.2014, 13:05
Re: Starting Engine dures twice :? - by Mey6155 - 29.05.2014, 13:07
Re: Starting Engine dures twice :? - by Mey6155 - 29.05.2014, 13:12
Re: Starting Engine dures twice :? - by nickdodd25 - 29.05.2014, 13:18
Re: Starting Engine dures twice :? - by Mey6155 - 29.05.2014, 13:20
Re: Starting Engine dures twice :? - by R0 - 29.05.2014, 14:05
Re: Starting Engine dures twice :? - by bogdyutzu - 29.05.2014, 14:28
Re: Starting Engine dures twice :? - by [NWA]Hannes - 29.05.2014, 14:37

Forum Jump:


Users browsing this thread: 3 Guest(s)