SA-MP Forums Archive
Change walkstyle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Change walkstyle (/showthread.php?tid=319032)



Change walkstyle - N0FeaR - 17.02.2012

I have make cmd for change walkstyle but how can i make when i press Alt so he walking to that walkstyle i change to?


Re: Change walkstyle - Twisted_Insane - 17.02.2012

You don't need any command!

Under the callback "OnGameModeInit" simply add this line:

pawn Код:
UsePlayerPedAnims();
Hope I could help!


Re: Change walkstyle - N0FeaR - 17.02.2012

this just for CJ run UsePlayerPedAnims();

i have cmd so you can like change walk sytle to like a girl when you a guy.


Re: Change walkstyle - Twisted_Insane - 17.02.2012

Lol, what?
If you use "UsePlayerPedAnims();", then every play will walk like CJ, it doesn't matter if it's a girl or not! If you don't use the function, every player will walk like the NPCs in the Singleplayer!


Re: Change walkstyle - Toreno - 17.02.2012

Try this, not tested though;
pawn Код:
#define HOLDING(%0) ((newkeys & (%0)) == (%0))
#define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new udlr, ud, lr;
    GetPlayerKeys(playerid, udlr, ud, lr);
    if(HOLDING(KEY_WALK) && ud > 0 || HOLDING(KEY_WALK) && ud < 0 || HOLDING(KEY_WALK) && lr > 0 || HOLDING(KEY_WALK) && lr < 0) {
        // Once a player presses ALT and one of the arrows.
    } else if(RELEASED(KEY_WALK)) {
        // Once a player releases ALT.
    }
    return 1;
}



Re: Change walkstyle - Zarky - 17.02.2012

He Means, He Wants to Choose his walking Style By Press LALT(Every time he Presses ALT It Changes)


Re: Change walkstyle - Konstantinos - 17.02.2012

ApplyAnimation > Animations Then Ctrl + F and write on the search box "walk" and press Enter.
It has 56 results.


Re: Change walkstyle - N0FeaR - 18.02.2012

Quote:
Originally Posted by Dwane
Посмотреть сообщение
ApplyAnimation > Animations Then Ctrl + F and write on the search box "walk" and press Enter.
It has 56 results.
How can i sricpt is so after you change and you press alt the walk button you walk like that you change to here is an ec



Re: Change walkstyle - N0FeaR - 18.02.2012

I have a there you can change already but when you change only change when you type /walk i want it so works when you hold down alt

pawn Код:
}
            if(strcmp(x_nr,"1",true) == 0)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GREEN, "USAGE: /setstyle 1 [StyleID]");
                    SendClientMessage(playerid, COLOR_WHITE, "Walk Styles: 1,2,3,4,5,6,7,8,9");
                    SendClientMessage(playerid, COLOR_WHITE, "Walk Styles: 10,11,12,13,14,15,16");
                    SendClientMessage(playerid, COLOR_WHITE, "Walk Styles: 17,18");
                    return 1;
                }
                new walkstyle;
                walkstyle = strval(tmp);
                if(walkstyle < 1 || walkstyle > 18)
                {
                    return 1;
                }
                if(walkstyle > 2 && PlayerInfo[playerid][pDonator] == 0)
                {
                    SendClientMessage(playerid,COLOR_GREY,"   This is a donator feature only !");
                    return 1;
                }
                PlayerInfo[playerid][pWalk] = walkstyle;
                format(string, sizeof(string), "You have set your walking style to: %d", walkstyle);
                SendClientMessage(playerid, COLOR_WHITE, string);
                return 1;



Re: Change walkstyle - N0FeaR - 20.02.2012

Bump this.