AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Countdown (https://forums.alliedmods.net/showthread.php?t=238874)

GinNNy 04-18-2014 01:25

Countdown
 
Hi,
How to make countdown in hud and in center using client_print(id,print_center,"test")

Thanks

Buckshot 04-18-2014 03:13

Re: Countdown
 
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 }


All times are GMT -4. The time now is 17:54.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.