22.05.2014, 13:21
Quote:
|
pawn Код:
|
If you want to add a reason to it use this:
pawn Код:
if(sscanf(params, "us[128]", tID, reason)) return SendClientMessage(playerid, /*COLOR HERE*/, "* [USAGE]: /kick [playerid/PartOfName] [Reason]");
"s" stands for string, that means that it's a message, in this case: your reason.
"[128]", behind the "s" is the maximum length your reason can have.
If you want to make your reason optional, use this:
pawn Код:
if(sscanf(params, "uS(No Reason)[128]", tID, reason)) return SendClientMessage(playerid, /*COLOR HERE*/, "* [USAGE]: /kick [playerid/PartOfName] [Reason]");
pawn Код:
new reason[128];
I forgot to mention that "tID" is the targetid, you have to make a local variable for that one too.
pawn Код:
new tID;


