Advertisement
eeli

Untitled

Oct 16th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public void OnPluginStart()
  2. {
  3. HookEvent("player_hurt", Player_Life);
  4. }
  5.  
  6. public Action Player_Life(Handle event, const char[] name, bool dontBroadcast)
  7. {
  8. int attacked = GetClientOfUserId(GetEventInt(event, "userid"));
  9. int iLife = GetClientHealth(attacked);
  10.  
  11. if (!IsClientInGame(attacked))
  12. {
  13. PrintToChat(attacked, "Rejoins les T ou CT");
  14. return Plugin_Handled;
  15. }
  16. else if(IsClientInGame(attacked))
  17. {
  18. SetHudTextParams(0.043, -1.0, 1000.0, 5, 200, 255, 50, 2, 6.0, 0.1, 0.1);
  19. ShowHudText(attacked, -1, "HP: %s", iLife);
  20.  
  21. return Plugin_Handled;
  22. }
  23.  
  24. return Plugin_Continue;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement