AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   cz deathmsg (https://forums.alliedmods.net/showthread.php?t=20386)

haimmaik 11-07-2005 15:08

cz deathmsg
 
how can i make a deathmsg in CZ? .. and locate the death event of CZ??
the one of 1.6 doesnt work

v3x 11-07-2005 15:11

Code:
register_event("DeathMsg", "Event_DeathMsg", "a");
That should work just fine.. Show me your code.

haimmaik 11-07-2005 15:18

it doesnt work....
it workes on cs1.6 and doesnt work on cz
here is the exact line:

Code:
register_event("DeathMsg","unpredator","a")

and here is the function:

Code:
 public unpredator()  {     new id=read_data(2)     if(ispredator[id]!=0)     {         ispredator[id]=0         plasma[id]=0         client_cmd(id,"unbind mouse3")         if(get_user_health(id)>100)         {             set_user_health(id,get_user_health(id)-100)         }         cs_set_user_armor(id,cs_get_user_armor(id,CS_ARMOR_VESTHELM)-500,CS_ARMOR_VESTHELM)         set_user_gravity(id,1.0)         set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,255)         set_user_footsteps(id,0)         set_user_maxspeed(id,350.0)         client_cmd(id,"cl_forwardspeed 400")         client_cmd(id,"cl_backspeed 400")         client_cmd(id,"cl_sidespeed 400")         client_cmd(id,"spk predator/depredator")         cs_reset_user_model(id)         message_begin(MSG_ONE, 98, {0,0,0}, id)         write_short(1<<0)   // fade lasts this long duration         write_short(1<<0)   // fade lasts this long hold time         write_short(1<<2)   // fade type HOLD         write_byte(100) // fade red         write_byte(0)   // fade green         write_byte(0)   // fade blue         write_byte(0)   // fade alpha         message_end()         set_hudmessage(0,30,200,-1.0,0.75,0,3.0,10.0,0.15,0.5,1)         show_hudmessage(id,"You are no longer a predator")                 if(ispredator[id]==0)         {         new HUD[51]         format(HUD,50,"")         message_begin(MSG_ONE, msgtext, {0,0,0}, id)           write_byte(0)           write_string(HUD)           message_end()         }     }  }

v3x 11-07-2005 15:21

Show me the function you've hooked it to.

haimmaik 11-07-2005 15:22

i added it up...

v3x 11-07-2005 15:27

Right after this part:
Code:
new id=read_data(2)
Put a small debug message like so:
Code:
client_print(id, 3, "*** You died! ***");
And it should come up in chat.

If it does, let me see the rest of your code.

haimmaik 11-07-2005 17:13

it doesnt...
read data 2 sux? Oo


All times are GMT -4. The time now is 23:43.

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