Raised This Month: $ Target: $400
 0% 

3on3, plugin OFF | 4onX plugin ON


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
deLL
Junior Member
Join Date: Jul 2009
Location: Kozienice, Poland
Old 07-31-2009 , 03:41   3on3, plugin OFF | 4onX plugin ON
Reply With Quote #1

Hi,

I search the plugin or please write the plugin.

Description:
Code:
If a group of CT and TT 3 players after the plug is turned off.

If a group of CT or TT is more than 3 players plugin is enabled.
Sorry, I do not speak well in English.
deLL is offline
Send a message via Skype™ to deLL
Old 07-31-2009, 08:28
biscuit628
This message has been deleted by biscuit628. Reason: update in#5
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-31-2009 , 09:12   Re: 3on3, plugin OFF | 4onX plugin ON
Reply With Quote #2

Quote:
Originally Posted by biscuit628 View Post
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 
<= maxplayers i++)
    {
        (
get_user_team(i) == 1) ? ts_total++ : ct_total++
    }
    
set_task(1.0,"control_plugin")
}

public 
control_plugin()
{
    if(
ts_total && ct_total 3)
    {
        
unpause("ac","plugin.amxx")
    }
    else
    {
        
pause("ac","plugin.amxx")
    }
    
ts_total 
    ct_total 
0

not tested..
I am new at scripting so i dont know if i am correct BUT...

PHP Code:
if(ts_total && ct_total 3
Maybe this should be -->

PHP Code:
if(ts_total || 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 
<= maxplayers i++)
    if(
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.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...

Last edited by Alucard^; 07-31-2009 at 09:16.
Alucard^ is offline
Send a message via Skype™ to Alucard^
Old 07-31-2009, 09:17
biscuit628
This message has been deleted by biscuit628.
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 07-31-2009 , 11:24   Re: 3on3, plugin OFF | 4onX plugin ON
Reply With Quote #3

@Alucard: You should think like this about "||":

PHP Code:
if ( what or what == // or = "||" 
Also, that for() loop wont work.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 07-31-2009 , 12:17   Re: 3on3, plugin OFF | 4onX plugin ON
Reply With Quote #4

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 
<= maxplayers i++)
    {
        (
get_user_team(i) == 1) ? ts_total++ : ct_total++
    }
    
set_task(1.0,"control_plugin")
}

public 
control_plugin()
{
    if(
ts_total || ct_total 3)
    {
        
unpause("ac","plugin.amxx")
    }
    else if(
ts_total <= && ct_total <= 3)
    {
        
pause("ac","plugin.amxx")
    }
    
ts_total 
    ct_total 
0

__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!
biscuit628 is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-31-2009 , 14:11   Re: 3on3, plugin OFF | 4onX plugin ON
Reply With Quote #5

Quote:
Originally Posted by Xellath View Post
@Alucard: You should think like this about "||":

PHP Code:
if ( what or what == // or = "||" 
Also, that for() loop wont work.
Yes yes i know... my mistake :P
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
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 18:20.


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