SA-MP Forums Archive
[FilterScript] Walking Styles - For Roleplay servers - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Walking Styles - For Roleplay servers (/showthread.php?tid=510236)



Walking Styles - For Roleplay servers - Parallex - 30.04.2014

Walking Styles Filterscript by BenJackster

Simple but useful.


Introduction:

This is my old Filterscript, and gladly - this is my second release. Well, it's my first release of an Filterscript so please do not judge me. If you're gonna use it, give me credits, and please do not remove the credits.

Screenshot:

When you type the command '/ws'.



Download & How to install:

Downloads:

Walking Style's .amx file - Solidfiles.com
Walking Style's .pwn file - Solidfiles.com
Walking Style's .amx file - mediafire.com
Walking Style's .pwn file - mediafire.com

Installing:

After you've downloaded those 2 files, paste them into the Filterscript's folder. After you've done that, open server.cfg and go to the Filterscripts line.
Type "walkingstyles" infront of it, and save the server.cfg. Restart your server and enjoy it.

Using them In-Game:

Type the command "/ws" and a dialog would display. Choose your walking style and walk like an O.G.

Current Known Bugs:

No bugs at all.

Credits:

Me (Ben Jackster) for making this script.
Kalcor and the SA-MP team for SA-MP.

__________________________________________________ _________________________________________

Well, that's it! Enjoy it and don't remove the credits. Also, don't forget to rep me.


Re: Walking Styles - For Roleplay servers - Parallex - 30.04.2014

Anybody?


Re: Walking Styles - For Roleplay servers - Pottus - 30.04.2014

Why not do this? Less checking.

pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_WALK)
    {
        if( ((newkeys & KEY_UP) || (newkeys & KEY_DOWN) || (newkeys & KEY_LEFT) || (newkeys & KEY_RIGHT) ||
            (oldkeys & KEY_UP) || (oldkeys & KEY_DOWN) || (oldkeys & KEY_LEFT) || (oldkeys & KEY_RIGHT)) &&
            GetPlayerState(playerid) == PLAYER_STATE_ONFOOT ) walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
    }
    else if(oldkeys & KEY_WALK)
    {
   
        if( ((newkeys & KEY_UP) || (newkeys & KEY_DOWN) || (newkeys & KEY_LEFT) || (newkeys & KEY_RIGHT)) &&
            GetPlayerState(playerid) == PLAYER_STATE_ONFOOT ) walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
    }
    return 1;
}



Re: Walking Styles - For Roleplay servers - satafinix - 30.04.2014

Quote:
Originally Posted by [uL]Pottus
View Post
Why not do this? Less checking.

pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_WALK)
    {
        if( ((newkeys & KEY_UP) || (newkeys & KEY_DOWN) || (newkeys & KEY_LEFT) || (newkeys & KEY_RIGHT) ||
            (oldkeys & KEY_UP) || (oldkeys & KEY_DOWN) || (oldkeys & KEY_LEFT) || (oldkeys & KEY_RIGHT)) &&
            GetPlayerState(playerid) == PLAYER_STATE_ONFOOT ) walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
    }
    else if(oldkeys & KEY_WALK)
    {
   
        if( ((newkeys & KEY_UP) || (newkeys & KEY_DOWN) || (newkeys & KEY_LEFT) || (newkeys & KEY_RIGHT)) &&
            GetPlayerState(playerid) == PLAYER_STATE_ONFOOT ) walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
    }
    return 1;
}
Mybe Are same Dude


Re: Walking Styles - For Roleplay servers - dionisak0s - 05.08.2014

I have a question, when the player will log off and connect into the server will the walking style save? Does the same thing applies if the server will restart?


Re: Walking Styles - For Roleplay servers - Beckett - 05.08.2014

A pastebin link would be a good idea.


Re: Walking Styles - For Roleplay servers - PiLLoW - 05.08.2014

Nice


Re: Walking Styles - For Roleplay servers - iFarbod - 05.08.2014

Not bad.


Re: Walking Styles - For Roleplay servers - TheKalle011 - 05.08.2014

Nice work mate, keep it up!


Re: Walking Styles - For Roleplay servers - 2014 - 05.08.2014

smart