Raised This Month: $ Target: $400
 0% 

[Solved] Bitsums


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-13-2010 , 15:13   Re: TeamScore issue
Reply With Quote #6

First half and second half scores for each team ?

If so:

PHP Code:
/* round number stored in this */
new g_iRound

/* first it's "first or second half" and second it's the team */
new g_iScore[2][2]

new 
pCvar_mp_maxrounds

public plugin_init()
{
      
register_message(get_user_msgid("TeamScore"), "msg_TeamScore")

      
pCvar_mp_maxrounds get_pcvar_pointer("mp_maxrounds")
}

public 
msg_TeamScore()
{
      new 
iHalf
      
new iTeam
      
new szTeam[2]

      
get_msg_arg_string(1szTeamcharsmax(szTeam))

      if(
g_iRound > (get_pcvar_num(pCvar_mp_maxrounds) / 2))
           
iHalf 1

      
if(szTeam[0] == 'C')
           
iTeam 1

      set_msg_arg_int
(2ARG_SHORTg_iScore[iHalf][iTeam])

This code just sets team scores to g_iScore values, you have to alter that variable and the g_iRound yourself as you need.
__________________

Last edited by Hunter-Digital; 07-13-2010 at 15:19.
Hunter-Digital 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 07:15.


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