Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #include <reapi>
- #define ADMIN_FLAG "a"
- public plugin_init()
- {
- register_plugin("amxx_health", "1.0", "mi0")
- register_concmd("amx_health", "CMD_HEALTH", read_flags(ADMIN_FLAG))
- }
- public CMD_HEALTH(id, level, cid)
- {
- if(!cmd_access(id, level, cid, 3))
- return PLUGIN_HANDLED
- new szArg[32], szArg2[16]
- read_argv(1, szArg, charsmax(szArg))
- new iPlayer = cmd_target(id, szArg, 6)
- if(!iPlayer)
- return PLUGIN_HANDLED
- read_argv(2, szArg2, charsmax(szArg2))
- new iAmount = str_to_num(szArg2)
- if(iAmount <= 0)
- return PLUGIN_HANDLED
- set_entvar(iPlayer, var_health, iAmount*1.0)
- return PLUGIN_HANDLED
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement