AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [help]fw_TakeDamage + screen fade (https://forums.alliedmods.net/showthread.php?t=135584)

OvidiuS 08-17-2010 16:20

[help]fw_TakeDamage + screen fade
 
oliki want to add screen fade to attacker, but i dont know where to add it?
tried many ways, but i got unreachable code error

PHP Code:

 if ((get_user_weapon(attacker) == CSW_M3) && (damage == 643.0 || damage == 649.0 || damage == 630.0))
  return 
HAM_SUPERCEDE;
 
 return 
HAM_IGNORED;


and here is the screen fade
PHP Code:

  message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, attacker)
  
write_short(1<<12)
  
write_short(1<<12)
  
write_short(0x0000)
  
write_byte (255)
  
write_byte (0)
  
write_byte (0)
  
write_byte (100)
  
message_end() 


edit: already found what was i loking for,
thanks anyway.
Lock :P

XxAvalanchexX 08-17-2010 19:29

Re: [help]fw_TakeDamage + screen fade
 
It should work just above the HAM_IGNORED line:

PHP Code:

 if ((get_user_weapon(attacker) == CSW_M3) && (damage == 643.0 || damage == 649.0 || damage == 630.0))
  return 
HAM_SUPERCEDE;

  
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, attacker)
  
write_short(1<<12)
  
write_short(1<<12)
  
write_short(0x0000)
  
write_byte (255)
  
write_byte (0)
  
write_byte (0)
  
write_byte (100)
  
message_end()
 
 return 
HAM_IGNORED;




All times are GMT -4. The time now is 21:54.

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