Advertisement
Guest User

Untitled

a guest
Aug 14th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3.  
  4. public Plugin myinfo =
  5. {
  6. name = "Moosee's Commands",
  7. author = "moosee",
  8. description = "Commands made by moosee",
  9. version = "1.0",
  10. url = "git.tangoworldwide.net/TRMoosee"
  11. };
  12.  
  13. public void OnPluginStart()
  14. {
  15. RegConsoleCmd("sm_heal", Command_Heal, "Heals player");
  16. }
  17.  
  18. public Action Command_Heal(int client, int args)
  19. {
  20. if (args > 1)
  21. {
  22. ReplyToCommand(client, "Just sm_heal");
  23. return Plugin_Handled;
  24. }
  25. if (args == 0)
  26. {
  27. if (IsPlayerAlive(client))
  28. {
  29. ReplyToCommand(client, "You've been healed!");
  30. SetEntityHealth(client, 100);
  31. }
  32. else
  33. {
  34. ReplyToCommand(client, "You're dead!");
  35. }
  36. }
  37. else
  38. {
  39. ReplyToCommand(client, "Just sm_heal");
  40. return Plugin_Handled;
  41. }
  42. return Plugin_Handled;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement