How can I reset iCount in this script. I tried -1 but it is not working.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>
new iCount = 0
public plugin_init()
{
register_plugin("noz_hudmsg","1.0","Lawnmoverman")
register_concmd("noz_hudmsg","noz_hudmsg",ADMIN_IMMUNITY,"noz_hudmsg - starts hud messages for players, like: scrollmsg and imessage")
}
public noz_hudmsg(id)
{
set_task(60.0, "DisplayMSG", id, "", 0, "b")
return PLUGIN_HANDLED
}
public DisplayMSG(id)
{
switch(iCount) {
case 0: {
set_dhudmessage( 0, 100, 200, -1.0, 0.15, 1, 6.0, 3.0, 0.1, 1.5 )
show_dhudmessage(0, "Welcome to NIGHT OVER ZERO CS 1.6 [PUB]")
set_dhudmessage( 0, 100, 200, -1.0, 0.18, 1, 6.0, 3.0, 0.1, 1.5 )
show_dhudmessage(0, "Visit www.nozgaming.eu")
}
case 1: {
set_dhudmessage( 230, 170, 0, -1.0, 0.15, 2, 6.0, 3.0, 0.1, 1.5 )
show_dhudmessage(0, "Add to favorites cs.nozgaming.eu")
set_dhudmessage( 230, 170, 0, -1.0, 0.18, 2, 6.0, 3.0, 0.1, 1.5 )
show_dhudmessage(0, "Visit www.nozgaming.eu")
}
case 2: {
set_dhudmessage( 190, 0, 210, -1.0, 0.15, 1, 6.0, 3.0, 0.1, 1.5 )
show_dhudmessage(0, "Powered by: NOZGaming.eu, OLO, KGBHosting,")
set_dhudmessage( 190, 0, 210, -1.0, 0.18, 1, 6.0, 3.0, 0.1, 1.5 )
show_dhudmessage(0, "EvoVPS, Netsons and AMX ModX")
}
case 3: {
set_dhudmessage( 255, 145, 0, -1.0, 0.15, 2, 6.0, 3.0, 0.1, 1.5 )
show_dhudmessage(0, "Welcome back to NIGHT OVER ZERO CS 1.6 [PUB]")
set_dhudmessage( 255, 145, 0, -1.0, 0.18, 2, 6.0, 3.0, 0.1, 1.5 )
show_dhudmessage(0, "Good luck & have fun!")
new iCount = -1 // I need iCount reset here so I can reloop all cases!
}
}
iCount++
}
Or can I just use iCount++ in every case and set it new iCount = 0 in case 3 ??