[Pomoc] Veh engine failed to start

Započeo KiLLa, Decembar 11, 2011, 19:11:46 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta: Neka RP, nezz...
Problem: Kako da smanjim broj neuspjelih poksuaja paljenja auta? Npr. nekad starta iz prve, nekad iz pete, i to mi ide na zivce, ja bi si napravio da iz maximalno drugog puta mora upalit?
Dio skripte:

CMD:engine(playerid, params[])
{
        new vehicleid = GetPlayerVehicleID(playerid);
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be in a vehicle to use this command");
        if(vehEngine[vehicleid] == 0)
        {
            vehEngine[vehicleid] = 2;
            SetTimerEx("StartEngine", 3000, 0, "i", playerid);
            SendClientMessage(playerid, COLOR_GREEN, "Vehicle engine starting");
        }
        else if(vehEngine[vehicleid] == 1)
        {
            vehEngine[vehicleid] = 0;
            TogglePlayerControllable(playerid, 0);
            SendClientMessage(playerid, COLOR_GOLD, "Vehicle engine stopped");
            SendClientMessage(playerid, COLOR_GOLD, "To re-start the vehicle's engine press \"Shift\" or type \"/engine\"");
        }
        return 1;
}




new vehicleid = GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid))
    {
    if(vehEngine[vehicleid] == 0)
    {
    if(newkeys == KEY_JUMP)
    {
    new vid, sendername[MAX_PLAYER_NAME], vmodel[128];
    vehEngine[vehicleid] = 2;
    SetTimerEx("StartEngine", 3000, 0, "i", playerid);
    SendClientMessage(playerid, COLOR_GREEN, "Vehicle engine starting");
    vid = GetPlayerVehicleID(playerid);
    GetVehicleName(vid,vmodel,sizeof(vmodel));
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "* %s is starting the engine of the %s", sendername, vmodel);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
if(newkeys == KEY_SECONDARY_ATTACK)
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
}
}
}
return 1;
}



Ako jos treba neki dio skritpe stavit cu..