khain.dev Posted March 16, 2019 Posted March 16, 2019 (edited) Buna tuturor,astazi vreau sa va invat cum sa schimbati mersul skinului,acest sistem este foarte bun pentru comunitati roleplay,codul este optimizat si inteles pentru toti,pentru acest sistem aveti nevoie de include care contine animatiile mersului . CMD:g(playerid, params[]) return cmd_gait(playerid, params); // scurtam dupa dorinta introducerea comenzii CMD:gait(playerid, params[]) { if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_FADE1, "In momentul dat nu poti folosi aceasta comanda!"); // verificam daca jucatorul este in vehicol pentru a bloca comanda if(isnull(params)) // lista cu mersurile care le poti folosi { static const list_gait [] = "\ Simpla\nGangster 1\nGangster 2\nBatrin 1\nBatrin 2\n\ Femeie 1\nFemeie 2\nFemeie 3\nBeat"; new string[sizeof(list_gait)]; // afisam stockul nostru in care sunt indicate mersul sau animatia numiti cum doriti voi format(string, sizeof(string), "%s", list_gait); // ceea ce vom alege din dialog va folosi din stock ShowPlayerDialog(playerid, 2189, DIALOG_STYLE_LIST, "{FFB841}Alege mersul personajului tau", string, "Ok", "Close"); // aici nu cred ca trebuie explicatie return 1; } return SelectGait(playerid, strval(params)-1); } stock SelectGait(const playerid, const animation) // lista cu toate animatiile { switch(animation) { case 0: SetPlayerWalkingStyle (playerid, WALK_PED); case 1: SetPlayerWalkingStyle (playerid, WALK_GANGSTA); case 2: SetPlayerWalkingStyle (playerid, WALK_GANGSTA2); case 3: SetPlayerWalkingStyle (playerid, WALK_OLD); case 4: SetPlayerWalkingStyle (playerid, WALK_FAT_OLD); case 5: SetPlayerWalkingStyle (playerid, WALK_FAT); case 6: SetPlayerWalkingStyle (playerid, WALK_LADY2); case 7: SetPlayerWalkingStyle (playerid, WALK_WHORE); case 8: SetPlayerWalkingStyle (playerid, WALK_WHORE2); case 9: SetPlayerWalkingStyle (playerid, WALK_BLIND); } return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { case 2189: { if(!response) return 1; SelectGait(playerid, listitem); return 1; } return 1; } wstyle.inc Edited March 16, 2019 by #Yudin 1
khain.dev Posted March 23, 2019 Author Posted March 23, 2019 Acum 1 oră, nobilzeusAdv a spus: e in orice bigzone Eu am facut in felul meu si mai optimizat ca cum este in alt GM
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now