[FilterScript] Player Location Display [v1.0]
#5

Quote:
Originally Posted by Pottus
View Post
Well there is some stuff here......

1.) No textdraw create in OnFilterScriptInit() for connected players.
2.) Using textdraws that should be global as player textdraws only textdraws with per-player output should be player textdraws.
3.) Lacking clean up code in OnFilterScriptExit()
4.) Major fuck-up with OnPlayerSpawn() that continually creates textdraws without destroying. Textdraws should never be destroyed unless the filterscript is unloaded. Your textdraws need to be created when a player connects ideally when they actually login.
5.) Useless OnPlayerDisconnect() code all of it.
6.) Why bother updating anything if nothing actually changed? Save the last CHANGE in a variable if it is the same then don't update.
Code:
if(angle >= 355.0 || angle <= 5.0) PlayerTextDrawSetString(playerid, p_DirectionTextdraw[playerid], "N");
	else if(angle >= 265.0 && angle <= 275.0) PlayerTextDrawSetString(playerid, p_DirectionTextdraw[playerid], "E");
	else if(angle >= 175.0 && angle <= 185.0) PlayerTextDrawSetString(playerid, p_DirectionTextdraw[playerid], "S");
	else if(angle >= 85.0 && angle <= 95.0) PlayerTextDrawSetString(playerid, p_DirectionTextdraw[playerid], "W");
Thanks for all this. This was old code stuffed somewhere in my hard drive and I decided to make something out of it. I can’t believe I missed out this in my clean up process. I’ll work on this tomorrow and will push the updates. I was planning to make this a include or a gamemode module hence why some of the things listed in your list are there, I just seemed to forget that this was a filterscript, lmao.
Reply


Messages In This Thread
Player Location Display [v1.1.1] - by Infin1ty - 20.02.2019, 21:11
Re: Player Location Display [v1.0] - by TheToretto - 20.02.2019, 21:18
Re: Player Location Display [v1.0] - by Infin1ty - 20.02.2019, 21:31
Re: Player Location Display [v1.0] - by Pottus - 20.02.2019, 21:39
Re: Player Location Display [v1.0] - by Infin1ty - 20.02.2019, 21:46
Re: Player Location Display [v1.0] - by Pottus - 20.02.2019, 21:57
Re: Player Location Display [v1.0] - by Undef1ned - 20.02.2019, 22:12
Re: Player Location Display [v1.0] - by Infin1ty - 21.02.2019, 07:02
Re: Player Location Display [v1.1] - by Infin1ty - 21.02.2019, 08:06
Re: Player Location Display [v1.0] - by TheToretto - 21.02.2019, 08:56
Re: Player Location Display [v1.0] - by Infin1ty - 21.02.2019, 09:41
Re: Player Location Display [v1.0] - by Infin1ty - 21.02.2019, 09:43
Re: Player Location Display [v1.0] - by Undef1ned - 21.02.2019, 14:06
Re: Player Location Display [v1.0] - by Kasichok - 21.02.2019, 14:45
Re: Player Location Display [v1.0] - by Infin1ty - 21.02.2019, 14:45
Re: Player Location Display [v1.0] - by Infin1ty - 21.02.2019, 14:47
Re: Player Location Display [v1.0] - by Kasichok - 21.02.2019, 15:06
Re: Player Location Display [v1.0] - by Infin1ty - 21.02.2019, 15:28
Re: Player Location Display [v1.0] - by Undef1ned - 21.02.2019, 17:40
Re: Player Location Display [v1.0] - by OutlawPC - 24.03.2019, 01:50

Forum Jump:


Users browsing this thread: 1 Guest(s)