Raised This Month: $ Target: $400
 0% 

I need a function (in the second round, and after each round)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
1ka
Senior Member
Join Date: Jun 2012
Old 09-05-2013 , 14:31   I need a function (in the second round, and after each round)
Reply With Quote #1

I need a function
(in the second round and after each round)
(no act in the first round...)

For example:

HTML Code:
#include <amxmodx>
#include <cstrike>
 
#define PLUGIN "xxx"
#define VERSION "xxx"
#define AUTHOR "xxx"

public plugin_init() 
{
 register_plugin(PLUGIN, VERSION, AUTHOR);
 ???????????????
}
 
public event_x(id)
{
 if (get_user_flags(id) & ADMIN_MENU)
 ...
}
__________________
Sorry for my bad english.

Last edited by 1ka; 09-05-2013 at 14:32.
1ka is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-05-2013 , 15:44   Re: I need a function (in the second round, and after each round)
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=42159

It all depends on what you're doing. Unless more information is provided it's hard to help. XY-problem strikes again.
__________________

Last edited by Black Rose; 09-05-2013 at 15:45.
Black Rose is offline
SpaWn2KiLl
Member
Join Date: Aug 2012
Old 09-05-2013 , 17:11   Re: I need a function (in the second round, and after each round)
Reply With Quote #3

If you do sv_restartround 1 it reset's the Round variable...

PHP Code:
#include <amxmodx>
 
#define PLUGIN "xxx"
#define VERSION "xxx"
#define AUTHOR "xxx"

new Round

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR); 
    
Round 0
    register_event
("HLTV""event_new_round""a""1=0""2=0"
    
register_event("TextMsg""Event_GameWillRestartIn""a""2=#Game_will_restart_in")
}
 
public 
event_x(id)
{
    if (
get_user_flags(id) & ADMIN_MENU && Round >= 1)
    {
        ...
    }
}

public 
event_new_round()
{
    
Round++
}

public 
Event_GameWillRestartIn()
{
    
Round 0

__________________

Last edited by SpaWn2KiLl; 09-05-2013 at 17:12.
SpaWn2KiLl is offline
1ka
Senior Member
Join Date: Jun 2012
Old 09-05-2013 , 20:51   Re: I need a function (in the second round, and after each round)
Reply With Quote #4

SpaWn2KiLl

Please. Complete script. Any feature on admin flag ADMIN_MENU
The work of the second round of and after each round,
any feature complete script please..........

For example:
1 round...
Nothing happens

2 round...
Admin (with ADMIN_MENU flag) automatically say: This is not the first round...

3 round...
Admin (with ADMIN_MENU flag) automatically say: This is not the first round...

2x round...
Admin (with ADMIN_MENU flag) automatically say: This is not the first round...
__________________
Sorry for my bad english.

Last edited by 1ka; 09-05-2013 at 21:17.
1ka is offline
SpaWn2KiLl
Member
Join Date: Aug 2012
Old 09-05-2013 , 21:22   Re: I need a function (in the second round, and after each round)
Reply With Quote #5

Quote:
Originally Posted by 1ka View Post
SpaWn2KiLl

Please. Complete script. Any feature on admin flag ADMIN_MENU
The work of the second round of and after each round,
any feature complete script please..........

For example:
1 round...
Nothing happens

2 round...
Admin (with ADMIN_MENU flag) automatically say: This is not the first round...

3 round...
Admin (with ADMIN_MENU flag) automatically say: This is not the first round...

2x round...
Admin (with ADMIN_MENU flag) automatically say: This is not the first round...
I didn't understand very well what do you pretend... Do you want an Admin with ADMIN_MENU automatically sends a message saying it's not the first round to the chat?

If is that here it goes:
PHP Code:
#include <amxmodx>
 
#define PLUGIN "xxx"
#define VERSION "xxx"
#define AUTHOR "xxx"

new Round

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR); 
    
Round 0
    register_event
("HLTV""event_new_round""a""1=0""2=0"
    
register_event("TextMsg""Event_GameWillRestartIn""a""2=#Game_will_restart_in")
}

public 
event_new_round()
{
    if (
Round >= 1)
    {
        new 
iPlayers[32], iNum
        
        get_players
(iPlayersiNum)
        
        new 
bool:MessageSent
        MessageSent 
false
        
        
for(new 0iNumi++)
        {
            if(
get_user_flags(iPlayers[i]) & ADMIN_MENU && !MessageSent)
            {
                
client_print(iPlayers[i], print_chat"This is not the first round...")
                
MessageSent true
            
}
        }
    }
    
Round++
}

public 
Event_GameWillRestartIn()
{
    
Round 0

__________________

Last edited by SpaWn2KiLl; 09-05-2013 at 21:28.
SpaWn2KiLl is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-05-2013 , 22:31   Re: I need a function (in the second round, and after each round)
Reply With Quote #6

Quote:
Originally Posted by 1ka;2029098[B
][/B]
Please. Complete script.
Next time do it yourself, this is not the request forum.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 09-05-2013 at 22:31.
wickedd is offline
1ka
Senior Member
Join Date: Jun 2012
Old 09-06-2013 , 09:24   Re: I need a function (in the second round, and after each round)
Reply With Quote #7

SpaWn2KiLl
I know how to do the rest
This is exactly what I needed
Thank you very much

wickedd
ok
__________________
Sorry for my bad english.

Last edited by 1ka; 09-06-2013 at 09:28.
1ka is offline
Reply


Thread Tools
Display Modes

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 19:01.


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