Raised This Month: $ Target: $400
 0% 

Bet


Post New Thread Reply   
 
Thread Tools Display Modes
vilaemail
Member
Join Date: Jan 2009
Location: Tu i tamo, svuda pomalo
Old 01-22-2010 , 13:55   Re: Bet
Reply With Quote #41

Quote:
Originally Posted by Nextra View Post
Wait for an AMXModX plugin approver to review your plugin. This can take some time depending on how busy these people are.
No problem, I have patience and understand them.. There are a lot of pending plugins
__________________
If you are putting me to credits of some kind please put "Filip Vilicic" instead of "vilaemail". Or put both. Thanks.
vilaemail is offline
ditmesteam
Senior Member
Join Date: Oct 2009
Old 01-22-2010 , 15:18   Re: Bet
Reply With Quote #42

I see one bug: when I beted in round 7 (for example) message of result bet do not display,in round 8 I can see message!
ditmesteam is offline
vilaemail
Member
Join Date: Jan 2009
Location: Tu i tamo, svuda pomalo
Old 01-22-2010 , 16:16   Re: Bet
Reply With Quote #43

Quote:
Originally Posted by ditmesteam View Post
I see one bug: when I beted in round 7 (for example) message of result bet do not display,in round 8 I can see message!
So you bet. Round ends. And only when new round starts you can see message that you won? That's strange since payoff is done immediately after round end. Maybe you are running some other plugins that hooks on same events I have hooked (terrorist win and ct win sound). Please post your plugins.ini
__________________
If you are putting me to credits of some kind please put "Filip Vilicic" instead of "vilaemail". Or put both. Thanks.
vilaemail is offline
ditmesteam
Senior Member
Join Date: Oct 2009
Old 01-22-2010 , 23:18   Re: Bet
Reply With Quote #44

You say right, I will send feedback later!
ditmesteam is offline
vilaemail
Member
Join Date: Jan 2009
Location: Tu i tamo, svuda pomalo
Old 01-26-2010 , 09:44   Re: Bet
Reply With Quote #45

Script upgraded to v1.7. Many new features!

Quote:
Originally Posted by vilaemail View Post
Change log:
v1.7
  • Made bet_addsenabled and bet_mustbedead cvars.
  • Made amx_advertisebet and say /advertisebet commands
  • Updated cvar handling
  • Fixed say clcmd registration (flags where 0. Changed to ADMIN_USER )
  • Added Russian and Chinese translation
v1.6
  • Reorganized code
  • Fixed most of the compiler warnings (tag mismatch)
  • Updated translations (sk, cz)
v1.5a
  • Changed g_messageTable to const
  • Fixed minor printing bug
v1.5
  • Added cvar bet_chatenabled (def. 1)
v1.4
  • Reordered code
  • Optimized code
  • Optimized memory usage
  • Removed Russian translation
v1.3b
  • Improved code performance.
  • Removed some unnecessary code.
v1.3 and v1.3a
  • Improved code performance.
  • Made code more consistent.
  • Fixed minor bug.
v1.2
  • Updated translations (ru, de).
  • Improved code performance.
v1.1
  • Fixed minor typing mistake.
  • Updated translations (nl).
__________________
If you are putting me to credits of some kind please put "Filip Vilicic" instead of "vilaemail". Or put both. Thanks.
vilaemail is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 01-26-2010 , 10:52   Re: Bet
Reply With Quote #46

Good Job, some suggestions:
- There is no need to add another function call through stocks. If you want to use simpler terms for get_pcvar_num use defines:
PHP Code:
#define GetChatEnabled() bool:get_pcvar_num(cvar_chatEnabled)
#define GetAddsEnabled() bool:get_pcvar_num(cvar_addsEnabled)
#define GetAliveEnabled() bool:get_pcvar_num(cvar_aliveEnabled) 
- You can omit the int: tag since thats how every var will work when not declared another tag (neglecting the fact that pawn is typeless anyway).
- Ad with only one 'd'. Add is something else and may confuse people.
__________________
In Flames we trust!
Nextra is offline
matsi
Thinkosaur
Join Date: Sep 2006
Old 01-26-2010 , 14:39   Re: Bet v1.1
Reply With Quote #47

This i don't understand:
Quote:
Originally Posted by Nextra View Post
PHP Code:
    for (i=0i<playerCounti++)
    {
        
//player = Players[i]  - no need for this
        //team = cs_get_user_team(Players[i]) - no need for this either
        
switch(cs_get_user_team(Players[i]))
        {
            case 
CS_TEAM_T:
            {
                
aliveT++
            }
            case 
CS_TEAM_CT:
            {
                
aliveCT++
            }
        }
    } 
matsi is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 01-26-2010 , 16:21   Re: Bet
Reply With Quote #48

What exactly is the thing you do not understand?

You do have knowledge of for loops and switch statements, do you?
__________________
In Flames we trust!
Nextra is offline
Old 01-26-2010, 16:48
matsi
This message has been deleted by matsi. Reason: my bad
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-26-2010 , 16:52   Re: Bet
Reply With Quote #49

Quote:
Originally Posted by matsi View Post
As for loop you should avoid re-indexing arrays.
There is no re-indexing in the snippet.

Quote:
And for cs_get_user_team i would use:
Code:
new CsTeams:team = cs_get_user_team( index )
What is the point if you are only going to use the return value once?

Quote:


EDIT: And you have blanked it for the second time as I was responding, screw it now
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
vilaemail
Member
Join Date: Jan 2009
Location: Tu i tamo, svuda pomalo
Old 01-27-2010 , 07:57   Re: Bet
Reply With Quote #50

Quote:
Originally Posted by Nextra View Post
Good Job, some suggestions:
- There is no need to add another function call through stocks. If you want to use simpler terms for get_pcvar_num use defines:
PHP Code:
#define GetChatEnabled() bool:get_pcvar_num(cvar_chatEnabled)
#define GetAddsEnabled() bool:get_pcvar_num(cvar_addsEnabled)
#define GetAliveEnabled() bool:get_pcvar_num(cvar_aliveEnabled) 
- You can omit the int: tag since thats how every var will work when not declared another tag (neglecting the fact that pawn is typeless anyway).
- Ad with only one 'd'. Add is something else and may confuse people.
-I was guided by this:
Quote:
HTML Code:
new g_enabled = register_cvar("csdm_enabled", "1")
//OR
new g_enabled = get_cvar_pointer("csdm_enabled")
 
stock SetCSDM(num)
   set_pcvar_num(g_enabled, num)
 
stock GetCSDM()
   return get_pcvar_num(g_enabled)
I optimized them to defines.
-Int tag is there because of compiler warnings, which are very annoying.
-Ad misspell fixed.
__________________
If you are putting me to credits of some kind please put "Filip Vilicic" instead of "vilaemail". Or put both. Thanks.
vilaemail 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 05:54.


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