Engine Command
#8

What about this?

pawn Код:
CMD:engine(playerid, params[])
{
    new playerstate = GetPlayerState(playerid);
    if(playerstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        new engine, lights, alarm, doors, bonnet, boot, objective;
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);

        if(engine == 1)
        {
            engine = 0;
            SetVehicleParamsEx(vehicleid, 0, 0, alarm, doors, bonnet, boot, 0);
            SendClientMessage(playerid,-1,"The vehicles engine has turned off!");
            return 1;
        }
        else
        {
            engine = 1;
            SetVehicleParamsEx(vehicleid, 1, 1, alarm, doors, bonnet, boot, 0);
            SendClientMessage(playerid,-1,"The vehicles engine has turned off!");
        }
    }
    return 1;
}
Reply


Messages In This Thread
Engine Command - by AnonScripter - 22.09.2013, 20:55
Re: Engine Command - by EiresJason - 22.09.2013, 21:00
Re: Engine Command - by AnonScripter - 22.09.2013, 21:18
Re: Engine Command - by EiresJason - 22.09.2013, 21:24
Re: Engine Command - by AnonScripter - 22.09.2013, 21:48
Re: Engine Command - by EiresJason - 22.09.2013, 21:55
Re: Engine Command - by AnonScripter - 22.09.2013, 22:03
Re: Engine Command - by EiresJason - 22.09.2013, 22:12
Re: Engine Command - by AnonScripter - 22.09.2013, 22:28
Re: Engine Command - by EiresJason - 22.09.2013, 22:33

Forum Jump:


Users browsing this thread: 2 Guest(s)