Admin chat
#1

Heeft iemand misschien een goede admin chat,

ik probeer er wel een te maken maar het werkt steets niet, als ik /a [text] voorbeeld /a hoi dan gebeurd er niks,

hier heb je me code's

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;
}
return 1;
}

onplayercommandtext:
Quote:

dcmd(a, 1, cmdtext);

Moet er eigenlijk meer bij, of is het zo goed?
Reply


Messages In This Thread
Admin chat - by lulo356 - 09.12.2013, 01:16
Re: Admin chat - by Epic_Mickey - 09.12.2013, 06:09
Re: Admin chat - by Biesmen - 09.12.2013, 08:24
Re: Admin chat - by lulo356 - 09.12.2013, 16:11
Re: Admin chat - by Epic_Mickey - 09.12.2013, 16:43
Re: Admin chat - by Henkie - 09.12.2013, 16:54
Re: Admin chat - by Biesmen - 09.12.2013, 19:41
Re: Admin chat - by HB - 10.12.2013, 18:46
Re: Admin chat - by BlackBank3 - 10.12.2013, 23:55
Re: Admin chat - by Biesmen - 11.12.2013, 07:34
Re: Admin chat - by Duck - 11.12.2013, 13:59
Re: Admin chat - by Screaming - 29.12.2013, 16:04
Re: Admin chat - by Epic_Mickey - 29.12.2013, 16:09
Re: Admin chat - by Screaming - 29.12.2013, 16:12
Re: Admin chat - by Epic_Mickey - 29.12.2013, 16:17
Re: Admin chat - by Screaming - 29.12.2013, 16:19
Re: Admin chat - by Epic_Mickey - 30.12.2013, 09:04
Re: Admin chat - by mamorunl - 30.12.2013, 11:56
Re: Admin chat - by Epic_Mickey - 30.12.2013, 14:21
Re: Admin chat - by HB - 30.12.2013, 17:52

Forum Jump:


Users browsing this thread: 2 Guest(s)