Jump to content

Recommended Posts

Posted (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 by #Yudin
  • Like 1
Posted
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.