Raised This Month: $ Target: $400
 0% 

Frag wont update scoreboard


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-24-2009 , 23:11   Re: Frag wont update scoreboard
Reply With Quote #1

Quote:
Originally Posted by --kml-- View Post
not sure this will work xD
No, it won't.
You don't even know how to script properly so why are you providing help?

Your solution is that you didn't the scoreboard.
http://wiki.amxmodx.org/Half-Life_1_...ents#ScoreInfo

Send a ScoreInfo event for the killer with the updated frags.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
dstopgunner
Senior Member
Join Date: Oct 2007
Old 05-25-2009 , 01:52   Re: Frag wont update scoreboard
Reply With Quote #2

Sry im not good at messaging , is the link refering to this?
I add this into the script?
Pls explain how thx.

........
........
..set_msg_block(get_user_msgid("DeathMsg"),BLOCK_ONCE)
message_begin(MSG_ALL, get_user_msgid("DeathMsg"), {0, 0, 0}, 0)
write_byte()
write_byte()
write_byte(1) // 1frag?
message_end()
..new frags , money
dstopgunner is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-25-2009 , 03:01   Re: Frag wont update scoreboard
Reply With Quote #3

PHP Code:
message_begin(MSG_BROADCASTget_user_msgid("ScoreInfo"))
write_byte(id// the player you're updating score to...
write_short(get_user_frags(id) + 1// get player's frags and increase them by 1
write_short(get_user_deaths(id)) // death count stays the same
write_short(0// ClassID, this is not for CS, but for TFC and so... I think :}
write_short(get_user_team(id)) // team ID he's in
message_end() 
and you would best cache the value of get_user_msgid()
__________________
Hunter-Digital is offline
dstopgunner
Senior Member
Join Date: Oct 2007
Old 05-26-2009 , 23:39   Re: Frag wont update scoreboard
Reply With Quote #4

Quote:
Originally Posted by Hunter-Digital View Post
PHP Code:
message_begin(MSG_BROADCASTget_user_msgid("ScoreInfo"))
write_byte(id// the player you're updating score to...
write_short(get_user_frags(id) + 1// get player's frags and increase them by 1
write_short(get_user_deaths(id)) // death count stays the same
write_short(0// ClassID, this is not for CS, but for TFC and so... I think :}
write_short(get_user_team(id)) // team ID he's in
message_end() 
and you would best cache the value of get_user_msgid()

tried but not working...
does any event interfere with this code?
dstopgunner is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-27-2009 , 00:21   Re: Frag wont update scoreboard
Reply With Quote #5

Yes... itself =) the message just updates the scoreboard, BUT, if you don't set the frags also, at the next scoreboard update (when the player gets killed or kills) it will update the real frags count, this is a working example:
PHP Code:
#include <amxmodx>
#include <fun>
 
new g_msgid_scoreinfo
 
public plugin_init()
{
    
g_msgid_scoreinfo get_user_msgid("ScoreInfo")
 
    
register_clcmd("test""cmd_test")
}
 
public 
cmd_test(id)
{
    new 
frags get_user_frags(id) + 1
 
    set_user_frags
(idfrags)
 
    
message_begin(MSG_ALLg_msgid_scoreinfo)
    
write_byte(id)
    
write_short(frags)
    
write_short(get_user_deaths(id))
    
write_short(0)
    
write_short(get_user_team(id))
    
message_end()
 
    return 
PLUGIN_HANDLED

__________________

Last edited by Hunter-Digital; 05-27-2009 at 00:24.
Hunter-Digital 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 01:31.


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