17.12.2016, 06:50
So, i wrote this code so that people would fall over if shot in either of the legs. It worked and compiled fine but when i tried it ingame it crashed the server and i had to restart to be able to actually do anything again. Would anyone tell me if it's the code? and also how to fix the Animation as it doesnt play through or work properly.
Here's the code;
Here's the code;
Код:
if(weaponid >= 22 && weaponid <= 34 && bodypart == 7 || bodypart == 8) { ApplyAnimation(playerid,"PED","KO_skid_front",4.1, 1, 0, 0, 0, 100, 1); TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, COLOR_RED, "You were shot in the legs, you cant walk properly"); SetTimerEx("damagedlegs", 5000, false, "i", playerid); return 1; } forward damagedlegs(playerid); public damagedlegs(playerid) { TogglePlayerControllable(playerid, 1); KillTimer(damagedlegs(playerid)); return 1; }