Raised This Month: $ Target: $400
 0% 

Ban users for freekilling


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
izzle
Senior Member
Join Date: Aug 2009
Old 10-31-2009 , 22:01   Re: Ban users for freekilling
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>

new g_iMaxPlayers

public plugin_init()
{
    
register_plugin("JailBreak Glow Menu""1.1""izzle")
    
register_clcmd"say /glow","JBGlowMenu");
    
register_clcmd"say_team /glow","JBGlowMenu");
}
public 
event_round_start()
{
    for (new 
idid <= g_iMaxPlayersid++)
    {    
        
fm_set_rendering(idkRenderFxGlowShell000kRenderNormal20)
    }
    
}
public 
JBGlowMenu(id)
{
    if (
cs_get_user_team(id) != CS_TEAM_CT || !is_user_alive(id))
    { 
        return 
PLUGIN_HANDLED;
    }
    new 
menu menu_create("\rJB Glow Menu:""sub_menu");
    
    new 
players[32], pnumtempid;
    new 
szName[32], szTempid[10];
    
    
get_players(playerspnum"a");
    
    for( new 
ii<pnumi++ )
    {
        
tempid players[i];
        
        if (
cs_get_user_team(tempid) != CS_TEAM_T)
        {
            continue;
        }
        
        
get_user_name(tempidszName31);
        
num_to_str(tempidszTempid9);
        
menu_additem(menuszNameszTempid0);
    }
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
sub_menu(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
tempid str_to_num(data);
    new 
szName[32], szName2[32];
    
get_user_name(idszName31);
    
get_user_name(tempidszName231);
    
fm_set_rendering(tempidkRenderFxGlowShell2551400kRenderNormal20)
    
set_hudmessage(02550)
    
show_hudmessage(0"[JBGM] %s gave a freeday to %s^n and is now glowing!"szNameszName2);
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
__________________
izzle is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 10-31-2009 , 22:03   Re: Ban users for freekilling
Reply With Quote #2

Why ban theplayer though

Just add a check

PHP Code:
if(glowlimit[id] <= 7)
{
   
//do the glow thingy
}
else
{
  
//Dont do it and say YOU USED IT ALL UP


Last edited by Doc-Holiday; 10-31-2009 at 22:06.
Doc-Holiday is offline
izzle
Senior Member
Join Date: Aug 2009
Old 10-31-2009 , 22:08   Re: Ban users for freekilling
Reply With Quote #3

Quote:
Originally Posted by NcB_Sav View Post
Why ban theplayer though

Just add a check

PHP Code:
if(glowlimit[id] <= 7)
{
   
//do the glow thingy
}
else
{
  
//Dont do it and say YOU USED IT ALL UP

I want to ban them because I dont wan't them to freekill.
__________________
izzle is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 10-31-2009 , 22:23   Re: Ban users for freekilling
Reply With Quote #4

Quote:
Originally Posted by izzle View Post
I want to ban them because I dont wan't them to freekill.

Right but if you do a check for 7 glows....

It will stop them after 7 kills
Doc-Holiday is offline
izzle
Senior Member
Join Date: Aug 2009
Old 10-31-2009 , 22:25   Re: Ban users for freekilling
Reply With Quote #5

Quote:
Originally Posted by NcB_Sav View Post
Right but if you do a check for 7 glows....

It will stop them after 7 kills
But it doesn't matter if they can't use the menu anymore, they can still freekill, thats why I wanted to ban them
__________________
izzle is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 10-31-2009 , 22:26   Re: Ban users for freekilling
Reply With Quote #6

Quote:
Originally Posted by izzle View Post
But it doesn't matter if they can't use the menu anymore, they can still freekill, thats why I wanted to ban them

Ok well do the check if more then 7 the

ban (user) type ... but use that type of check


glowlimit[32]


then every time they use it ++glowlimit[id]

if(glowlimit[id] >= 7)
{
ban

}
Doc-Holiday is offline
izzle
Senior Member
Join Date: Aug 2009
Old 10-31-2009 , 22:27   Re: Ban users for freekilling
Reply With Quote #7

Quote:
Originally Posted by NcB_Sav View Post
Ok well do the check if more then 7 the

ban (user) type ... but use that type of check


glowlimit[32]


then every time they use it ++glowlimit[id]

if(glowlimit[id] >= 7)
{
ban

}
Ok but I want it to ban them if they use it more than 2 times in 7 rounds
__________________
izzle 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 17:38.


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