I need an advice...
#1

Hello, i made this on my server:

When you walk up to a certain door, a textdraw pops up and tells you the name of the building.
Then after that it sets the timer for 5 seconds and when 5 seconds run out then it disapperars.

It's all made under PlayerToPoint, so im asking this:

Let's say a player is standing there, doing nothing... how much timers is it going to set ? Will it make lagg ? How to fix this ?

Thank you,
Reply
#2

You can have as little as one timer a time for a player when they go to that building, and then destroy it after 5 seconds. In other words, you can have very few:
pawn Код:
//top of script
new Timer; //The variable so we can destroy the timer later
forward StopBuildingText(playerid);

//Under PlayertoPoint Function check
ShowBuildingTextForPlayer(playeird); //Your callback for showing the text
Timer = SetTimerEx("StopBuildingText", 5000, 0, "i", playerid);

public StopBuildingText(playerid)
{
  //Your script for destroying the textdraw
}
Something similar to this.
Reply
#3

So I'll have to make a callback for every building ?
Reply
#4

No. Make the callback contain every building you have.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)