The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 867 - File: showthread.php PHP 7.4.18 (Linux)
File Line Function
/showthread.php 867 errorHandler->error

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create a Timer
Hello everyone, as we know. Is there people who do not know what is a timer and how to create it. In this tutorial i will teach how to:

We create the timer


Quote:public OnGameModeInit()
                      // Don't use these lines if it's a filterscript
                      SetGameModeText("Blank Gamemode");

SetTimer("RandomMessage", 5000, 1);

SetTimer is in where create the timer, "RandomMessage" is the name of the callback. (5000 = Five Seconds)

After, we create the forward which will call the callback:


Quote:forward RandomMessage(playerid);
public RandomMessage(playerid)
      SendClientMessage(playerid, 0xFFFFFFFF,"Register at our forum!");
      return 1;

You can create more timers using more stuff.. THis is just a basic tutorial. I hope it helps you...

Messages In This Thread
How to create a Timer - by alimaroco - 04-13-2017, 07:06 PM
RE: How to create a Timer - by Lance - 04-27-2017, 11:08 AM

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to create a pickup that can be picked-up on-foot and in-vehicle alimaroco 1 3,573 06-11-2022, 10:14 AM
Last Post: dvicelulares

Forum Jump:

Users browsing this thread: 1 Guest(s)