public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart){new Float:pHP;GetPlayerHealth(damagedid, pHP);if((pHP - amount) < 40.0)ApplyAnimation(damagedid, ...)//És a többi dolog, amit akarsz...}
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart){ new Float:pHP; GetPlayerHealth(damagedid, pHP); if((pHP - amount) < 40.0) { PlayerInfo[damagedid][Animban] = 1; //Átállítja a változót 1, azaz true, értékre ApplyAnimation(damagedid, \"SWEET\", \"Sweet_injuredloop\", 4.0, 1, 0, 0, 0, 0, 1); SendClientMessage(playerid, -1(szín amilyet akarsz, most fehér), \"Lábon lőtted!\"); //Aki a sebzést adta annak írja ki SendClientMessage(damagedid, -1, \"Lábon lőttek!\"); //Aki a sebzést kapta annak írja ki //Vagy amilyen animációt akarsz }}
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart){new Float:pHP;GetPlayerHealth(damagedid, pHP);if((pHP - amount) < 40.0 && !PlayerInfo[damagedid][Animban]) {if(bodypart != 7 && bodypart != return 1;PlayerInfo[damagedid][Animban] = 1;TogglePlayerControllable(damagedid, 1);ApplyAnimation(damagedid, \"SWEET\", \"Sweet_injuredloop\", 4.1, 1, 1, 1, 0, 0, 1);SendClientMessage(damagedid, -1, \"RIP Láb!\");}return 1;}
ApplyAnimation(damagedid, \"SWEET\", \"Sweet_injuredloop\", 4.0, 1, 0, 0, 0, 0);
A funkcio parameterei koze ird oda a bodypartot...
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart) { new Float:pHP; GetPlayerHealth(damagedid, pHP); if((pHP - amount) < 40.0 && !PlayerInfo[damagedid][Animban]) { if(bodypart != 7 && bodypart != return 1; PlayerInfo[damagedid][Animban] = 1; TogglePlayerControllable(damagedid, 1); ApplyAnimation(damagedid, \"SWEET\", \"Sweet_injuredloop\", 4.0, 1, 0, 0, 0, 0); SendClientMessage(damagedid, -1, \"RIP Láb!\"); } return 1;}
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart){ new Float:pHP; GetPlayerHealth(damagedid, pHP); if((pHP - amount) < 40.0 && !PlayerInfo[damagedid][Animban]) { if(bodypart != 7 && bodypart != return 1; PlayerInfo[damagedid][Animban] = 1; TogglePlayerControllable(damagedid, 1); ApplyAnimation(damagedid, \"SWEET\", \"Sweet_injuredloop\", 4.0, 1, 0, 0, 0, 0); SendClientMessage(damagedid, -1, \"RIP Láb!\"); } return 1;}