16.09.2018, 14:53
So I wanted to create a /mute command wherein the admin who uses the command may or may not input a reason as to why he'd mute the player. Here's where I got so far
Thing is that when I use it, say for example, like this
/mute - the command
1 - the ID
20 - the minutes
it sends me the
I wanted the reason to be optional. How u do that?
Oh and it sends me a
PHP код:
CMD:mute(playerid, params[])
{
new id, reason[64], time;
if (sscanf(params, "dS[24]d", id, reason, time))
{
SendClientMessage(playerid, -1, "USAGE: /mute [id] [reason (optional)] [minutes]");
return 1;
}
Mute(id, reason, time);
return 1;
}
Код:
/mute 1 20
1 - the ID
20 - the minutes
it sends me the
Код:
SendClientMessage(playerid, -1, "USAGE: /mute [id] [reason (optional)] [minutes]");
Oh and it sends me a
Код:
sscanf warning: No default value found.