Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdktools>
- public Plugin myinfo =
- {
- name = "Moosee's Commands",
- author = "moosee",
- description = "Commands made by moosee",
- version = "1.0",
- url = "git.tangoworldwide.net/TRMoosee"
- };
- public void OnPluginStart()
- {
- RegConsoleCmd("sm_heal", Command_Heal, "Heals player");
- }
- public Action Command_Heal(int client, int args)
- {
- if (args > 1)
- {
- ReplyToCommand(client, "Just sm_heal");
- return Plugin_Handled;
- }
- if (args == 0)
- {
- if (IsPlayerAlive(client))
- {
- ReplyToCommand(client, "You've been healed!");
- SetEntityHealth(client, 100);
- }
- else
- {
- ReplyToCommand(client, "You're dead!");
- }
- }
- else
- {
- ReplyToCommand(client, "Just sm_heal");
- return Plugin_Handled;
- }
- return Plugin_Handled;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement