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

Quote:
Originally Posted by TheToretto
View Post
It is good looking and well done, but why split into several filterscripts? Even for two lines of code lol?
Exactly, I don't see any sense in that, the truth is I do not even know why you took the time to do something like that.

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");
All this and many other things more, honestly, your filter script is a disaster.

I think it is not necessary to do this:

OnPlayerLeaveDynamicArea
"if (!IsPlayerInAnyDynamicArea(playerid)) "

I don't understand what you tried to do with this.
PHP Code:
public OnPlayerClickPlayerTextDraw(playeridPlayerText:playertextid) {
    if(
playertextid == p_DirectionTextdraw[playerid]) {
        
ShowPlayerDialog(playerid0DIALOG_STYLE_MSGBOX"Player Location Display""Player Location Display\nCreated by Infinity\n\
            With help from Gravityfalls!"
"Okay""");
    }
    return 
1;

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)