Raised This Month: $ Target: $400
 0% 

New Round?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MiloSx7
Member
Join Date: Oct 2011
Location: Serbia, Nish
Old 11-07-2011 , 02:56   New Round?
Reply With Quote #1

I have a bool

new bool:boughtitem[33] = false

And whenever a player buys in my menu, bool became true, and then untill New Round bool remains true...
When the new round begin, bool is false, again...

How to detect new round?
Without using HLTV, cause i need the (index) in front of the public HLTV(id)
__________________
MiloS

Last edited by MiloSx7; 11-07-2011 at 02:57.
MiloSx7 is offline
Send a message via MSN to MiloSx7
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-07-2011 , 03:14   Re: New Round?
Reply With Quote #2

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

If you really want new round you use the hltv method and loop through players to to reset the bool.

If you would rather say "once per life" then you would use Ham_Spawn.

However, if you don't modify the original spawning then both methods are essentially the same.
__________________
fysiks is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-07-2011 , 04:29   Re: New Round?
Reply With Quote #3

PHP Code:
#include <amxmodx>

new bool:boughtitem[33]

public 
plugin_init()
{
    
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0")
}

public 
Event_HLTV_New_Round()
{
    
arrayset(boughtitemfalsesizeof(boughtitem))

or theorically better :

PHP Code:
#include <amxmodx>

new bool:boughtitem[33]

new 
g_iMaxPlayers

public plugin_init()
{
    
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0")
    
g_iMaxPlayers get_maxplayers()
}

public 
Event_HLTV_New_Round()
{
    
arrayset(boughtitemfalseg_iMaxPlayers+1)

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 11-07-2011 at 04:33.
ConnorMcLeod 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 14:17.


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