No reason for this not to work.
#1

It simply does not work. I don't know why..

pawn Код:
CMD:eon(playerid, params[])
{
    if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOUR_GREY, "You are not in a vehicle.");

    EngineStartStatus[playerid] = 3;
    engineon = SetTimer("EngineOn", 3000, 0);
    new vehicleid = GetPlayerVehicleID(playerid);
    if(EngineStartStatus[playerid] == 1)
    {
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
        SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
    }
    return 1;
}
Timer:
pawn Код:
forward EngineOn();
public EngineOn()
{
    foreach(Player, i)
    {
        if(EngineStartStatus[i] == 3)
            {
                 GameTextForPlayer(i, "~g~Engine Starting...", 1000, 5);
                 EngineStartStatus[i] --;
            }
        if(EngineStartStatus[i] == 2)
            {
                 GameTextForPlayer(i, "~g~Engine Starting..", 1000, 5);
            }
        if(EngineStartStatus[i] == 1)
            {
                 EngineStartStatus[i] = 1;
                 KillTimer(engineon);
                 GameTextForPlayer(i, "~g~Engine Started.", 1000, 5);
            }
        }
    return 1;
}
Reply


Messages In This Thread
No reason for this not to work. - by Dokins - 14.01.2012, 19:04
Re: No reason for this not to work. - by MP2 - 14.01.2012, 19:06
Re: No reason for this not to work. - by iGetty - 14.01.2012, 19:09
Re: No reason for this not to work. - by Dokins - 14.01.2012, 19:09
Re: No reason for this not to work. - by iGetty - 14.01.2012, 19:11
Re: No reason for this not to work. - by Dokins - 14.01.2012, 19:14
Re: No reason for this not to work. - by iGetty - 14.01.2012, 19:18
Re: No reason for this not to work. - by Dokins - 14.01.2012, 19:23
Re: No reason for this not to work. - by Scenario - 14.01.2012, 19:23
Re: No reason for this not to work. - by Dokins - 14.01.2012, 19:32

Forum Jump:


Users browsing this thread: 1 Guest(s)