Raised This Month: $ Target: $400
 0% 

Ban users for freekilling


Post New Thread Reply   
 
Thread Tools Display Modes
izzle
Senior Member
Join Date: Aug 2009
Old 11-01-2009 , 20:35   Re: Ban users for freekilling
Reply With Quote #21

It's mainly for people who accidentally freekilled so they can use my glow menu, but if they use it too often then there freekilling too much, thats why I want to ban them.
__________________
izzle is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-01-2009 , 20:49   Re: Ban users for freekilling
Reply With Quote #22

I just read what Jailbreak was and the whole point is to kill people to put them in your jail. I see no correlation between "freekilling" and the glow menu or even Jailbreak itself.
__________________
fysiks is offline
izzle
Senior Member
Join Date: Aug 2009
Old 11-01-2009 , 20:55   Re: Ban users for freekilling
Reply With Quote #23

Quote:
Originally Posted by fysiks View Post
I just read what Jailbreak was and the whole point is to kill people to put them in your jail. I see no correlation between "freekilling" and the glow menu or even Jailbreak itself.
Thats completely different than what I am talking about, join a jailbreak server and you will see.
__________________
izzle is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-01-2009 , 20:57   Re: Ban users for freekilling
Reply With Quote #24

Anyways, I gave you some code several posts back. Let me know if it works (it's incomplete so you will need to fill in the blanks and test it).
__________________
fysiks is offline
izzle
Senior Member
Join Date: Aug 2009
Old 11-01-2009 , 21:00   Re: Ban users for freekilling
Reply With Quote #25

Quote:
Originally Posted by fysiks View Post
Anyways, I gave you some code several posts back. Let me know if it works (it's incomplete so you will need to fill in the blanks and test it).
Ok, thank you
__________________
izzle is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-01-2009 , 21:38   Re: Ban users for freekilling
Reply With Quote #26

Ok, I had a little time to test it. It didnt' work as I hoped. I was trying to avoid using two arrays but I ended up having to do it:

PHP Code:
#include <amxmodx>

new g_rounds[33]
new 
g_count[33][7]

public 
plugin_init()
{
    
register_plugin("2per7""1.0""fysiks")
    
register_clcmd("hello""cmdTest")
    
register_clcmd("newround""event_newround")

    
// hook new round to function "event_newround"
}

public 
client_putinserver(id)
{
    
g_rounds[id] = 0
    
for(new 0sizeof(g_count[]); i++)
    {
        
g_count[id][i] = 0
    
}
}

public 
event_newround()
{
    new 
players[32], num
    get_players
(playersnum)

    new 
id
    
for(new 0numi++)
    {
        
id players[i]
        
g_rounds[id]++
        
g_count[id][g_rounds[id] % 7] = 0
    
}
}

public 
cmdTest(id)
{
    if(
getcount(id) < 2)  // This number is the max times you can use the command in 7 rounds.
    
{
        
// Client has not used the command the maximum number of times yet.
        
console_print(id"ALLOWED")
        
g_count[id][g_rounds[id] % 7] += 1
    
}
    else
    {
        
console_print(id"DISSALLOWED: Max reached")
    }
}

getcount(id)
{
    new 
total 0
    
for(new 0sizeof(g_count[]); i++)
    {
        
total += g_count[id][i]
    }
    return 
total

This one should work. You still have to hook the newround event or whatever.
__________________

Last edited by fysiks; 11-01-2009 at 21:44.
fysiks 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 22:07.


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