Raised This Month: $ Target: $400
 0% 

Team Score function


  
 
 
Thread Tools Display Modes
Author Message
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 04-25-2006 , 02:15   Team Score function
#1

I would like a function to retrieve/set a team's score.

Mainly for Counter-Strike.

So I could just say:

Code:
cs_get_team_score(id, CT) cs_get_team_score(id, TERRORIST) cs_set_team_score(id, CT, 5) cs_set_team_score(id, TERRORIST, 3)


Something similar to that.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-25-2006 , 02:39  
#2

Why not just make your own stocks?

Get/send message data for "TeamScore".
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
FrontLine
Member
Join Date: Apr 2006
Old 04-25-2006 , 04:15  
#3

Ahhmmm

FL.
__________________
FrontLine is offline
Send a message via MSN to FrontLine
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-25-2006 , 04:38  
#4

That has nothing to do with what he's asking for.

Here's an example that should work:
Code:
stock cs_set_team_score(team , score) {     new buffer[10];     switch(team)     {         case 1: copy(buffer , 9 , "TERRORIST");         case 2: copy(buffer , 9 , "CT");         default: return 0;     }     message_begin(MSG_ALL , get_user_msgid("TeamScore") , {0,0,0});     write_string(buffer);     write_byte(score);     message_end();     return 1; }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
DS
SourceMod Developer
Join Date: Sep 2004
Location: WI, USA
Old 04-25-2006 , 04:54  
#5

Quote:
Originally Posted by v3x
Get/send message data for "TeamScore".
Except when trying to set a team score, that wouldn't update the score internally. It would only show up on the scoreboard and when the next TeamScore message was sent by the game, it would be updated to the internal value.

Setting team score requires some mucking around in memory. As for retrieving the team score you can hook the TeamScore message and increment a global variable for a team.

I have implemented both of the functions that were suggested in my CSHack module. But it is now pretty much defunct. I have compiled it recently against the latest AMXX SDK however and some of it still works while other parts do not. However, I can say for certain that the get and set team score natives in there do work. I don't plan on fixing what doesn't work any time soon though (if ever).

As for adding such natives to AMXX, there is no chance of that I'm afraid. At least not in the immediate future.
DS 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 18:27.


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