16.09.2016, 12:00
I have this on my gamemode:
Код:
stock IsPlayerRunning(playerid) { if(!IsPlayerConnected(playerid) || IsPlayerInAnyVehicle(playerid)) return 0; new keys, updown, leftright; GetPlayerKeys(playerid, keys, updown, leftright); if(keys & KEY_SPRINT && GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_USEJETPACK) return 1; if(GetPlayerAnimationIndex(playerid)) { new animlib[32], animname[32]; GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32); if(!strcmp(animlib, "PED")) { new const names[8][] = { "run_fat", "run_fatold", "run_old", "swat_run", "woman_run", "WOMAN_runbusy", "woman_runpanic", "WOMAN_runsexy" }; for(new i; i < sizeof(names); i++) { if(!strcmp(animname, names[i])) return 1; } } } return 0; }