AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I need a function (in the second round, and after each round) (https://forums.alliedmods.net/showthread.php?t=225501)

1ka 09-05-2013 14:31

I need a function (in the second round, and after each round)
 
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)
 ...
}


Black Rose 09-05-2013 15:44

Re: I need a function (in the second round, and after each round)
 
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.

SpaWn2KiLl 09-05-2013 17:11

Re: I need a function (in the second round, and after each round)
 
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



1ka 09-05-2013 20:51

Re: I need a function (in the second round, and after each round)
 
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...

SpaWn2KiLl 09-05-2013 21:22

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

Originally Posted by 1ka (Post 2029098)
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



wickedd 09-05-2013 22:31

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

Originally Posted by 1ka;2029098[B
][/B]
Please. Complete script.

Next time do it yourself, this is not the request forum.

1ka 09-06-2013 09:24

Re: I need a function (in the second round, and after each round)
 
SpaWn2KiLl
I know how to do the rest
This is exactly what I needed
Thank you very much :)

wickedd
ok


All times are GMT -4. The time now is 19:01.

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