Quote:
Originally Posted by biscuit628
PHP Code:
#include <amxmodx>
new maxplayers new ct_total,ts_total public plugin_init(){ register_plugin("???","1.0","Biscuit") register_event("HLTV", "Roundstart", "a", "1=0", "2=0") maxplayers = get_maxplayers() }
public Roundstart() { for(new i = 1 ; i <= maxplayers ; i++) { (get_user_team(i) == 1) ? ts_total++ : ct_total++ } set_task(1.0,"control_plugin") }
public control_plugin() { if(ts_total > 3 && ct_total > 3) { unpause("ac","plugin.amxx") } else { pause("ac","plugin.amxx") } ts_total = 0 ct_total = 0 }
not tested..
|
I am new at scripting so i dont know if i am correct BUT...
PHP Code:
if(ts_total > 3 && ct_total > 3)
Maybe this should be -->
PHP Code:
if(ts_total > 3 || ct_total > 3)
Or i am wrong?
And... that i understand he want to check the group of ALL players (ct or tt) so.. i think the code should be:
PHP Code:
#include <amxmodx>
new maxplayers
public plugin_init()
{
register_plugin("???","1.0","Biscuit")
register_event("HLTV", "Roundstart", "a", "1=0", "2=0")
maxplayers = get_maxplayers()
}
public Roundstart()
{
for(new i = 1 ; i <= maxplayers ; i++)
if(i > 3)
{
unpause("ac","plugin.amxx")
}
else
{
pause("ac","plugin.amxx")
}
}
But well, i am not sure at this. Maybe i didnt understand at all.
PS: Oh, and i think the task is not necessary.
__________________