[Include] Attach3DTextLabelToObject by Kaliber
#1

In another post check this out:
Quote:
Originally Posted by Luis-
Посмотреть сообщение
Here we are with the new topic, seeing as Garsino has left SA:MP.

FUNCTIONS

pawn Код:
native Attach3DTextLabelToObject(Text3D:id, objectid, Float:OffsetX, Float:OffsetY, Float:OffsetZ);
......
And I search, and found one post in forum germany, and I decided to bring their respective credits.

Attach3DTextLabelToObject
pawn Код:
native Attach3DTextLabelToObject(Text3D:id, objectid, Float:OffsetX, Float:OffsetY, Float:OffsetZ);
native Detach3DTextLabel(Text3D:id);

native AttachPlayer3DTextLabelToObject(playerid, PlayerText3D:id, objectid, Float:OffsetX, Float:OffsetY, Float:OffsetZ);
native DetachPlayer3DTextLabel(PlayerText3D:id);
if you created more than 1,000 Attach3DTextLabelToObject, all labels will be updated by ~9ms!

Include:
pawn Код:
#include <attach>
Download:
Link pastebin
Link mediafire

Credits:
pawn Код:
/* SA-MP Include Attach3DTextLabelToObject
 *
 * © by Kaliber, 2015
 *
 */
Reply
#2

Nice, good job!
Reply
#3

Talk about obfuscated code.
Reply
#4

Quote:
Originally Posted by Lacrim
Посмотреть сообщение
Nice, good job!
Include is of Kaliber, from one germany forum, I just came to the post, he did a good job, but there was no include those here.


Quote:
Originally Posted by Pottus
Посмотреть сообщение
Talk about obfuscated code.
The code is more advanced, not for new users, but it works correctly and already only to use.
Reply
#5

Quote:
Originally Posted by pabloalber84
Посмотреть сообщение
The code is more advanced, not for new users, but it works correctly and already only to use.
I didn't say it wouldn't work correctly but it is nice to actually be able to read code anyone looking at this is going to have a hard time trying to figure it out. Advanced user or not you should be able to read code easily the whole design of this system is excessive in terms of obfuscation and convolution.
Reply
#6

Quote:
Originally Posted by Pottus
Посмотреть сообщение
I didn't say it wouldn't work correctly but it is nice to actually be able to read code anyone looking at this is going to have a hard time trying to figure it out. Advanced user or not you should be able to read code easily the whole design of this system is excessive in terms of obfuscation and convolution.
From a professional point of view has a code that confuses anyone, and you can understand seeing the possible outcomes of each function shown there, to reach the conclusion that code is a simple but well scripted.
Reply
#7

Quote:
Originally Posted by pabloalber84
Посмотреть сообщение
From a professional point of view has a code that confuses anyone, and you can understand seeing the possible outcomes of each function shown there, to reach the conclusion that code is a simple but well scripted.
What the hell is that supposed to mean? Your explanation is completely incoherent and makes absolutely no sense.
Reply
#8

Quote:
Originally Posted by pabloalber84
Посмотреть сообщение
From a professional point of view has a code that confuses anyone, and you can understand seeing the possible outcomes of each function shown there, to reach the conclusion that code is a simple but well scripted.
Not only because a code "apparently" works fine you can reach the conclusion that it's well scripted.
Reply
#9

I can read his code just fine... Want me to re-code it simpler for you Pottus?
Reply
#10

Quote:
Originally Posted by SkittlesAreFalling
Посмотреть сообщение
I can read his code just fine... Want me to re-code it simpler for you Pottus?
The argument isn't complexity the argument is that the code is obfuscated and convoluted, obfuscation and convolution does not equate to complexity rather silliness and difficult to read code. Could you picture an entire gamemode coded in this manner? That would be absolutely ridiculous so why bother coding like a donkey to begin with?
Reply
#11

Quote:
Originally Posted by Pottus
Посмотреть сообщение
The argument isn't complexity the argument is that the code is obfuscated and convoluted, obfuscation and convolution does not equate to complexity rather silliness and difficult to read code. Could you picture an entire gamemode coded in this manner? That would be absolutely ridiculous so why bother coding like a donkey to begin with?
You need glasses, is my point.
Reply
#12

Quote:
Originally Posted by SkittlesAreFalling
Посмотреть сообщение
You need glasses, is my point.
Even if I did whatever point you are trying to make is moot as you have failed to even reiterate any level counter point beyond an adolescent remark from my last statement.
Reply
#13

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Even if I did whatever point you are trying to make is moot as you have failed to even reiterate any level counter point beyond an adolescent remark from my last statement.
Do I really need to? You clearly don't know what obfuscation is (coding wise).
Reply
#14

It is either obfuscated or written without any consideration for user-friendliness. Anyway, does it move the label when the object moves (smoothly)?
Reply
#15

Lol.

This code is nailed to the ceiling but still touches the floor. It's a mess. I feel like this guy literally made it look stupid on purpose. There is no point in doing it like that.
Reply
#16

The code literally makes my eyes hurt.
Reply
#17

Guess it takes people more time than others to understand.
Reply
#18

The problem relies on the fact that everything is so fastened and tight that it's quite hard for your eyes not to get lost when looking at that code.
Reply
#19

pawn Код:
new Float:tmp[3],i;
for(;; i++)
if(i==MAX_3DTEXT_GLOBAL) break;
I won't discuss the functionality of this include, but I don't think that this will make your code wiser, just more unreadable.

Edit: you're also looping through MAX_3DTEXT_GLOBAL = 1024 labels every 199 milliseconds, that's a bit heavy for me. Consider using foreach.
There's also a double check for INVALID_3DTEXT_ID in Detach3DTextLabel.
Reply
#20

Quote:
Originally Posted by SkittlesAreFalling
Посмотреть сообщение
Guess it takes people more time than others to understand.
Nobody ever said we didn't know what any of the code does. It's just a very useless scripting style (hell can we even call it a 'style' at all?).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)