none of thiose functions is working
PHP Code:
#include < amxmodx >
//#include < hamsandwich >
new g_iBarTime, g_iBarTime2
public plugin_init( )
{
//RegisterHam( Ham_Use, "func_button", "FwdUseButton" );
g_iBarTime = get_user_msgid("BarTime")
g_iBarTime2 = get_user_msgid("BarTime2")
register_clcmd("say /bar", "Bar_Test")
}
public Bar_Test(id)
{
if(is_user_alive(id))
{
Make_BarTime(id)
}
return PLUGIN_CONTINUE
}
Make_BarTime(id, iSeconds)
{
message_begin(MSG_ONE_UNRELIABLE, g_iBarTime, .player=id)
write_short(iSeconds)
message_end()
}
Make_BarTime2(id, Float:flSeconds)
{
new iRoundedSeconds = floatround(flSeconds, floatround_ceil)
new iStartPercent = floatround((1.0-(flSeconds / iRoundedSeconds))*100)
message_begin(MSG_ONE_UNRELIABLE, g_iBarTime2, .player=id)
write_short(iRoundedSeconds)
write_short(iStartPercent)
message_end()
}
/*
public FwdUseButton( iEntity, iPlayer, iActivator, iUseType, Float:flValue )
{
if( !is_user_alive( iPlayer )
|| iUseType != 2
|| flValue != 1.0 )
{
return HAM_IGNORED;
}
client_print( iPlayer, print_chat, "Button Entity: %i", iEntity );
return HAM_IGNORED;
}
*/