SA-MP Forums Archive
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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Walkstyle (/showthread.php?tid=215821)



Walkstyle - BizzyD - 24.01.2011

Hello. I got a problem with my /walk cmd. It pops up a dialog where you can choose your walking style. But it dosent change.

This is my ondialogresponse code:

pawn Код:
if(dialogid == WALKMENU)
{
    if(listitem == 0)
    {
        SetPlayerWalkingStyle (playerid, WALK_NORMAL);
        SendClientMessage(playerid, COLOR_GREEN, " Your walk has been set!");
    }
    if(listitem == 1)
    {
        SetPlayerWalkingStyle (playerid, WALK_PED);
        SendClientMessage(playerid, COLOR_GREEN, " Your walk has been set!");
    }
    if(listitem == 2)
    {
        SetPlayerWalkingStyle (playerid, WALK_GANGSTA);
        SendClientMessage(playerid, COLOR_GREEN, " Your walk has been set!");
    }
    if(listitem == 3)
    {
        SetPlayerWalkingStyle (playerid, WALK_GANGSTA2);
        SendClientMessage(playerid, COLOR_GREEN, " Your walk has been set!");
    }
    if(listitem == 4)
    {
        SetPlayerWalkingStyle (playerid, WALK_OLD);
        SendClientMessage(playerid, COLOR_GREEN, " Your walk has been set!");
    }
    if(listitem == 5)
    {
        SetPlayerWalkingStyle (playerid, WALK_FAT_OLD);
        SendClientMessage(playerid, COLOR_GREEN, " Your walk has been set!");
    }
    if(listitem == 6)
    {
        SetPlayerWalkingStyle (playerid, WALK_LADY);
        SendClientMessage(playerid, COLOR_GREEN, " Your walk has been set!");
    }
    if(listitem == 7)
    {
        SetPlayerWalkingStyle (playerid, WALK_WHORE);
        SendClientMessage(playerid, COLOR_GREEN, " Your walk has been set!");
    }
    if(listitem == 8)
    {
        SetPlayerWalkingStyle (playerid, WALK_DEFAULT);
        SendClientMessage(playerid, COLOR_GREEN, " Your walk has been set!");
        }
    }
It compiles with no errors. but it dosent set the walking style. Any reason why?

Thanks, Alex


Re: Walkstyle - Grim_ - 24.01.2011

I don't know if I'm completely missing something, because I swear I have seen SetPlayerWalkingStyle function, however after looking through the wiki and SA:MP's libraries, I couldn't.

Is SetPlayerWalkingStyle a custom function? If so, please provide the code.


Re: Walkstyle - Lorenc_ - 24.01.2011

add an if statement to check if a response has came yet like

pawn Код:
if(dialogid == WALKMENU && response)
So that basicly checks if the player responded to it.


EDIT: Grim could be right aswell.