Jump to content
  • 0

ajutor scripting


ExTaZ

Question

6 answers to this question

Recommended Posts

Pune

[pawn]

new bool: gEngineStatus[MAX_PLAYERS char];

[/pawn]

undeva sus, fiind o variabila globala.

[pawn]

ManualVehicleEngineAndLights();

[/pawn]

Merge in OnGameModeInit(), iar comanda /engine ar arata cam asa:

[pawn]

CMD:engine(playerid, cmdtext[])

{

    new engine, lights, alarm, doors, bonnet, boot, objective;

 

    gEngineStatus{playerid} = !gEngineStatus{playerid};

    if(gEngineStatus{playerid})

    {

        GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);

SetVehicleParamsEx(GetPlayerVehicleID(playerid), true, lights, alarm, doors, bonnet, boot, objective);

        // aici poti sa adaugi un mesaj, gen motorul masinii a fost pornit, etc..

        return 1;

    }

    else

    {

        GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);

SetVehicleParamsEx(GetPlayerVehicleID(playerid), false, lights, alarm, doors, bonnet, boot, objective);

        // alt mesaj, de data aceasta motorul a fost oprit...

        return 1;

    }

    return 1;

}

[/pawn]

http://bitly.com/UbKXwR

Inregistreaza-te si ai sansa sa castigi $50 dintr-un foc! (PayPal/Payza)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.