ZahidShiraz

firstaidkitused

Sep 5th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. forward FirstAidUpdate(playerid);
  2. public FirstAidUpdate(playerid)
  3. {
  4. static
  5. Float:health;
  6.  
  7. GetPlayerHealth(playerid, health);
  8.  
  9. if (!IsPlayerInAnyVehicle(playerid) && GetPlayerAnimationIndex(playerid) != 1508)
  10. ApplyAnimation(playerid, "SWAT", "gnstwall_injurd", 4.0, 1, 0, 0, 0, 0);
  11.  
  12. if (health >= 95.0)
  13. {
  14. SetPlayerHealth(playerid, 100.0);
  15. SendServerMessage(playerid, "Your first aid kit has been used up.");
  16.  
  17. if (!IsPlayerInAnyVehicle(playerid)) {
  18. PlayerData[playerid][pLoopAnim] = true;
  19. ShowPlayerFooter(playerid, "Press ~y~SPRINT~w~ to stop the animation.");
  20. }
  21. PlayerData[playerid][pBleeding] = 0;
  22. PlayerData[playerid][pBleedTime] = 0;
  23.  
  24. PlayerData[playerid][pFirstAid] = false;
  25. KillTimer(PlayerData[playerid][pAidTimer]);
  26. }
  27. else {
  28. SetPlayerHealth(playerid, floatadd(health, 4.0));
  29. }
  30. return 1;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment