[HELP] Admin /fine using DCMD/sscanf
#1

Okay here is the Filterscript

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	dcmd(fine, 4, cmdtext);
	return 0;
}

dcmd_fine(playerid, params[])
{
	new
		id,
		amount,
		reason,
 		msg;
	if (sscanf(params, "uiz", id, amount, reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/fine <playerid> <amount> <reason>\"");
******	format(reason, sizeof (reason), "%s has been fined, $%s, for %s", msg[0] ? (""), id : (""), amount : (""), reason); ******
	else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
	else
	{
		GivePlayerMoney(id, -%d);
		SendClientMessageToAll(0xFF0000AA, reason);
		SendClientMessage(0xFF0000AA, "Player Fined");
		return 1;
  }
	return 0;
}
And here is the Errors
Код:
(48) : error 035: argument type mismatch (argument 1)
(48) : error 035: argument type mismatch (argument 1)
(48) : warning 215: expression has no effect
(48) : error 001: expected token: ";", but found "]"
(48) : fatal error 107: too many error messages on one line
Line 48 is surrounded with asterisks
Reply


Messages In This Thread
[HELP] Admin /fine using DCMD/sscanf - by Ace_Menace - 29.06.2009, 01:49
Re: [HELP] Admin /fine using DCMD/sscanf - by pen_theGun - 29.06.2009, 06:40
Re: [HELP] Admin /fine using DCMD/sscanf - by Ace_Menace - 29.06.2009, 08:30
Re: [HELP] Admin /fine using DCMD/sscanf - by pen_theGun - 29.06.2009, 09:27

Forum Jump:


Users browsing this thread: 2 Guest(s)