Raised This Month: $ Target: $400
 0% 

Ghost Touch to damage event HELP


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
dstopgunner
Senior Member
Join Date: Oct 2007
Old 05-13-2009 , 00:40   Ghost Touch to damage event HELP
Reply With Quote #1

Hello all!
Im making a ghost plugin. Very basic idea , ghost pounce on humans and kills them =]

1 ghost on t rest ct.

When a ghost touches an enemy he will pounce on them with animation
from model seqences. Then the enemy will -5 health per "pounce" which is continuous like every 3 seconds ( I dont know how to make the 3 seconds delay yet) . The ghost will + frags when it pounce on them.

But from this plugin I tested , it seems that the plugin hasnt even reached to the "public ghost_is_killing(id)" , its not touched it all. No frags are added or anyones dying. Help!! Thanks!!

PHP Code:
new bool:ghost[33]

new 
bool:ghost_killing[33]
new 
bool:victim_dying[33]
public 
fwd_touch(victimid)
{
 if(!
ghost[id])
 {
  return 
PLUGIN_HANDLED
 
}
 if(
ghost[id] && get_user_team(id) != get_user_team(victim) && is_user_alive(id) && is_user_alive(victim) && !victim_dying[victim])
 {
  
ghost_killing[id] = true
  victim_dying
[victim] = true
  set_task
(0.1"ghost_is_killing"id)
 }
 return 
PLUGIN_CONTINUE
}
public 
ghost_is_killing(id)
{
 new 
victim fake_touch(id victim)
 if(
ghost_killing[id] && is_user_alive(id) && is_user_alive(victim))
 {
  new 
hp get_user_health(victim)
  new 
score get_user_frags(id)
  new 
deaths cs_get_user_deaths(victim)
  
  
entity_set_int(idEV_INT_gaitsequence1)
  
entity_set_int(victimEV_INT_gaitsequence98)
 
  if(
hp 5)
  {
   
fm_set_user_health(victimhp 5)
   
fm_set_user_frags(idscore 1)
   
ghost_pounces[id] ++
   new 
Name[32]
   
get_user_name(victimName31)
   
client_print(idprint_center"You pounced %s %s times!",Name,ghost_pounces)
  }
  else if (
hp <)
  {
   
set_msg_block(get_user_msgid("DeathMsg"),BLOCK_ONCE)
   
message_begin(MSG_ALLget_user_msgid("DeathMsg"), {000}, 0)
   
write_byte(id)
   
write_byte(victim)
   
write_byte(0)
   
write_string("death")
   
message_end()
   
fm_set_user_frags(id score 3)
   
cs_set_user_deaths(id deaths 1)
   
   
ghost_killing[id] = false
   victim_dying
[victim] = false
   ghost_pounces
[id] = 0
   user_silentkill
(victim)
  }
 }

dstopgunner is offline
 


Thread Tools
Display Modes

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:32.


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