Code:
#include < amxmodx >
new Adam_Sandler = 175; // Hi, i'm adam sandler. I'm 175cm tall
public plugin_init()
{
register_plugin( "Adam sandler to flour beetle converter", "1337", "Miley cyrus" )
register_clcmd("say /convert", "Shrink" )
}
public Shrink( AdamSandler )
{
Adam_Sandler-- // Shrink adam sandler by 1cm
client_print( AdamSandler, print_center, "Height of Adam Sandler: %i", Adam_Sandler ) // print his height, in center.. as you asked for.
if( Adam_Sandler == 0 ) // Check if countdown reached 0 (this will only be called when adam sandler is 0cm tall and has became a flour beetle)
{
// Place code to execute when countdown is over here
client_print( AdamSandler, print_chat, "Good job. Adam Sandler is now a flour beetle" )
return; // return before it gets to the set_task again.. Cause then the countdown will keep going, we don't want that. Don't move this. Always have this last in your countdown.
}
set_task( 1.0, "Shrink", AdamSandler ) // repeat the process every second
}
__________________