Raised This Month: $ Target: $400
 0% 

[HELP] Plugin not works...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 10-03-2011 , 12:29   [HELP] Plugin not works...
Reply With Quote #1

Help-me with plugin

PHP Code:
#include <amxmodx>

#define MIN 8
#define TIME 10
#define TAG "[Pug MOD]"

public plugin_init()
{
register_plugin("Players Num",AMXX_VERSION_STR,"Capet1nha")
register_logevent("RoundStart",2,"1=Round_Start")
}

public 
RoundStart()
{
if(
get_cvar_num("pug_minplayers") != 10) return PLUGIN_HANDLED;

new 
TOTAL get_playersnum();
new 
WARMUP get_cvar_num("pug_warmup");

if(((
WARMUP == 0) || (WARMUP == 2)) && (TOTAL MIN))
{
set_cvar_num("pug_warmup",1);
set_cvar_num("pug_votemap",1);
set_cvar_num("pug_votemap_enabled",1);

client_print(0,3,"%s Reiniciando em %d segundos: Faltam %d jogadores.",TAG,TIME,(10 TOTAL));

message_begin(MSG_ALL,SVC_INTERMISSION);
message_end();

set_task(float(TIME),"svRestart");
return 
PLUGIN_HANDLED;
}
return 
PLUGIN_CONTINUE;
}

public 
svRestart() server_cmd("restart"); 
__________________

Last edited by kramesa; 10-04-2011 at 18:10.
kramesa is offline
Evaldas.Grigas
Senior Member
Join Date: Sep 2011
Location: Lithuania
Old 10-03-2011 , 14:28   Re: [HELP] Plugin not works...
Reply With Quote #2

What help do you need?
Evaldas.Grigas is offline
Send a message via Skype™ to Evaldas.Grigas
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 10-03-2011 , 15:28   Re: [HELP] Plugin not works...
Reply With Quote #3

is that when you get 8 players on the server it does not restart
__________________
kramesa is offline
enjoi.
Veteran Member
Join Date: Mar 2011
Old 10-03-2011 , 15:39   Re: [HELP] Plugin not works...
Reply With Quote #4

PHP Code:
if(get_cvar_num("pug_minplayers") != 10) return PLUGIN_HANDLED
to
PHP Code:
if(get_cvar_num("pug_minplayers") != 8) return PLUGIN_HANDLED
idk no clue lol
__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]
enjoi. is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 10-03-2011 , 15:45   Re: [HELP] Plugin not works...
Reply With Quote #5

PHP Code:
"1=Round_Sta rt" 
or
PHP Code:
"1=Round_Start" 
?
__________________
kramesa is offline
enjoi.
Veteran Member
Join Date: Mar 2011
Old 10-03-2011 , 15:50   Re: [HELP] Plugin not works...
Reply With Quote #6

im guessing the 2nd one might be wrong just started coding
__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]
enjoi. is offline
plowed
Senior Member
Join Date: Oct 2010
Location: germany
Old 10-03-2011 , 16:08   Re: [HELP] Plugin not works...
Reply With Quote #7

try

PHP Code:
#include <amxmodx>

#define MIN 8
#define TIME 10
#define TAG "[Pug MOD]"

public plugin_init()
{
register_plugin("Players Num","1.0","Capet1nha")
register_logevent("RoundStart",2,"1=Round_Start")
}

public 
RoundStart()
{
    if(
get_cvar_num("pug_minplayers") != 10) return PLUGIN_HANDLED;

    new 
TOTAL get_playersnum();
    new 
WARMUP get_cvar_num("pug_warmup");

    if(((
WARMUP == 0) || (WARMUP == 2)) && (TOTAL >= MIN))
    {
        
set_cvar_num("pug_warmup",1);
        
set_cvar_num("pug_votemap",1);
        
set_cvar_num("pug_votemap_enabled",1);

        
client_print(0,3,"%s Reiniciando em %d segundos: Faltam %d jogadores.",TAG,TIME,(10 TOTAL));

        
message_begin(MSG_ALL,SVC_INTERMISSION);
        
message_end();

        
set_task(float(TIME),"svRestart");
        return 
PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE;
}

public 
svRestart() server_cmd("restart"); 
__________________
Zombie Mod + gameMe stats :
plowed is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 10-03-2011 , 17:25   Re: [HELP] Plugin not works...
Reply With Quote #8

what is the most cvar to disable it?
__________________
kramesa is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 10-04-2011 , 14:28   Re: [HELP] Plugin not works...
Reply With Quote #9

help
__________________
kramesa is offline
enjoi.
Veteran Member
Join Date: Mar 2011
Old 10-04-2011 , 15:31   Re: [HELP] Plugin not works...
Reply With Quote #10

Don't bump
__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]
enjoi. is offline
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 19:33.


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