Raised This Month: $ Target: $400
 0% 

New map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LostSkill
Senior Member
Join Date: Jun 2008
Location: Monuhuelo Island
Old 11-17-2010 , 04:28   Re: New map
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <fun>

new gVoteMenu;
new 
gVotes[2];
new 
gVoting;

public 
plugin_init() 

    
register_plugin("Vote Hs mode","1.0","James Romeril")
    
register_concmd("aim_prac""aim_prac"ADMIN_LEVEL_A"aim_prac <on|off> or <1|0>")
    
set_task(60.0"hs_mode"


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 
hs_mode(id

    
gVoteMenu menu_create("\rIjunkti HS moda?""menu_handler");

    
menu_additem(gVoteMenu"Taip""0"0);
    
menu_additem(gVoteMenu"Ne""1"0); 
    
    new 
players[32], pnumtempid;
    
    
get_players(playerspnum);
    
    for( new 
ii<pnumi++ )
    {
        
tempid players[i];

        
menu_display(tempidgVoteMenu0);

        
gVoting++;
    }

    
set_task(15.0"EndVote");

    return 
PLUGIN_HANDLED;


public 
menu_handler(idmenuitem)
{
    if( 
item == MENU_EXIT || !gVoting )
    {
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    new 
voteid str_to_num(data);

    
gVotes[voteid]++;

    return 
PLUGIN_HANDLED;
}

public 
EndVote()
{
    if( 
gVotes[0] > gVotes[1] )
    
client_print(0print_chat"Uz TAIP balsavo (%d) dabar bus ijunktas hs mode"gVotes[0] );
    
set_cvar_num("aim_prac"1)
    else if( 
gVotes[0] < gVotes[1] )
    
client_print(0print_chat"Uz NE balsavo (%d) todel HS mode nebus ijunktas"gVotes[1] );
    
set_cvar_num("aim_prac"0)
    else
    
client_print(0print_chat"Buvo lygiosios %d todel nebus ijunktas HS mode."gVotes[0] );
    
set_cvar_num("aim_prac"0);
    
    
menu_destroy(gVoteMenu);

    
gVoting 0;

After this:
PHP Code:
set_cvar_num("aim_prac"1
I lose identification on this line and compile fails :\
PHP Code:
else if( gVotes[0] < gVotes[1] ) 
__________________
MY ENGLISH IS BAD.....

Last edited by LostSkill; 11-17-2010 at 05:40.
LostSkill is offline
Send a message via MSN to LostSkill
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 11:25.


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