Raised This Month: $51 Target: $400
 12% 

Restart frags


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
StoleA
Junior Member
Join Date: Nov 2011
Location: Romania
Old 01-06-2014 , 10:32   Restart frags
Reply With Quote #1

Hi everyone,

I have a problem with this plugin after update to amxmodx 1.8.2. On my old engine(5787) works perfect, but on new engine(6027) doesn't work anymore.. Small description: When a player reach 300 frags, server execute command sv_restart 1. Thank you

PHP Code:
#include < amxmodx >
#include <amxmisc>

new g_Frags;

public 
plugin_init( )
{
    
register_plugin"Restart Frags""1.0""Author" );
    
register_event"DeathMsg""death_a""a" );
    
g_Frags register_cvar"player_maxfrags""300" );
}

public 
death_a( )
{
    new 
players[32], num;
    
get_players(playersnum);
    new 
Frags;
    
    for (new 
i=0i<numi++)
    {
        
Frags get_user_frags(players[i])
        
        if(
Frags >= get_pcvar_num(g_Frags))
        {
            
chat_color(0"Round will reseted in 5 seconds !")
            
server_cmd ("sv_restart 1");
        }    
    }
    return 
PLUGIN_HANDLED;
}

stock chat_color{
    ....

__________________
StoleA is offline
Send a message via Yahoo to StoleA Send a message via Skype™ to StoleA
 



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 11:29.


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