Rather confusing error...
#2

Nevermind, I just found my careless flaw, it was the placing of my defining of the Engine.

--------------------------------------------------------------------------
EDIT:
--------------------------------------------------------------------------
I editted it to this code:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new playerState = GetPlayerState(playerid);
    new veh = GetPlayerVehicleID(playerid);
    new
            engine,
            lights,
            alarm,
            doors,
            bonnet,
            boot,
            objective;
    if(newkeys & KEY_HANDBRAKE && playerState == PLAYER_STATE_DRIVER)
    {
        GetVehicleParamsEx(veh, engine,  lights, alarm, doors, bonnet, boot, objective);
        if(veh, 0, 0, 0, 0, 0, 0)
        {
            GameTextForPlayer(playerid, "~G~Engine On!", 50000, 3);

            new
                engine,
                lights,
                alarm,
                doors,
                bonnet,
                boot,
                objective;

            GetVehicleParamsEx(veh, engine,  lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(veh, 1, lights, alarm, doors, bonnet, boot, objective);
        }
    }
    return 1;
}
It compiled with no errors, I go to test it, and it does not work, I want the engine to go on if the engine is off, along with showing the GameTextForPlayer IF it is JUST turning the engine on, not everytime I press my KEY_HANDBRAKE.
Reply


Messages In This Thread
Rather confusing error...[+Rep] - by nmader - 13.02.2012, 22:47
Re: Rather confusing error... - by nmader - 13.02.2012, 22:50
Re: Rather confusing error... - by nmader - 14.02.2012, 00:19
Re: Rather confusing error... - by SuperViper - 14.02.2012, 00:34
Re: Rather confusing error... - by nmader - 14.02.2012, 00:40
Re: Rather confusing error... - by trapped1 - 14.02.2012, 00:48
Re: Rather confusing error... - by nmader - 14.02.2012, 00:51
Re: Rather confusing error... - by trapped1 - 14.02.2012, 00:56

Forum Jump:


Users browsing this thread: 1 Guest(s)