Quote:
Originally Posted by <VeCo>
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(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_TakeDamage, "player", "ham_dammich", 1)
g_SyncOb = CreateHudSyncObj()
public ham_dammich(victimID, inflictorID, attackerID, Float:f_damage, type)
{
if(get_pcvar_num(g_pcvar_toggle)==0 || !is_user_alive(victimID) || !is_user_alive(attackerID))
return HAM_HANDLED
client_print(attackerID, print_chat, "You hit him!")
set_hudmessage(181, 181, 181, 0.0, -1.5, 1, 0.1, 4.0, 0.02, 0.02, -1)
ShowSyncHudMsg(attackerID, g_SyncOb, "X")
set_hudmessage(181, 0, 0, 1.0, 0.5, 1, 0.1, 4.0, 0.02, 0.02, -1)
ShowSyncHudMsg(victimID, g_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.