Jump to content
  • 0

/fixveh


GiGiMuScHi

Question

3 answers to this question

Recommended Posts

[tt]public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

{

    if(PRESSED(KEY_x))

    {

        if(IsPlayerInAnyVehicle(playerid))

        {

            RepairVehicle(GetPlayerVehicleID(playerid));

            SendClientMessage(playerid, 0xFFFFFFFF, "Vehicle Fixed !");

        }

    }

return 1;

}[/tt]

In loc de  KEY_x schimbi cu key de aici http://wiki.sa-mp.com/wiki/GetPlayerKeys

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Link to comment
Share on other sites

Guest RockStar

Cum as putea ca la o comanda, sa pui o tasta.exemplu /fixvef sa fie tasta 1 ca sa nu mai scriu /fixveh ci doar sa apes doar tasta 1 si masina sa fie ca noua?Ma puteti ajuta.

Nu exista butonul 1 in San Andreas, dar poti face pe 2 este mult mai usor deoarece este chiar deasupra la "W"...

Uite codu:

public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )

{

    if( PRESSED( KEY_SUBMISSION ) )

    {

        if( IsPlayerInAnyVehicle( playerid ) )

        {

            RepairVehicle( GetPlayerVehicleID( playerid ) );

            // SendClientMessage( playerid, -1, "Vehicle Fixed !");

            // Nu are rost sa pun SendClientMessage deoarce va spama chatul degeaba...

        }

    }

  return 1;

}

PS: Mersi @-IcE- pentru cod, eu doar lam editat putin, imi era lene sa il scriu :P

Link to comment
Share on other sites

Poti face asa pentru nu a Spama:

public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )

{

new Float:health; GetVehicleHealth( GetPlayerVehicleID( playerid ), health );

if( PRESSED( KEY_SUBMISSION ) )

{

if(health < 1000)

{

if( IsPlayerInAnyVehicle( playerid ) )

{

RepairVehicle( GetPlayerVehicleID( playerid ) );

SendClientMessage( playerid, -1, "Vehicle Fixed !");

}

}

}

return ( 1 );

}

142sj0l.png

Underground-GFX

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.