Raised This Month: $ Target: $400
 0% 

hit indicator


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 05-01-2012 , 16:59   Re: hit indicator
Reply With Quote #6

Quote:
Originally Posted by <VeCo> View Post
You can format the strings directly in the client_print native - there's no need to make variables and use format.
I know. I have plans for this code that will need that functionality.

But can ANYONE help me figure out why this won't show the X to the attacker, or any of the prints when damage is done. Its driving me mad. I've looked at 3 different examples of similar functionality and it should work. Am i missing anything? Is the server stupid? Is my compiler a craphole? Here's my current code, shortened to keep the extraneous code out of people's minds.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <float>
#include <hamsandwich>
//init
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_TakeDamage"player""ham_dammich"1)
    
g_SyncOb CreateHudSyncObj()


public 
ham_dammich(victimIDinflictorIDattackerIDFloat:f_damagetype)
{
    if(
get_pcvar_num(g_pcvar_toggle)==|| !is_user_alive(victimID) || !is_user_alive(attackerID))
        return 
HAM_HANDLED
    
    client_print
(attackerIDprint_chat"You hit him!")
    
    
set_hudmessage(1811811810.0, -1.510.14.00.020.02, -1)
    
ShowSyncHudMsg(attackerIDg_SyncOb"X")
    
    
set_hudmessage(181001.00.510.14.00.020.02, -1)
    
ShowSyncHudMsg(victimIDg_SyncOb"Run!")
    
    return 
HAM_HANDLED

it doesn't show anything. Not once. Shots taken slow, or at real-time playing. HELP! 2 plugins are suffering.

Last edited by Liverwiz; 05-01-2012 at 17:01. Reason: More code snipping.
Liverwiz 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 07:54.


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