Quote:
Originally Posted by RogueDrifter
PHP Code:
/* Script Version: v1 This FilterScript was created by Dennis12 LEAKS.RO -> leaks.ro/profile/411-dennis12/ SA-MP.RO -> www.sa-mp.ro/profile/20571-dennis12/ SA-MP.COM -> forum.sa-mp.com/member.php?u=305443 */
Leaks?
Also this doesn\'t make any sense:
PHP Code:
public OnFilterScriptInit() { for(new i = 0, x = 50; i < x; i++) SendClientMessageToAll(-1,"");
Also why do you people use these useless meaningless macros?
PHP Code:
#define D12_MESSAGE SendClientMessage
And why are you forcing player position at spawn anyway?
PHP Code:
public OnPlayerSpawn(playerid) { SetPlayerPos(playerid, 112.6015,-162.6049,1.5781);
I believe these should\'ve been on top of the script
PHP Code:
// Enums enum D12_ATTACHED_OBJECT { objectID, objectSlot, objectBone, Float: objectPos[3], Float: objectRot[3], Float: objectScale[3] }; new D12_AO[MAX_PLAYERS][MAX_PLAYER_ATTACHED_OBJECTS][D12_ATTACHED_OBJECT]; enum { D_EDITOBJECT, D_CLEARSLOT, D_EDITSLOT };
Not big of a deal since you haven\'t used them before but you should keep them on top always to avoid usage before declaration.
And why not use a more advanced file saving system?
Also this didn\'t need 1024 cells:
PHP Code:
new dialog[1024];
Also for best practice its always better to use sizeof(string) instead of the actual size of the string for compatibility issues in case if the size of that string actually changes one time so you wouldn\'t get \'Array index out of bounds\' messages.
PHP Code:
format(string, 64, "You are now editing attached object in the slot %d.", listitem);
I\'m gonna give this 2 stars it could\'ve been done better good luck improving.
|
It\'s only a filterscript .. yea, i made a few mistakes by code, but I also mentioned that I did not give too much effort, because it is just an FS you use occasionally, do not implement it on gamemodes or something.
leaks is a romanian site dedicated to SA-MP, but also programming in other languages.
Yea, ik,i didn\'t not need it 1024 cells for dialog, i put it for test and i forget to change.
I made a few changes to the code just for your pleasure
I hope you like it. I updated in the post.