AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   How to make a timer which then Says to the client something (https://forums.alliedmods.net/showthread.php?t=75831)

Marcin 08-13-2008 02:29

How to make a timer which then Says to the client something
 
I Want it to alert the client , lets say I will give 30s to answer the menu and I will make timer at 20s Then it will warn him with a message

How do I do this because I keep on getting errors.

DiscoBBQ 08-14-2008 08:45

Re: How to make a timer which then Says to the client something
 
Code:

//Call this where you want to start the 20 second timer:
CreateTimer(20.0, WarnClient, Client);

Code:

//Insert this somewere in your function, obviously not within another:
public Action:WarnClient(Handle:Timer, any:Client)
{
 
 //Print:
 PrintToChat(Client, "[SM] <Insert Warning Message Here>");
}


teame06 08-14-2008 09:26

Re: How to make a timer which then Says to the client something
 
Code:
//Insert this somewere in your function, obviously not within another: public Action:WarnClient(Handle:Timer, any:Client) {     //Print:     if(IsClientConnected(Client)) // Safety Check just incase client leaves     {          PrintToChat(Client, "[SM] <Insert Warning Message Here>");     } }


All times are GMT -4. The time now is 20:02.

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