Raised This Month: $ Target: $400
 0% 

hooking restart


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 05-09-2011 , 10:53   hooking restart
Reply With Quote #1

Hey, why the hell my array doesn't set to 0 when someone joins a game and the game is starting.

here is my code:

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Plugin name"
#define VERSION "1.0"
#define AUTHOR "ADDiNOL"

new iRound 0;

public 
plugin_init()
{
    
register_plugin(PLUGINVERSION"ADDiNOL")

    
register_logevent("Event_HLTV_Round_End"2"1=Round_End")
    
register_event("TextMsg""eRestart""a""2&#Game_C""2&#Game_W");
    
register_event("TextMsg""eRestart""a""2=#Game_will_restart_in")
    
register_clcmd("say /round""CmdRound")
}

public 
eRestart()
{
    
iRound 0;
}

public 
Event_HLTV_Round_End()
{
    
iRound+=1;
}

public 
CmdRound()
{
    
client_print(0print_chat"round: %d"iRound)

But if I use sv_restart 1 or sv_restartround 1, it works, and iRound is set to 0.
reinert is offline
 



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 04:26.


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