GiGiMuScHi Posted July 10, 2011 Report Share Posted July 10, 2011 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. Respecta Si Vei Fi Respectat !!! Link to comment Share on other sites More sharing options...
IcE. Posted July 10, 2011 Report Share Posted July 10, 2011 [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 More sharing options...
Guest RockStar Posted July 10, 2011 Report Share Posted July 10, 2011 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 More sharing options...
Roach Posted July 11, 2011 Report Share Posted July 11, 2011 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 );} Underground-GFX Link to comment Share on other sites More sharing options...
Question
GiGiMuScHi
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.
Respecta Si Vei Fi Respectat !!!
Link to comment
Share on other sites
3 answers to this question
Recommended Posts