07.01.2015, 07:41
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
OR, for a strtok function:
If you want to use the same stock function "ShowPlayerRules", here it is:
RECOMMENDATIONS: use sscanf unformating, use ZCMD command processor!
I haven't tested this, if problems, kindly contact here!
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;
}
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;
}
pawn Код:
stock ShowPlayerRules(playerid)
{
//your rules system here, pretty simple!
return true;
}
I haven't tested this, if problems, kindly contact here!