Two errors with bikes
#1

My first error is that bikes such as the BMX require you to start the engine in order to drive it. However, in the code below, as far as I understand, it should exempt the bikes from requiring the /engine command.

Код:
if(strcmp(cmd,"/engine",true) == 0)
        {
            new engine,lights,alarm,doors,bonnet,boot,objective;
            new vehid = GetPlayerVehicleID(playerid);
            if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
                {
                    if(vehid == 481 || vehid == 509 || vehid == 510)
                        return 1;
                    GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
                    if(engine<=0)
                    {
                GameTextForPlayer(playerid, "~g~Starting the engine...", 1200, 1);
                                SetTimerEx("StartEngine", 1500, 0, "ii", playerid, vehid);
                        }
                        else
                        {
                            GameTextForPlayer(playerid, "~r~Stopping the engine...", 1200, 1);
                                SetTimerEx("StopEngine", 1500, 0, "ii", playerid, vehid);
                        }
                }
        }
My second error is that I want four bicycles to spawn but only one spawns.

Код:
// Bicycles
    AddStaticVehicleEx ( 509, 1687.2222, -2294.1111, 13.5555, 90, 0, 0, 300 );
    AddStaticVehicleEx ( 509, 1687.2222, -3004.1111, 13.5555, 90, 1, 1, 300 );
    AddStaticVehicleEx ( 509, 1687.2222, -3014.1111, 13.5555, 90, 2, 2, 300 );
    AddStaticVehicleEx ( 509, 1687.2222, -3024.1111, 13.5555, 90, 3, 3, 300 );
    AddStaticVehicleEx ( 509, 1687.2222, -3034.1111, 13.5555, 90, 4, 4, 300 );
        return 1;
}
Reply


Messages In This Thread
Two errors with bikes - by JamieVic - 09.06.2013, 11:10
Re: Two errors with bikes - by Sascha - 09.06.2013, 11:12

Forum Jump:


Users browsing this thread: