AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   1hp plugin (https://forums.alliedmods.net/showthread.php?t=19424)

broertje 10-16-2005 15:34

1hp plugin
 
How Can I Set It So Everbody Has 1hp All Rounds Untill Admin Use amx_1hp 0
Code:
#include <fun> #include <amxmodx> #include <amxmisc> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_concmd("amx_1hp","1hp",ADMIN_LEVEL_A,"- 1hp mode") public 1hp(id) {   if (!(get_user_flags(id)&ADMIN_LEVEL_A)) {             }else{           set_user_health(id, 1)             }   }

Zenith77 10-16-2005 15:41

Ok Just a note, you must include amxmodx before ANYTHING else

Code:
#inlcude <anxmodx> #include <amxmisc> #include <fun> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_concmd("amx_1hp","1hp",ADMIN_LEVEL_A,"- 1hp mode") } public 1hp(id, level, cid)   {       if( !cmd_access(id, level, cid, 1) ) return PLUGIN_HANDLED                 for( new i = 1; i<get_maxplayers(); i++) {                 if( !is_user_connected(i) ) continue                 set_user_health(i, 1)                     }   }

XxAvalanchexX 10-16-2005 16:18

Code:
public plugin_init() {    register_event("ResetHUD","event_resethud","b"); } public event_resethud(id) {    set_user_health(id,1); }

perhaps?

Zenith77 10-16-2005 16:22

but what if he doesnt want it all the time? Just when they enter that command.

XxAvalanchexX 10-16-2005 17:16

Then add some kind of cvar control, I was just showing how to automatically do it every round.

Hawk552 10-16-2005 18:06

Look for my "License to Kill" plugin.


All times are GMT -4. The time now is 23:56.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.