/mute command
#5

But when I do that, I gets this error for the /me, /do and /w command.
Quote:

// /me
if (strcmp(cmdtext, "/me ", true, 4) == 0)
{
if(!cmdtext[4])return SendClientMessage(playerid, COLOR_ORANGE, "Correct Usage: /me [action]");
if(muted > 0) return SendClientMessage(playerid, COLOR_ORANGE, "You cannot use this command when you are muted.");
new actionme[128];
format (actionme, sizeof(actionme), "*%s %s", playername, cmdtext[4]);
SendLocalMessage(playerid, COLOR_PINK, 7, actionme);
return 1;
}

// /do
if (strcmp(cmdtext,"/do ", true, 4) == 0)
{
if(!cmdtext[4])return SendClientMessage(playerid, COLOR_ORANGE, "Correct Usage: /do [message]");
if(muted > 0) return SendClientMessage(playerid, COLOR_ORANGE, "You cannot use this command when you are muted.");
new actiondo[128];
format (actiondo, sizeof(actiondo), "*%s((%s))", cmdtext[4], playername);
SendLocalMessage(playerid,COLOR_PINK,7, actiondo);
return 1;
}

// /do
if (strcmp(cmdtext, "/w ", true, 3) == 0)
{
if(!cmdtext[3])return SendClientMessage(playerid, COLOR_ORANGE, "Correct Usage: /w [message]");
if(muted > 0) return SendClientMessage(playerid, COLOR_ORANGE, "You cannot use this command when you are muted.");
new wmessage[128];
format (wmessage, sizeof(wmessage), "(Local) %s(%d): %s", playername, playerid, cmdtext[3]);
SendLocalMessage(playerid, COLOR_YELLOW, 7, wmessage);
return 1;
}

These are the errors
Quote:

E:\My Server\gamemodes\SARCR.pwn(922) : error 033: array must be indexed (variable "muted")
E:\My Server\gamemodes\SARCR.pwn(933) : error 033: array must be indexed (variable "muted")
E:\My Server\gamemodes\SARCR.pwn(944) : error 033: array must be indexed (variable "muted")

So, what should I do?
Reply


Messages In This Thread
/mute command - by ATGOggy - 09.11.2014, 07:54
Re: /mute command - by dominik523 - 09.11.2014, 08:18
Re: /mute command - by ATGOggy - 09.11.2014, 08:21
Re: /mute command - by dominik523 - 09.11.2014, 08:23
Re: /mute command - by ATGOggy - 09.11.2014, 08:28
Re: /mute command - by Quickie - 09.11.2014, 08:34
Re: /mute command - by ATGOggy - 09.11.2014, 08:38
Re: /mute command - by Quickie - 09.11.2014, 08:42
Re: /mute command - by ATGOggy - 09.11.2014, 08:44
Re: /mute command - by ATGOggy - 12.11.2014, 13:08

Forum Jump:


Users browsing this thread: 1 Guest(s)