Raised This Month: $ Target: $400
 0% 

Headshot plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tripc
Senior Member
Join Date: Aug 2006
Old 02-12-2007 , 16:55   Headshot plugin
Reply With Quote #1

i want to made plugin when the cvar "sv_head" is "1"
then set_user_hitzones(0 ,0, 2)

when the cvar is 0 "sv_head" is "0"
then set_user_hitzones(0 ,0, 255)

and when someone connect to server check if the "sv_head" is "1/0"
for set the hitzones

Sry of bad english
tripc is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-13-2007 , 11:03   Re: Headshot plugin
Reply With Quote #2

make "sv_head" a command and change a variable to enable/disable mod.
[ --<-@ ] Black Rose is offline
Old 02-13-2007, 17:41
gorgon
This message has been deleted by gorgon.
tripc
Senior Member
Join Date: Aug 2006
Old 02-13-2007 , 17:42   Re: Headshot plugin
Reply With Quote #4

if i was know how to do this
i was do it myself without ask

so i need your help if you can help me
tripc is offline
[ --<-@ ] 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
tripc
Senior Member
Join Date: Aug 2006
Old 02-18-2007 , 15:18   Re: Headshot plugin
Reply With Quote #6

but its concmd not cvar
this taken from hitbot.sma plugin

but i need with cvar not concmd
tripc is offline
Reply



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