Engine CMD is bugged
#2

Try using this, it is not tested.

pawn Код:
CMD:aengine(playerid, params[])
{
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SCM(playerid, -1, "You need to be the driver of the vehicle");
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
    if(IsAnOwnableCar(GetPlayerVehicleID(playerid)))
    {
        if(PlayerInfo[playerid][pPcarkey] == GetPlayerVehicleID(playerid) || PlayerInfo[playerid][pPcarkey2] == GetPlayerVehicleID(playerid))
        {
            if(engine == 1)
            {
                SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, lights, alarm, doors, bonnet, boot, objective);
                 SCM(playerid, COLOR_LIGHTRED, "You have turned the engine off");
            }
            else if(engine == 0)
            {
                SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, lights, alarm, doors, bonnet, boot, objective);
                SCM(playerid, COLOR_LIGHTRED, "You have turned the engine on");
            }
        }
        else
        {
            SCM(playerid, COLOR_LIGHTRED, "You do not have the keys to this vehicle. However, you may attempt to /hotwire it.");
        }
    }
    return 1;
}
Reply


Messages In This Thread
Engine CMD is bugged - by UnknownGamer - 09.03.2013, 18:18
Re: Engine CMD is bugged - by Denying - 09.03.2013, 19:21

Forum Jump:


Users browsing this thread: 1 Guest(s)