Quote:
Originally Posted by Kane_
pawn Code:
CMD:fsafe(playerid, cmdtext[]){
new szCmdInfo[30], szActionInfo[30], amount;
if(sscanf(cmdtext, "s[30]S()[30]", szCmdInfo, szActionInfo)) { SendClientMessage(playerid, -1, "USAGE: /fsafe [Action]"); SendClientMessage(playerid, -1, "Available Actions: deposit, withdraw"); return 1; }
if(!strcmp(szCmdInfo, "deposit", true)){
// Deposit here:
if(sscanf(szActionInfo, "i", amount)) { SendClientMessage(playerid, -1, "/fsafe deposit [amount]"); return 1; }
}
return 1; }
That should give you an idea of how to start.
|
Can you explain me this line
PHP Code:
if(sscanf(cmdtext, "s[30]S()[30]", szCmdInfo, szActionInfo))
s[30]S()[30]
first s[30] is for szCMDInfo
but S() for? and why brackets?