PDA

View Full Version : [HELP] Admin Commands


Thoma
07/01/2015, 06:34 AM
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 :)

Banana_Ghost
07/01/2015, 06:44 AM
Well I downloaded the source of LuxAdmin and there doesn't appear to be a rules command.

Thoma
07/01/2015, 06:56 AM
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

Banana_Ghost
07/01/2015, 06:58 AM
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.

Thoma
07/01/2015, 07:08 AM
kk thanks

Gammix
07/01/2015, 07:41 AM
For dcmd, here is the example code with sscanf usage. So mind getting sscanf or i can also make a "strtok" function.
sscanf: http://forum.sa-mp.com/showthread.php?t=120356
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:

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:

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!