Simple question rep+
#8

Quote:
Originally Posted by Lynn
Посмотреть сообщение
Why would you do that, when you can just do;
pawn Код:
public OnGameModeInit()
{
    ManualVehicleEngineAndLights();
    //Other Stuff here or what-ever.
    return 1;
}
Anyways, do the following:
pawn Код:
public OnGameModeInit()
{
    ManualVehicleEngineAndLights();// Vehicles engines are OFF
    return 1;
}
pawn Код:
CMD:engine(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new carid = GetPlayerVehicleID(playerid);
        new engine, lights, alarm, doors, bonnet, boot, objective;
        if(engine == VEHICLE_PARAMS_ON)
        {
            GetVehicleParamsEx(carid, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(carid, VEHICLE_PARAMS_OFF, lights, false, doors, bonnet, boot, objective);
        }
        else if((engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET))
        {
            GetVehicleParamsEx(carid, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(carid, VEHICLE_PARAMS_ON, lights, false, doors, bonnet, boot, objective);
        }
    }
    return 1;
}
Because there are some cars that should be turned on, and those are accounted for.
Reply


Messages In This Thread
Simple question rep+ - by Azzeto - 12.02.2012, 01:38
Re: Simple question rep+ - by Lilcuete - 12.02.2012, 01:40
Re: Simple question rep+ - by Azzeto - 12.02.2012, 01:45
Re: Simple question rep+ - by Lilcuete - 12.02.2012, 01:56
Re: Simple question rep+ - by Nuke547 - 12.02.2012, 03:02
Re: Simple question rep+ - by nmader - 12.02.2012, 03:07
Re: Simple question rep+ - by Lynn - 12.02.2012, 03:22
Re: Simple question rep+ - by Nuke547 - 12.02.2012, 03:31
Re: Simple question rep+ - by Lynn - 12.02.2012, 03:34

Forum Jump:


Users browsing this thread: 5 Guest(s)