Easy Engine system
#6

Untested(entire command):
pawn Код:
CMD:engine(playerid, params[])
{
    new engine, lights, alarm, doors, bonnet, boot, objective, vehicleid = GetPlayerVehicleID(playerid);    
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(Engine[vehicleid] == 0) // change this to your engine variable.
        {
            GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
            SendClientMessage(playerid, COLOUR_HERE, "The engine of this vehicle has been turned on.");
        }
        else if(Engine[vehicleid] == 1) // change this to your engine variable.
        {
            GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
            SendClientMessage(playerid, COLOUR_HERE, "The engine of this vehicle has been turned off.");
        }
    }
        else return SendClientMessage(playerid, COLOUR_HERE, "You must be in a vehicle to use this command.");
    return 1;
}
Reply


Messages In This Thread
Easy Engine system - by Jesper00 - 01.12.2013, 11:41
Re: Easy Engine system - by dannyk0ed - 01.12.2013, 11:42
Re: Easy Engine system - by Jesper00 - 01.12.2013, 11:50
Re: Easy Engine system - by Mitchy - 01.12.2013, 11:54
Re: Easy Engine system - by Jesper00 - 01.12.2013, 11:56
Re: Easy Engine system - by Mitchy - 01.12.2013, 11:59
Re: Easy Engine system - by newbie scripter - 01.12.2013, 12:02
Re: Easy Engine system - by Mitchy - 01.12.2013, 12:05
Re: Easy Engine system - by Jesper00 - 01.12.2013, 12:05

Forum Jump:


Users browsing this thread: 1 Guest(s)