/a help
#1

well, if i do /a ingame you see the message from /a [text] but if you write somting, you dont see it anymore, Example: /a hey how are you

onplayercommandtext
Quote:

dcmd(a, 1, cmdtext);

the dcmd
Quote:

dcmd_a(playerid, cmdtext[]) {
#pragma unused cmdtext
new sendername[MAX_PLAYER_NAME];
new string[256], idx;
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /a <message>");
return 1;
}
format(string, sizeof(string), "[AdminChat]%s: %s", sendername, result);
SendAdminMessage(COLOR_WHITE,string);
return 1;
}

What do i need to add or change to make it work
Reply


Messages In This Thread
/a help - by lulo356 - 09.12.2013, 01:14
Re: /a help - by lulo356 - 09.12.2013, 02:06
Re: /a help - by Padevex - 09.12.2013, 02:33
Re: /a help - by lulo356 - 09.12.2013, 02:43
Re: /a help - by Padevex - 09.12.2013, 02:58
Re: /a help - by lulo356 - 09.12.2013, 04:19
Re: /a help - by DavidLuango - 09.12.2013, 05:34
Re: /a help - by newbie scripter - 09.12.2013, 10:46
Re: /a help - by lulo356 - 09.12.2013, 12:36
Re: /a help - by iJumbo - 09.12.2013, 12:40

Forum Jump:


Users browsing this thread: 2 Guest(s)