Raised This Month: $ Target: $400
 0% 

Is a Bug ? O.o Help Me please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
moises9633
Senior Member
Join Date: Nov 2008
Old 07-12-2010 , 11:18   Is a Bug ? O.o Help Me please
Reply With Quote #1

Good Morning to all
I was practicing with the plugin "Aim Practice", but has a problem this plugin, when activated, and another player enters the server it can kill without Headshot
Link plugin
example is playing the players A and B
command is executed aim_prac <on|off> or <1 | 0> the plugin is active ..
The players A and B can only be killed with a headshot with the other, the player enters the server C, it can kill the players A and B without having to get headshot.
It is somewhat annoying to be running the command every time someone enters the server.
I like the plugin grooming someone, I'd love but only basic stuff of programming.
Code


PHP Code:
/* AMX Mod X Aim Practice.

I know there is a plugin that already allows only headshots.
I made it because i found it to be very buggy, so if you only
want the headshot mode, use this :)

Version History: -
    First release: 1.0
    Fixed print_chat from id, to all. Now everyone knows when its enabled

Usage: -
    aim_prac <on|off> or  <1|0>
    
Get the latest version at: -
    http://www.amxmodx.org/forums/viewtopic.php?p=31377#31377

 (c) 2003, James "rompom7" Romeril
 This file is provided as is (no warranties).
*/

#include <amxmodx>
#include <fun>

public aim_prac(id)
{
    if (
id && !((get_user_flags(id) & ADMIN_LEVEL_A)))
    {
        
client_print(idprint_console"[AMXX] You do not have access to this command")
        return 
PLUGIN_CONTINUE
    
}
    new 
arg[8]
    
read_argv(1arg7)

    if((
equali(arg"on"))||(equali(arg"1")))
    {
        
set_user_hitzones(,02)
        
client_print(idprint_console"[AMXX] ENABLED Headshot only mode")
        
client_print(0print_chat"[AMXX] ENABLED Headshot only mode")
    }
    else
    {
        
set_user_hitzones(00255)
        
client_print(idprint_console"[AMXX] DISABLED Headshot only mode")
        
client_print(0print_chat"[AMXX] DISABLED Headshot only mode")
    }
    return 
PLUGIN_HANDLED
}

public 
plugin_init()
{
    
register_plugin("Aim Practice","1.0","James Romeril")
    
register_concmd("aim_prac""aim_prac"ADMIN_LEVEL_A"aim_prac <on|off> or <1|0>")

__________________
moises9633 is offline
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 07-12-2010 , 11:23   Re: Is a Bug ? O.o Help Me please
Reply With Quote #2

dunno maybe register the newround event and everytime execute that public ?
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
moises9633
Senior Member
Join Date: Nov 2008
Old 07-12-2010 , 11:28   Re: Is a Bug ? O.o Help Me please
Reply With Quote #3

whenever a player enters the server is running on the command aim_prac on for the plugin to work
__________________
moises9633 is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 07-12-2010 , 13:53   Re: Is a Bug ? O.o Help Me please
Reply With Quote #4

Try this:
PHP Code:
/* AMX Mod X Aim Practice.

I know there is a plugin that already allows only headshots.
I made it because i found it to be very buggy, so if you only
want the headshot mode, use this :)

Version History: -
    First release: 1.0
    Fixed print_chat from id, to all. Now everyone knows when its enabled

Usage: -
    aim_prac <on|off> or  <1|0>
    
Get the latest version at: -
    http://www.amxmodx.org/forums/viewtopic.php?p=31377#31377

 (c) 2003, James "rompom7" Romeril
 This file is provided as is (no warranties).
*/

#include <amxmodx>
#include <fun>

new CVAR_ENABLE

public aim_prac(id)
{
    if (
id && !((get_user_flags(id) & ADMIN_LEVEL_B)))
    {
        
client_print(idprint_console"[AMXX] You do not have access to this command")
        return 
PLUGIN_CONTINUE
    
}
    new 
arg[8]
    
read_argv(1arg7)

    if (
equal(arg"on") || (equal(arg"1")) )
    {
        
set_user_hitzones(,02)
        
client_print(idprint_console"[AMXX] ENABLED Headshot only mode")
        
client_print(0print_chat"[AMXX] ENABLED Headshot only mode")
        
set_cvar_num("aim_prac"1)
    }
    else
    {
        
set_user_hitzones(00255)
        
client_print(idprint_console"[AMXX] DISABLED Headshot only mode")
        
client_print(0print_chat"[AMXX] DISABLED Headshot only mode")
        
set_cvar_num("aim_prac"0)
    }
    return 
PLUGIN_HANDLED
}

public 
client_putinserver(id) {
    
    if (
get_pcvar_num(CVAR_ENABLE) > 0) {
        
client_print(idprint_chat"[AMXX] ENABLED Headshot only mode")
        
set_user_hitzones(0id2)
    }
    else {
        
client_print(idprint_chat"[AMXX] DISABLED Headshot only mode")
        
set_user_hitzones(0id255)
    }
        
    return 
PLUGIN_HANDLED
}

public 
plugin_init()
{
    
register_plugin("Aim Practice","1.0","James Romeril")
    
register_clcmd("aim_prac""aim_prac"ADMIN_LEVEL_B"aim_prac <on|off> <1|0>")
    
CVAR_ENABLE register_cvar("aim_prac""0")


Last edited by Mxnn; 07-12-2010 at 14:04.
Mxnn 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 07:05.


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