Simple question rep+
#4

Quote:
Originally Posted by Azzeto
Посмотреть сообщение
I have that their.. But thats to set it to what the current engine state is.

pawn Код:
else if(newstate == PLAYER_STATE_DRIVER)
    {
        new carid = GetPlayerVehicleID(playerid);
        if(Vehicles[carid][Engine] == 0)
        {
            new engine, lights, alarm, doors, bonnet, boot, objective;
            GetVehicleParamsEx(carid, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(carid, 0, lights, false, doors, bonnet, boot, objective);
        }
        else if(Vehicles[carid][Engine] == 1)
        {
            new engine, lights, alarm, doors, bonnet, boot, objective;
            GetVehicleParamsEx(carid, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(carid, 1, lights, false, doors, bonnet, boot, objective);
        }
    }
pawn Код:
else if(newstate == PLAYER_STATE_DRIVER)
    {
        if(VehicleEngine[newcar] == 0) {

            if(!IsNotAEngineCar(newcar)) {
            //new engine,lights,alarm,doors,bonnet,boot,objective,panels,tires;
                GetVehicleParamsEx(newcar,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(newcar,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
                GetVehicleDamageStatus(newcar,panels,doors,lights,tires);
                UpdateVehicleDamageStatus(newcar, panels, doors, 5, tires);
                VehAsk[playerid] = 1;
                SendClientMessage(playerid, COLOR_GREEN, "Engine is not started (/engine)");
                SendClientMessage(playerid, COLOR_GREEN, "If it is a faction vehicle (/fengine)");
            }

        }
See this is mine, and it works.
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: 4 Guest(s)