[FilterScript] Dennis12's Attachments Object Editor
#5

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 
050xi++) 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(playerid112.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,
    
FloatobjectPos[3],
    
FloatobjectRot[3],
    
FloatobjectScale[3]
};
new 
D12_AO[MAX_PLAYERS][MAX_PLAYER_ATTACHED_OBJECTS][D12_ATTACHED_OBJECT];
 
enum D_EDITOBJECTD_CLEARSLOTD_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(string64"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.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)