AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Damage Sprite (https://forums.alliedmods.net/showthread.php?t=241291)

Kiske 05-31-2014 20:51

Damage Sprite
 
Hi,
How can I do to show this sprite:

http://i.imgur.com/vSOdqtP.png

I try with this, but doesn't work for me:
PHP Code:

new g_Message_Damage;

g_Message_Damage get_user_msgid("Damage");

message_begin(MSG_ONE_UNRELIABLEg_Message_Damage_id);
write_byte(0);
write_byte(0);
write_long(DMG_BULLET);
write_coord(0);
write_coord(0);
write_coord(0);
message_end(); 


I try to show that sprite when you receive damage from an entity, like this:
PHP Code:

ExecuteHam(Ham_TakeDamagevictim0entity1.0DMG_BULLET);
// show the 'sprite' 


Thanks in advanced!

Rirre 06-03-2014 06:29

Re: Damage Sprite
 
Not much info, but this works:
Code:
#include <fakemeta> new gmsgDamage; public plugin_init() {     gmsgDamage = get_user_msgid("Damage"); } public function(id) {     message_begin( MSG_ONE, gmsgDamage, _, id );     write_byte( 0 );     write_byte( 1 );     write_long( DMG_BULLET );     write_coord( 0 );     write_coord( 0 );     write_coord( 0 );     message_end(); }


All times are GMT -4. The time now is 09:42.

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