Walking styles..
#1

Hey..

So i am trying to put in walking styles but im having trouble.. What happens is when a player purchases a walking style and then then do /usewalkstyle and choose which one they want to use it automatically ApplyAnimation and i dont want that.. I want it so when a player chooses what walk style they want to use it open happens when they walk and the text draw does not pop up..

This is what i have..

pawn Code:
command(buywalkstyle, playerid, params[])
{
    if(Businesses[Player[playerid][InBusiness]][bType] == 10)
    {
        ShowPlayerDialog(playerid, 4595, DIALOG_STYLE_LIST, "Walking Stlyes", "Gangsta Walk One($2500)\nGangsta Walk Two($2500)\nMuscle Walk($2500)\nSneaky Walk($2500)", "Select", "Cancel");
    }
    return 1;
}
pawn Code:
case 4595:
            {
                switch(listitem)
                {
                    case 0:
                    {
                        if(Player[playerid][GangWalkOne] == 0)
                        {
                            if(Player[playerid][Money] >= 2500)
                            {
                                Player[playerid][Money] -= 2500;
                                Player[playerid][GangWalkOne] = 1;
                                Businesses[Player[playerid][InBusiness]][bVault] += 2500;
                                SendClientMessage(playerid, WHITE, "You have purchased the Gangsta Walk One Style (type /usewalkstyle).");
                            }
                            else
                            {
                                SendClientMessage(playerid, WHITE, "You do not have enough money.");
                            }
                        }
                        else
                        {
                            SendClientMessage(playerid, WHITE, "You already have this style.");
                        }
                    }
                    case 1:
                    {
                        if(Player[playerid][GangWalkTwo] == 0)
                        {
                            if(Player[playerid][Money] >= 2500)
                            {
                                Player[playerid][Money] -= 2500;
                                Player[playerid][GangWalkTwo] = 1;
                                Businesses[Player[playerid][InBusiness]][bVault] += 2500;
                                SendClientMessage(playerid, WHITE, "You have purchased the Gangsta Walk Two Style (type /usewalkstyle).");
                            }
                            else
                            {
                                SendClientMessage(playerid, WHITE, "You do not have enough money.");
                            }
                        }
                        else
                        {
                            SendClientMessage(playerid, WHITE, "You already have this style.");
                        }
                    }
                    case 2:
                    {
                        if(Player[playerid][MuscleWalk] == 0)
                        {
                            if(Player[playerid][Money] >= 2500)
                            {
                                Player[playerid][Money] -= 200;
                                Player[playerid][MuscleWalk] = 1;
                                Businesses[Player[playerid][InBusiness]][bVault] +=2500;
                                SendClientMessage(playerid, WHITE, "You have purchased the Muscle Walk Style (type /usewalkstyle).");
                            }
                            else
                            {
                                SendClientMessage(playerid, WHITE, "You do not have enough money.");
                            }
                        }
                        else
                        {
                            SendClientMessage(playerid, WHITE, "You already have this style.");
                        }
                    }
                    case 3:
                    {
                        if(Player[playerid][SneakyWalk] == 0)
                        {
                            if(Player[playerid][Money] >= 2500)
                            {
                                Player[playerid][Money] -= 2500;
                                Player[playerid][SneakyWalk] = 1;
                                Businesses[Player[playerid][InBusiness]][bVault] += 2500;
                                SendClientMessage(playerid, WHITE, "You have purchased the Sneaky Walk Style (type /usewalkstyle).");
                            }
                            else
                            {
                                SendClientMessage(playerid, WHITE, "You do not have enough money.");
                            }
                        }
                        else
                        {
                            SendClientMessage(playerid, WHITE, "You already have this style.");
                        }
                    }
                }
            }
pawn Code:
command(usewalkstyle, playerid, params[])
{
    ShowPlayerDialog(playerid, 4597, DIALOG_STYLE_LIST, "Walking Styles", "Gangsta Walk One\nGangsta Walk Two\nMuscle Walk\nSneaky Walk", "Select", "Cancel");
    return 1;
}
pawn Code:
case 4597:
            {
                switch(listitem)
                {
                    case 0:
                    {
                        if(Player[playerid][GangWalkOne] == 1)
                        {
                            ApplyAnimationEx(playerid, "PED", "WALK_gang1", 4.0, 1, 1, 1, 1, 1);
                        }
                        else
                        {
                            SendClientMessage(playerid, WHITE, "Please purchase this style from a Gym first.");
                        }
                    }
                    case 1:
                    {
                        if(Player[playerid][GangWalkTwo] == 1)
                        {
                            ApplyAnimationEx(playerid, "PED", "WALK_gang2", 4.0, 1, 1, 1, 1, 1);
                        }
                        else
                        {
                            SendClientMessage(playerid, WHITE, "Please purchase this style from a Gym first.");
                        }
                    }
                    case 2:
                    {
                        if(Player[playerid][MuscleWalk] == 1)
                        {
                            ApplyAnimationEx(playerid, "MUSCULAR", "MuscleWalk", 4.0, 1, 1, 1, 1, 1);
                        }
                        else
                        {
                            SendClientMessage(playerid, WHITE, "Please purchase this style from a Gym first.");
                        }
                    }
                    case 3:
                    {
                        if(Player[playerid][SneakyWalk] == 1)
                        {
                            ApplyAnimationEx(playerid, "PED", "Player_Sneak", 4.0, 1, 1, 1, 1, 1);
                        }
                        else
                        {
                            SendClientMessage(playerid, WHITE, "Please purchase this style from a Gym first.");
                        }
                    }
                }
            }
If you need any more code just post here

Thanks
Reply
#2

You didn't really explain your problem very smell, or atleast you worded it poorly.. what I got from what you said was you didn't want the gametext/label appearing when they use walk animation.. if so, its probably to due with ApplyAnimationEx, seeing as its a custom function.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)