[HELP] Admin Commands
#1

So i am using lux admin system and i am wanting to add an "Force a player to read the rules command" lux is dcmd i looked on ******...no luck :P please anyone
Reply
#2

Well I downloaded the source of LuxAdmin and there doesn't appear to be a rules command.
Reply
#3

i know you can make an command for admins that Forces an player to read the rules i have seen it in many servers but i dont know how to word the command
Reply
#4

That is indeed correct. The LuxAdmin system doesn't have a rules command, so you must make one, and instead showing it to the player that typed it, show it to the TargetID instead.
Reply
#5

kk thanks
Reply
#6

For dcmd, here is the example code with sscanf usage. So mind getting sscanf or i can also make a "strtok" function.
sscanf: https://sampforum.blast.hk/showthread.php?tid=120356
pawn Код:
dcmd_forcerules(playerid, params[])
{
    new targetID;
    if(! sscanf(params, "u", targetID))
    {
        if(IsPlayerConnected(targetID))
        {
            ShowPlayerRules(targetID); // you have manage to make your own stock function, this one is just an  example
        }
    }
    return true;
}
OR, for a strtok function:
pawn Код:
dcmd_forcerules(playerid, params[])
{
    new tmp[128], idx;
    tmp = strtok(params, idx);
    new targetID = strval(tmp);
    if(IsPlayerConnected(targetID))
    {
        ShowPlayerRules(targetID); // you have manage to make your own stock function, this one is just an  example
    }
    return true;
}
If you want to use the same stock function "ShowPlayerRules", here it is:
pawn Код:
stock ShowPlayerRules(playerid)
{
    //your rules system here, pretty simple!
    return true;
}
RECOMMENDATIONS: use sscanf unformating, use ZCMD command processor!

I haven't tested this, if problems, kindly contact here!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)