vendredi 15 juillet 2016

How to make a engine to "2"?

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.
Recommended article from FiveFilters.org: Most Labour MPs in the UK Are Revolting.



How to make a engine to "2"?
Old 15/07/2016, 04:54 PM   #1

Big Clucker

 

Join Date: Dec 2012

Posts: 102

Reputation: 7

DefaultHow to make a engine to "2"?

PHP Code:

CMD:engine(playeridparams[])
{
    new 
vehicleid GetPlayerVehicleID(playerid);

    if (!

IsEngineVehicle(vehicleid))
        return 
SendErrorMessage(playerid"You are not in any vehicle.");

    if (

GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
        return 
SendErrorMessage(playerid"You can't do this as you're not the driver.");

    if (

CoreVehicles[vehicleid][vehFuel] < 1)
        return 
SendErrorMessage(playerid"The fuel tank is empty.");

    if (

ReturnVehicleHealth(vehicleid) <= 300)
        return 
SendErrorMessage(playerid"This vehicle is totalled and can't be started.");

    switch (

GetEngineStatus(vehicleid))
    {
        case 
false:
        {
            
SetEngineStatus(vehicleidtrue);
            
ShowPlayerFooter(playerid"You have ~g~started~w~ the engine!");
            
SendNearbyMessage(playerid30.0COLOR_PURPLE"** %s inserts the key into the ignition and starts the engine."ReturnName(playerid0));
        }
        case 
true:
        {
            
SetEngineStatus(vehicleidfalse);
            
ShowPlayerFooter(playerid"You have ~r~stopped~w~ the engine!");
            
SendNearbyMessage(playerid30.0COLOR_PURPLE"** %s inserts the key into the ignition and stops the engine."ReturnName(playerid0));
        }
    }
    return 
1;

how i can make the script to "press 2" and engine starts & STOP
b0b is online now   Reply With Quote

Aucun commentaire:

Enregistrer un commentaire