SA-MP Forums Archive
Best way to execute command after clients connects to the server? - 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)
+--- Thread: Best way to execute command after clients connects to the server? (/showthread.php?tid=663010)



Best way to execute command after clients connects to the server? - NexyAG - 18.01.2019

Hey, I'm looking for the best way to execute function after message "Connected to the IP:PORT" shows?
I know i can use timer when player connects to delay it like 465ms so it executes later but i need something that will execute it without delay, example when i send player message in OnPlayerConnect, he saw message than below message default SA:MP message "Connected to the xx"


Re: Best way to execute command after clients connects to the server? - NexyAG - 18.01.2019

Quote:
Originally Posted by ******
Посмотреть сообщение
OnPlayerConnect is the only way. I'm not sure how much faster you want - you can't send them a message before they connect.
I mean after we get this default SA:MP message "Connected to the xx server" when player connects


Re: Best way to execute command after clients connects to the server? - NexyAG - 18.01.2019

So one more question than, I have lot of problems, i mean i need pvar for each ptimer, and i oftenly forgets to kill them on player disconnect...
So is there anything better than SetTimerEx that will kill AUTOMATICALY when players dc?
I know ptask but its LOOPING i need one that will activate only once ex:
tRegister[playerid] = SetTimerEx("Register", 3000, "false", "d", playerid);
I want to kill automatically when player DC, or is there way to kill all ptimers for specific pID which does not uses alot of memory ?