Posts: 44
Threads: 5
Joined: Dec 2013
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:
Download:
Link pastebin
Link mediafire
Credits:
pawn Код:
/* SA-MP Include Attach3DTextLabelToObject
*
* © by Kaliber, 2015
*
*/
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
Talk about obfuscated code.
Posts: 44
Threads: 5
Joined: Dec 2013
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.
Posts: 44
Threads: 5
Joined: Dec 2013
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.
Posts: 155
Threads: 10
Joined: Oct 2013
Reputation:
0
I can read his code just fine... Want me to re-code it simpler for you Pottus?
Posts: 200
Threads: 39
Joined: Feb 2013
Reputation:
0
It is either obfuscated or written without any consideration for user-friendliness. Anyway, does it move the label when the object moves (smoothly)?
Posts: 3,324
Threads: 96
Joined: Sep 2013
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.
Posts: 801
Threads: 29
Joined: May 2012
Reputation:
0
The code literally makes my eyes hurt.
Posts: 155
Threads: 10
Joined: Oct 2013
Reputation:
0
Guess it takes people more time than others to understand.
Posts: 801
Threads: 29
Joined: May 2012
Reputation:
0
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.
Posts: 3,324
Threads: 96
Joined: Sep 2013
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?).