FhenomenN Posted October 2, 2017 Report Share Posted October 2, 2017 Heey, as dorii si eu sa opresc comanda FLY pe buton, adica pe F, daca ma ajutati, voi fii entuziasmat <3 Comanda: fly CMD:fly(playerid) { StartFly(playerid); SetPlayerHealth(playerid, 1000); SendClientMessage(playerid, COLOR_RED, "[Admin]: Flymode a fost activat."); return 1; } Comanda stopfly: CMD:stopfly(playerid) { StopFly(playerid); SetPlayerHealth(playerid, 100); SendClientMessage(playerid, COLOR_RED, "[Admin] Flymode a fost dezactivat."); return 1; } Quote Link to comment Share on other sites More sharing options...
FhenomenN Posted October 2, 2017 Author Report Share Posted October 2, 2017 2 minutes ago, FhenomenN said: Am refacut comanda Fly, deoarece ma incurcasem, si nu mai stiam cum s-o o fak CMD:stopfly(playerid) { StopFly(playerid); SetPlayerHealth(playerid, 100); SendClientMessage(playerid, COLOR_RED, "[ADMIN]:Flymodeul a fost dezactivat."); return 1; } Quote Link to comment Share on other sites More sharing options...
Umbra Posted October 2, 2017 Report Share Posted October 2, 2017 new flymode[MAX_PLAYERS]; la /fly pui flymode[playerid] = 1; la /stopfly pui 0 te duci la OnPlayerKeyStateChange si cauti if (newkeys & KEY_SECONDARY_ATTACK) pui if(flymode[playerid] == 1) { flymode[playerid] = 0; SendClientMessage(playerid, COLOR_DARKPINK, "Fly mode off."); StopFly(playerid); SetPlayerHealthEx(playerid, 100); } Quote Link to comment Share on other sites More sharing options...
FhenomenN Posted October 2, 2017 Author Report Share Posted October 2, 2017 Fii mai explicit ca nu pot INTELEGE Quote Link to comment Share on other sites More sharing options...
PigSmo Posted October 21, 2017 Report Share Posted October 21, 2017 Salutare, daca doresti un videoclip uite-te aici : Pentru inceput faci o variabila cum ar fi: UsedFly[MAX_PLAYERS]; Pentru a face comanda /fly iti trebuie include-ul care il gasesti pe internet. Daca stii sa modifici in el si sa scoti "InitFly(playerid)" ar fii bine deoarece eu nu l-am folosit in comanda de mai jos, mi se pare nefolositor. Incepi si faci comanda. CMD:fly(playerid, params[]) { if(UsedFly[playerid] == 0) { StartFly(playerid); SetPlayerHealth(playerid, 999999); SetPlayerArmour(playerid, 999999); SendClientMessage(playerid, COLOR_RED, "[ADMIN]: Flymode a fost activat."); } if(UsedFly[playerid] == 1) { StopFly(playerid); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 0); SendClientMessage(playerid, COLOR_RED, "[Admin] Flymode a fost dezactivat."); } return 1; } Mergi la OnPlayerKeyStateChange si incepi sa faci verificarea daca apasa pe tasta dorita. Pentru a vedea tastele uite-te pe acest site : http://wiki.sa-mp.com/wiki/Keys if (newkeys & KEY_SECONDARY_ATTACK) { if(UsedFly[playerid] == 1) { StopFly(playerid); UsedFly[playerid] = 0; SetPlayerHealth(playerid, 100); return 1; } } Pentru a nu se face buguri te duci la OnPlayerSpawn si faci verificarea daca are fly on, sa il dezactiveze : if(UsedFly[playerid] == 1) { StopFly(playerid); UsedFly[playerid] = 0; SetPlayerHealth(playerid, 100); } Aceasta merge si la OnPlayerDeath in loc de OnPlayerSpawn. Sper ca ti-am fost de folos. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.