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

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");
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: 2 Guest(s)