Raised This Month: $ Target: $400
 0% 

Frag wont update scoreboard


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
dstopgunner
Senior Member
Join Date: Oct 2007
Old 05-24-2009 , 10:52   Frag wont update scoreboard
Reply With Quote #1

This plugin adds 10000health to a bot when it spawns (10100health)
and kills it when its health go lower than 10000 . (dont ask why =p)
Yes I have 100$ when I kill the bot BUT my frags didnt +1 imediately but only next round.
I think the set_msg_block(get_user_msgid("DeathMsg"),BLOC K_ONCE) is blocking it can someone help pls.

PHP Code:
register_event("Damage","event_damage_pain","be","2!0","3=0"
public 
event_damage_pain(id// bot id
{
 if(!
is_user_alive(id))
  return 
PLUGIN_HANDLED
  
 
new attacker get_user_attacker(id)
 if(
is_user_bot(id))
 {
  new 
hp get_user_health(id)
  if(
hp 10000)
  {
   
user_kill(id)
   
set_msg_block(get_user_msgid("DeathMsg"),BLOCK_ONCE)
   new 
frags money
   frags 
get_user_frags(attacker)
   
fm_set_user_frags(attackerfrags+1)
   
money cs_get_user_money(attacker)
   
cs_set_user_money(attackermoney+100)
  }
 }
 return 
PLUGIN_CONTINUE

dstopgunner 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 01:31.


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