Raised This Month: $ Target: $400
 0% 

Headshot plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-13-2007 , 18:03   Re: Headshot plugin
Reply With Quote #5

Code:
#include <amxmodx> #include <fun> #define ADMIN_LEVEL ADMIN_KICK new g_maxplayers, g_head new bool:g_restart_attempt[33] public plugin_init() {     register_plugin("", "", "")     register_concmd("sv_head", "cmd_head", ADMIN_LEVEL)         register_event("ResetHUD", "event_hud_reset", "be")     register_clcmd("fullupdate", "clcmd_fullupdate")     register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in")         g_maxplayers = get_maxplayers() } public cmd_head(id) {     if ( ! ( get_user_flags(id) & ADMIN_LEVEL ) )         return PLUGIN_CONTINUE         new arg[2]     read_argv(1, arg, 1)         if ( arg[0] == '1') {         g_head = 1         for ( new i ; i < g_maxplayers ; i++ ) {             if ( is_user_alive(i) )                 set_user_hitzones(i ,0, 2)         }     }         else if ( arg[0] == '0' ) {         g_head = 0         for ( new i ; i < g_maxplayers ; i++ ) {             if ( is_user_alive(i) )                 set_user_hitzones(i ,0, 255)         }     }         return PLUGIN_HANDLED } public clcmd_fullupdate() {     return PLUGIN_HANDLED } public event_restart_attempt() {     new players[32], num     get_players(players, num, "a")     for ( new i ; i < num ; ++i )         g_restart_attempt[players[i]] = true } public event_hud_reset(id) {     if ( g_restart_attempt[id] ) {         g_restart_attempt[id] = false         return     }     if ( g_head )         set_user_hitzones(id, 0, 2) }

Last edited by [ --<-@ ] Black Rose; 02-13-2007 at 18:06.
[ --<-@ ] Black Rose is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:45.


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