walk and run
#1

Is it possible to make a command with run and walk?

So when I use /walk it will walk like you are pressing alt and if I use /walk again it will do normal run.
Reply
#2

Try This One,

New Variable,
Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
Enum,
Код:
enum pInfo
{
    bool:WalkingStyle
};
OnPlayerConnect Callback:
pawn Код:
public OnPlayerConnect(playerid)
{
        PlayerInfo[playerid][WalkingStyle] = false;
}
OnPlayerDisconnect Callback:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
        PlayerInfo[playerid][WalkingStyle] = false;
}
Command's Code,
pawn Код:
CMD:walk(playerid, params[])
{
    new string[300];
    if(PlayerInfo[playerid][WalkingStyle] == false)
    {
        ApplyAnimation(playerid,"PED","WALK_civi",4.1,1,1,1,1,1);
        format(string, sizeof(string), "{FF0000}<!> {EEEEEE}You've Enabled Walking Style.");
        SendClientMessage(playerid, -1, string);
        PlayerInfo[playerid][WalkingStyle] = true;
    }
    else if(PlayerInfo[playerid][WalkingStyle] == true)
    {
        ClearAnimations(playerid);
        ApplyAnimation(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
        format(string, sizeof(string), "{FF0000}<!> {EEEEEE}You've Disabled Walking Style.");
        SendClientMessage(playerid, -1, string);
        PlayerInfo[playerid][WalkingStyle] = false;
    }
    return 1;
}
Reply
#3

Now my pawno stop from reponsind (Not Responding) Ihave waiting for almost 5 minutes
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)