[Tutorial] Player Walk Style
#4

Thank you for the tutorial! You could have just make this to simplify the whole idea.

PHP код:
CMD:walkstyle(playeridparams[])
{
    if(
strval(params) < || strval(params) > 11)
        return 
SendClientMessage(playeridCOLOR_WHITE"USAGE: /walkstyle [1-11]");
        
    
SetPlayerWalkingStyle(playeridstrval(params));
    return 
1;

And making the public even shorter -
PHP код:
forward WalkAnim(playerid);
public 
WalkAnim(playerid)
{
    new 
keysupdownleftright;
    
GetPlayerKeys(playerid,keys,updown,leftright);
    if ((
keys KEY_WALK && updown KEY_UP) || (keys KEY_WALK && updown KEY_DOWN) || (keys KEY_WALK && leftright KEY_LEFT) || (keys KEY_WALK && leftright KEY_RIGHT))
    {
        
KillTimer(walktime[playerid]);
        switch(
GetPlayerWalkingStyle(playerid))
        {
            case 
1ApplyAnimation(playerid,"PED","WALK_player",4.1,1,1,1,1,1);
            case 
2ApplyAnimation(playerid,"PED","WALK_civi",4.1,1,1,1,1,1);
            case 
3ApplyAnimation(playerid,"PED","WALK_gang1",4.1,1,1,1,1,1);
            case 
4ApplyAnimation(playerid,"PED","WALK_gang2",4.1,1,1,1,1,1);
            case 
5ApplyAnimation(playerid,"PED","WALK_old",4.1,1,1,1,1,1);
            case 
6ApplyAnimation(playerid,"PED","WALK_fatold",4.1,1,1,1,1,1);
            case 
7ApplyAnimation(playerid,"PED","WALK_fat",4.1,1,1,1,1,1);
            case 
8ApplyAnimation(playerid,"PED","WOMAN_walknorm",4.1,1,1,1,1,1);
            case 
9ApplyAnimation(playerid,"PED","WOMAN_walkbusy",4.1,1,1,1,1,1);
            case 
10ApplyAnimation(playerid,"PED","WOMAN_walkpro",4.1,1,1,1,1,1);
            case 
11ApplyAnimation(playerid,"PED","WOMAN_walksexy",4.1,1,1,1,1,1);
            case 
12ApplyAnimation(playerid,"PED","Walk_Wuzi",4.1,1,1,1,1,1);
            default: 
ClearAnimations(playerid);
        }
        
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
    }
    return 
true;

Reply


Messages In This Thread
Make Custom Player Walk Style (in FS) - by mahardika - 06.03.2014, 00:18
Re: Player Walk Style - by Krisna - 06.03.2014, 00:54
Re: Player Walk Style - by mahardika - 06.03.2014, 03:52
Re: Player Walk Style - by CrazyFrenzy - 06.03.2014, 04:21
Re: Player Walk Style - by RenovanZ - 06.03.2014, 04:22
Re: Player Walk Style - by mahardika - 06.03.2014, 05:31
Re: Player Walk Style - by mahardika - 06.03.2014, 05:42
Re: Player Walk Style - by VenomMancer - 06.03.2014, 07:52
Re: Player Walk Style - by mahardika - 06.03.2014, 23:04
Re: Player Walk Style - by mahardika - 07.03.2014, 07:02

Forum Jump:


Users browsing this thread: 1 Guest(s)