[HELP] Admin Commands - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Admin Commands (
/showthread.php?tid=555238)
[HELP] Admin Commands -
Thoma - 07.01.2015
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
Re: [HELP] Admin Commands -
Banana_Ghost - 07.01.2015
Well I downloaded the source of LuxAdmin and there doesn't appear to be a rules command.
Re: [HELP] Admin Commands -
Thoma - 07.01.2015
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
Re: [HELP] Admin Commands -
Banana_Ghost - 07.01.2015
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.
Re: [HELP] Admin Commands -
Thoma - 07.01.2015
kk thanks
Re: [HELP] Admin Commands -
Gammix - 07.01.2015
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!