The code that explains how to use the new hudsystem on amxmod 1.70 has one error.
http://wiki.tcwonline.org/index.php/..._Text_Channels
Code:
new g_MyMsgSync
public plugin_init()
{
register_clcmd("/show", "showMsg")
register_clcmd("/what", "whatMsg")
new g_MyMsgSync = CreateHudSyncObj()
}
public showMsg(id)
{
//last parameter is not needed
set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15)
//use this instead of show_hudmessage
ShowSyncHudMsg(id, g_MyMsgSync, "You have been shown a message!")
}
public whatMsg(id)
{
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15)
ShowSyncHudMsg(id, g_MyMsgSync, "what....")
}
Should be
Code:
new g_MyMsgSync
public plugin_init()
{
register_clcmd("/show", "showMsg")
register_clcmd("/what", "whatMsg")
g_MyMsgSync = CreateHudSyncObj()
}
public showMsg(id)
{
//last parameter is not needed
set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15)
//use this instead of show_hudmessage
ShowSyncHudMsg(id, g_MyMsgSync, "You have been shown a message!")
}
public whatMsg(id)
{
set_hudmessage(0, 255, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15)
ShowSyncHudMsg(id, g_MyMsgSync, "what....")
}
Changed this in plugin_init
Code:
new g_MyMsgSync = CreateHudSyncObj()
to
Code:
g_MyMsgSync = CreateHudSyncObj()
__________________