I need an advice... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I need an advice... (
/showthread.php?tid=83994)
I need an advice... -
Zeromanster - 28.06.2009
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,
Re: I need an advice... -
Grim_ - 28.06.2009
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.
Re: I need an advice... -
Zeromanster - 28.06.2009
So I'll have to make a callback for every building ?
Re: I need an advice... -
Grim_ - 28.06.2009
No. Make the callback contain every building you have.