[HELP]Adding cmds from a another Admin FS.
#21

bump
8char
Reply
#22

SeifAdmin = Strtok Cmd
LAdmin = Dcmd.

You need to change these cmds to Dcmd.
Reply
#23

Uh, is that really neccasary?

Since Ladmin has strcmp cmds too.( But it were just a few like rcon cmds) ? o.O k gonna try it.. but im goin
to fail
Reply
#24

Problem still not solved D=
Reply
#25

Hi, To help you, we need to see the code... Copy and past here the whole command code.... Mybe it is a " {} " problem or some think you didn't do.... We need the pwno code to can help you... Like someone said before it should be:
PHP код:
[PAWN]The Script Lines[/PAWN
It will be like this:
pawn Код:
The Script Lines
Reply
#26

pawn Код:
if(strcmp(cmd, "/setname", true) == 0)
{
new newname[128];
if (PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
    {
    tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, ORANGE, "USAGE: /setname [playerid] [newname]");
            SendClientMessage(playerid, ORANGE, "FUNCTION: Will change the player's current name. ");
            return 1;
        }

        giveplayerid = ReturnUser(tmp);
        if(giveplayerid != INVALID_PLAYER_ID)
        {
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            while ((idx < length) && ((idx - offset) < (sizeof(newname) - 1)))
            {
                newname[idx - offset] = cmdtext[idx];
                idx++;
            }
            newname[idx - offset] = EOS;
            if(!strlen(newname))
                {
                    SendClientMessage(playerid, ORANGE, "USAGE: /setname [playerid] [newname]");
                    return 1;
                }
            else
            {
            printf("[ADMIN NEWS]: Admin %s renamed %s.", sendername, giveplayer);
            format(string, sizeof(string), "-| Administrator %s renamed %s. [New Name: %s ] |-", sendername,giveplayer,newname);
            SendClientMessageToAdmins(ADMIN_RED, string,1);
            SetPlayerName(giveplayerid, newname);
            }
        }

        else if(giveplayerid == INVALID_PLAYER_ID)
        {
            format(string, sizeof(string), "%d is not an active player.", giveplayerid);
            SendClientMessage(playerid, RED, string);
        }
    }
    else
    {
    SendClientMessage(playerid, RED, "You are not an admin with the required level.");
    }
    return 1;
}
Reply
#27

Try this one but, you are making this in what FS? If you send me the FS it is easly coz i can test.... In my pawno it compile without any error or warn...

pawn Код:
if(strcmp(cmd, "/setname", true) == 0)
}
new newname[128];
if (PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
}
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
}
    SendClientMessage(playerid, ORANGE, "USAGE: /setname [playerid] [newname]");
    SendClientMessage(playerid, ORANGE, "FUNCTION: Will change the player's current name. ");
    return 1;
}
    giveplayerid = ReturnUser(tmp);
if(giveplayerid != INVALID_PLAYER_ID)
}
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
}
       idx++;
}
new offset = idx;
while ((idx < length) && ((idx - offset) < (sizeof(newname) - 1)))
       newname[idx - offset] = cmdtext[idx];
       idx++;
}
       newname[idx - offset] = EOS;
if(!strlen(newname))
}
     SendClientMessage(playerid, ORANGE, "USAGE: /setname [playerid] [newname]");
     return 1;
}
else
}
     printf("[ADMIN NEWS]: Admin %s renamed %s.", sendername, giveplayer);
     format(string, sizeof(string), "-| Administrator %s renamed %s. [New Name: %s ] |-", sendername,giveplayer,newname);
     SendClientMessageToAdmins(ADMIN_RED, string,1);
     SetPlayerName(giveplayerid, newname);
     }
}
else if(giveplayerid == INVALID_PLAYER_ID)
}
     format(string, sizeof(string), "%d is not an active player.", giveplayerid);
     SendClientMessage(playerid, RED, string);
     }
}
else
}
     SendClientMessage(playerid, RED, "You are not an admin with the required level.");
     }
     return 1;
}
Reply
#28

26 errors usually means youre missing a bracket - look thru your FS.
Reply
#29

On my pc i compile it and haven't any error... Mybe when you past in the fs you past bad... send the FS(upload and post link) i see what happen and then i upload again!
Reply
#30

i'ma pm u it.

The both right? LAdmin and Seif?
Reply
#31

Does SeifAdmin have an include file the defines everything outside of the main filterscript, perhaps?
Reply
#32

It only has MD5, and i added that to Ladmin but still doesn't work

Aswell as the colors..
Reply
#33

I recived the link but cant download... Upload At MegaUpload.com or something....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)