Raised This Month: $51 Target: $400
 12% 

win frags


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ricky
Senior Member
Join Date: Jul 2005
Old 07-06-2010 , 03:42   win frags
Reply With Quote #1

i had used a similar script that worked in the past but lost it. Can anyone help solve what i'm trying to do here?

public plugin_init()
{
register_event("SendAudio", "T_frags", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "CT_frags", "a", "2&%!MRAD_ctwin")
}

public CT_frags(id)
{
if(CsTeams:cs_get_user_team(id) == CS_TEAM_CT)
{
set_user_frags(id, get_user_frags(id) +3)

message_begin(MSG_BROADCAST,get_user_msgid("S coreInfo"));
write_byte(id);
write_short(get_user_frags(id));
write_short(cs_get_user_deaths(id));
write_short(0);
write_short(1);
message_end();
}
return PLUGIN_HANDLED
}
Ricky is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 07-06-2010 , 07:42   Re: win frags
Reply With Quote #2

What are u trying to do??
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 07-06-2010 , 07:53   Re: win frags
Reply With Quote #3

There is nothing like id in SendAudio event. You should use a cycle to pass through all players. Look on get_players() and pass through team, then you won't need to call the event two useless times.

Edit: Oh, sorry. Didn't notice that 2&%!MRAD_ctwin. Actually, I think it's still better to hook round end and pass through teams there.
__________________
Currently busy working on a very large scale anime database project.
Backstabnoob is offline
Ricky
Senior Member
Join Date: Jul 2005
Old 07-06-2010 , 16:11   Re: win frags
Reply With Quote #4

What I'm trying to do is add frags to the winning team after each round. This method worked and scores updated right away. After a few years of being away my scripting abilities are gone and I need help.
Ricky is offline
Ricky
Senior Member
Join Date: Jul 2005
Old 07-06-2010 , 19:23   Re: win frags
Reply With Quote #5

solved. thanks.
Ricky 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 12:58.


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