Jump to content

[Tutorial] Cum sa schimbi mersul skinului


Recommended Posts

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
[ Anti Flood Pack ] / Click [ Pugb SA:MP ] Click / [ TD Autorizatie ] Click
[ Created dm zone ] Click / [ Salvare vreme si timp ] Click [ Statistica a serverului ] Click
[ Sistema duel ] Click [ TD Registrare/Autorizatie ] Click [ Sistema kill/killed by ] Click
[ Sistema data si ora Click /  [ GM Anticheat ] Click   /  [ Schimbarea mersului ] Click
[ Save Camera ] Click  [ Sitema Concurs ] Click [ Projector pentru elicopter ] Click /
[ DM Zona ] Click / [ Folosirea textelor lungi ] Click / [Khain RPG] Click  / Antisobeit Click
Link to post
Share on other sites

Pareri?

[ Anti Flood Pack ] / Click [ Pugb SA:MP ] Click / [ TD Autorizatie ] Click
[ Created dm zone ] Click / [ Salvare vreme si timp ] Click [ Statistica a serverului ] Click
[ Sistema duel ] Click [ TD Registrare/Autorizatie ] Click [ Sistema kill/killed by ] Click
[ Sistema data si ora Click /  [ GM Anticheat ] Click   /  [ Schimbarea mersului ] Click
[ Save Camera ] Click  [ Sitema Concurs ] Click [ Projector pentru elicopter ] Click /
[ DM Zona ] Click / [ Folosirea textelor lungi ] Click / [Khain RPG] Click  / Antisobeit Click
Link to post
Share on other sites
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

[ Anti Flood Pack ] / Click [ Pugb SA:MP ] Click / [ TD Autorizatie ] Click
[ Created dm zone ] Click / [ Salvare vreme si timp ] Click [ Statistica a serverului ] Click
[ Sistema duel ] Click [ TD Registrare/Autorizatie ] Click [ Sistema kill/killed by ] Click
[ Sistema data si ora Click /  [ GM Anticheat ] Click   /  [ Schimbarea mersului ] Click
[ Save Camera ] Click  [ Sitema Concurs ] Click [ Projector pentru elicopter ] Click /
[ DM Zona ] Click / [ Folosirea textelor lungi ] Click / [Khain RPG] Click  / Antisobeit Click
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.