How to convert to 0.3c engine system?
#1

Title says all:

Here is the cmd, what I need to change?:

PHP код:
if(!strcmp(cmd"/engine"true))
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
IsPlayerInAnyVehicle(playerid))
            {
                if(!
engineOn[GetPlayerVehicleID(playerid)])
                {
                    if(
GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1;
                    if(
pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509) return SendClientMessage(playeridCOLOR_GREY,"* You cannot turn this bike's engine!");
                    if(
IsARentableCar(idcar))
                    {
                        if(
HireCar[playerid] != idcar) return SendClientMessage(playeridCOLOR_GREY,"* You cannot turn this car's engine!");
                    }
                    if(
IsAHarvest(idcar)) return SendClientMessage(playeridCOLOR_GREY,"* You cannot turn this car's engine!");
                    if(
IsADrugHarvest(idcar)) return SendClientMessage(playeridCOLOR_GREY,"* You cannot turn this car's engine!");
                    if(
IsASweeper(idcar)) return SendClientMessage(playeridCOLOR_GREY,"* You cannot turn this car's engine!");
                    if(
IsASalesVehicle(idcar)) return SendClientMessage(playeridCOLOR_GREY,"* You cannot turn this car's engine!");
                    
format(stringsizeof(string), "* %s spins a key and tries to start vehicle engine."sendername);
                    
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    
SetTimerEx("StartingTheVehicle",3500,0,"i",playerid);
                    
GameTextForPlayer(playerid"~w~Starting vehicle engine...",3500,3);
                    
gEngine[playerid] = 1;
                    new 
ymd;
                    new 
h,mi,s;
                    
getdate(y,m,d);
                    
gettime(h,mi,s);
                    
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /engine",d,m,y,h,mi,s,sendername);
                    
CommandLog(string);
                    return 
1;
                }
                else if(
engineOn[GetPlayerVehicleID(playerid)])
                {
                    if(
GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1;
                    if(
pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509) return 1;
                    if(
IsARentableCar(idcar))
                    {
                        if(
HireCar[playerid] != idcar) return 1;
                    }
                    if(
IsAHarvest(idcar)) return 1;
                    if(
IsADrugHarvest(idcar)) return 1;
                    if(
IsASweeper(idcar)) return 1;
                    if(
IsASalesVehicle(idcar)) return SendClientMessage(playeridCOLOR_GREY,"* You cannot turn this car's engine!");
                    
format(stringsizeof(string), "* %s spins a key and turns off the engine."sendername);
                    
ProxDetector(30.0playeridstringCOLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
                    
GameTextForPlayer(playerid"~w~Engine Shat Down.",3500,3);
                    
gEngine[playerid] = 0;
                    
SafeRemovePlayerFromVehicle(playerid);
                    
TogglePlayerControllable(playerid1);
                    new 
ymd;
                    new 
h,mi,s;
                    
getdate(y,m,d);
                    
gettime(h,mi,s);
                    
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /engine",d,m,y,h,mi,s,sendername);
                    
CommandLog(string);
                    return 
1;
                }
            }
        }
        return 
1;
    } 
Thank you.
Reply
#2

Did you try to test it? does it even work? Is your script 0.3c?
Reply
#3

You dont have to change ... try testing before post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)