Then you will go to the Commands place.
pawn Код:
stock SetPlayerWalkingStyle(playerid, style)
{
PlayerInfo[playerid][pWalkStyle] = style;
}
stock GetPlayerWalkingStyle(playerid)
{
return PlayerInfo[playerid][pWalkStyle];
}
forward WalkAnim(playerid);
public WalkAnim(playerid)
{
new keys, updown, leftright;
GetPlayerKeys(playerid,keys,updown,leftright);
if (GetPlayerWalkingStyle(playerid) == WALK_NORMAL)
{
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]);
ApplyAnimation(playerid,"PED","WALK_player",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","WALK_player",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
else if (GetPlayerWalkingStyle(playerid) == WALK_PED)
{
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]);
ApplyAnimation(playerid,"PED","WALK_civi",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","WALK_civi",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
else if (GetPlayerWalkingStyle(playerid) == WALK_GANGSTA)
{
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]);
ApplyAnimation(playerid,"PED","WALK_gang1",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","WALK_gang1",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
else if (GetPlayerWalkingStyle(playerid) == WALK_GANGSTA2)
{
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]);
ApplyAnimation(playerid,"PED","WALK_gang2",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","WALK_gang2",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
else if (GetPlayerWalkingStyle(playerid) == WALK_OLD)
{
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]);
ApplyAnimation(playerid,"PED","WALK_old",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","WALK_old",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
else if (GetPlayerWalkingStyle(playerid) == WALK_FAT_OLD)
{
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]);
ApplyAnimation(playerid,"PED","WALK_fatold",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","WALK_fatold",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
else if (GetPlayerWalkingStyle(playerid) == WALK_FAT)
{
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]);
ApplyAnimation(playerid,"PED","WALK_fat",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","WALK_fat",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
else if (GetPlayerWalkingStyle(playerid) == WALK_LADY)
{
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]);
ApplyAnimation(playerid,"PED","WOMAN_walknorm",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","WOMAN_walknorm",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
else if (GetPlayerWalkingStyle(playerid) == WALK_LADY2)
{
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]);
ApplyAnimation(playerid,"PED","WOMAN_walkbusy",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","WOMAN_walkbusy",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
else if (GetPlayerWalkingStyle(playerid) == WALK_WHORE)
{
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]);
ApplyAnimation(playerid,"PED","WOMAN_walkpro",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","WOMAN_walkpro",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
else if (GetPlayerWalkingStyle(playerid) == WALK_WHORE2)
{
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]);
ApplyAnimation(playerid,"PED","WOMAN_walksexy",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","WOMAN_walksexy",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
else if (GetPlayerWalkingStyle(playerid) == WALK_DRUNK)
{
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]);
ApplyAnimation(playerid,"PED","WALK_drunk",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","WALK_drunk",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
else if (GetPlayerWalkingStyle(playerid) == WALK_BLIND)
{
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]);
ApplyAnimation(playerid,"PED","Walk_Wuzi",4.1,1,1,1,1,1);
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
else ApplyAnimation(playerid,"PED","Walk_Wuzi",4.0,0,0,0,0,1), KillTimer(walktime[playerid]);
}
return true;
}