Raised This Month: $32 Target: $400
 8% 

Team limiter count


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
layka_LUBII
Senior Member
Join Date: Jul 2012
Old 12-02-2015 , 15:58   Team limiter count
Reply With Quote #1

Good night, I have request.
I would have needed to do count for Menu select
I use this plugin in my Jailbreak Select Menu
How to make maximum count Guard
Thank you for help

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

#define PLUGIN "JailBreak Team Limiter"
#define VERSION "1.0"
#define AUTHOR "Risontek"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_clcmd("say /ct","ct_prechod")
}
public ct_prechod(id)
{
    new ct = 0
    new te = 0
    for(new i = 1; i <= 32;i++)
    {
        if(get_user_team(i) == 1)
        {
            te++
        }
        if(get_user_team(i) == 2)
        {
            ct++
        }
    }
    if(ct == 0)
    {
        cs_set_user_team(id,CS_TEAM_CT)
        client_print(id,print_chat,"Odteraz si CT")
        return PLUGIN_HANDLED
    }
    if(ct == te)
    {
        client_print(id,print_chat,"Is Full Guard")
        return PLUGIN_HANDLED
    }
    te /= 3
    if(te > ct)
    {
        cs_set_user_team(id,CS_TEAM_CT)
        client_print(id,print_chat,"Odteraz si CT")
    }
    else
    {
        client_print(id,print_chat,"Is Full Guard")
    }
    return PLUGIN_HANDLED
}
Code:
formatex(option, charsmax(option), "Dozorce \d[%i/SHOW FULL CT]", CTCount)
layka_LUBII 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:07.


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