Raised This Month: $ Target: $400
 0% 

make_deathmsg usage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-06-2010 , 21:25   Re: make_deathmsg usage
Reply With Quote #9

Quote:
Originally Posted by wrecked_ View Post
The get_weaponname() function requires the CSW_* id.

Code:
new name[20] get_weaponname( get_user_weapon( id ), name, 19 ) format( name, 19, "%s", name[7] ) make_deathmsg( iAttacker, iVictim, 0, name )
Give that a shot.
format() is not needed, wrecked.

"weapon_ak47"
"ak47" can be accessed with name[ 7 ].
PHP Code:
new name[20]
get_weaponnameget_user_weaponiAttacker ) , name charsmaxname ) )
make_deathmsgiAttacker iVictim name] ) 
GXLZPGX, where is this being called? If you are using DeathMsg then you cannot pass victim and attacker as params like that; you must use read_data.
PHP Code:
public plugin_init()
{
    
register_event"DeathMsg" "EvDeathMsg" "a" "1>0" );    
}

public 
EvDeathMsg()
{
    new 
iKiller read_data);
    new 
iVictim read_data);

    static 
name[20]
    
get_weaponnameget_user_weaponiKiller ) , name charsmaxname ) )
    
make_deathmsgiKiller iVictim name] )

__________________

Last edited by Bugsy; 08-06-2010 at 21:33.
Bugsy 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 00:06.


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