Admin chat help
#9

Quote:
Originally Posted by Raza2013
Посмотреть сообщение
pawn Код:
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;
}
return 1;
}
PS: Not Tested

This one is working, only if you do /a [text] its not sending
Reply


Messages In This Thread
Admin chat help - by lulo356 - 08.12.2013, 01:31
Re: Admin chat help - by Loot - 08.12.2013, 02:10
Re: Admin chat help - by Tayab - 08.12.2013, 02:14
Re: Admin chat help - by Raza2013 - 08.12.2013, 02:21
Re: Admin chat help - by newbie scripter - 08.12.2013, 03:57
Re: Admin chat help - by gotwarzone - 08.12.2013, 04:41
Re: Admin chat help - by newbie scripter - 08.12.2013, 05:58
Re: Admin chat help - by PrivatioBoni - 08.12.2013, 07:41
Re: Admin chat help - by lulo356 - 08.12.2013, 08:40

Forum Jump:


Users browsing this thread: 1 Guest(s)