05.09.2018, 18:12
I see no design over the textdraw its just numbers and a black box, could've at least made any sort of a change since it's basically the same as the old one with just a different color? (And a black box in the background which doesn't look very nice)
Also could've been more concise, and i see missing code over the hooks, you should read the include tutorial by Lordzy https://sampforum.blast.hk/showthread.php?tid=497081 .
Shouldn't use CallLocalFunction it's slower than a direct call with a check for defenition, i don't care how insignificant the time difference is to you but it's still a fact, it is slower.
Also is it just me or is the code not even indented? And the variable naming is horrible 'new bool:False = false' what even is this? and its too common i can see it causing problems for big scripts.
I don't see any need for this at all:
I also am not sure if this 'ptdssws' variable should be global. (What a name as well). You're not even checking if the textdraw is created before doing that timer gonig through all players :/ ' for(new i;i<MAX_PLAYERS;i++)' could've also been done better. (See GetPlayerPoolSize() through the wiki)
Anyhow i'm sure you could've done this better, props on your effort into this but try to keep improving things more and adding a value to it, good luck.
Also could've been more concise, and i see missing code over the hooks, you should read the include tutorial by Lordzy https://sampforum.blast.hk/showthread.php?tid=497081 .
Shouldn't use CallLocalFunction it's slower than a direct call with a check for defenition, i don't care how insignificant the time difference is to you but it's still a fact, it is slower.
Also is it just me or is the code not even indented? And the variable naming is horrible 'new bool:False = false' what even is this? and its too common i can see it causing problems for big scripts.
I don't see any need for this at all:
Код:
#define PlayerTextDrawSetStrings(%1,%2,%3,%4)\ do{\ format(ptdssws, sizeof (ptdssws), (%3), %4);\ PlayerTextDrawSetString((%1), (%2), ptdssws);\ }\ while (False)
Anyhow i'm sure you could've done this better, props on your effort into this but try to keep improving things more and adding a value to it, good luck.