Random bug? Again?
#1

Hello,

I had this before with Fishing System which is still not fixed (its own script). Now it occures with engine system to.

pawn Код:
new EngineRandom[][] =
{
    {"* Engine started.", 1 },
    {"* Engine start failed.", 0 }
};
. This is the random

pawn Код:
dcmd_engine(playerid,params[])
{
    #pragma unused params
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(PlayerInfo[vehicleid][EngineRunning] == 0)
        {
            new rand = random(sizeof(EngineRandom));
            SendClientMessage(playerid,COLOR_WHITE,EngineRandom[rand][0]);
            PlayerInfo[vehicleid][EngineRunning] = EngineRandom[rand][1];
            TogglePlayerControllable(playerid,0);
        }
        else if(PlayerInfo[vehicleid][EngineRunning] == 1)
        {
            SendClientMessage(playerid,COLOR_WHITE,"* Engine stopped.");
            TogglePlayerControllable(playerid,0);
            PlayerInfo[vehicleid][EngineRunning] = 0;
        }
    }
    else return SendClientMessage(playerid,COLOR_RED,"* You are not in a vehicle.");
    return 1;
}
And that is the command.

Now it doesnt start the engine, even when it doesnt fail. What is the problem? :S

Regards, Jochem
Reply


Messages In This Thread
Random bug? Again? - by Jochemd - 05.09.2010, 11:11
Re: Random bug? Again? - by iggy1 - 05.09.2010, 11:20
Re: Random bug? Again? - by Hiddos - 05.09.2010, 11:41
Re: Random bug? Again? - by LarzI - 05.09.2010, 11:46
Re: Random bug? Again? - by Jochemd - 05.09.2010, 12:06
Re: Random bug? Again? - by Nero_3D - 05.09.2010, 12:28
Re: Random bug? Again? - by Jochemd - 10.09.2010, 16:43

Forum Jump:


Users browsing this thread: 1 Guest(s)