29.06.2009, 21:51
pawn Code:
if(strcmp(cmd,"/at",true)==0)
{
new sendername[128];
new string[128];
IsPlayerAdminLevel(playerid, 2);
{
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_LIGHTRED, "USAGE: /at message");
return 1;
}
format(string, sizeof(string), "[ ! ] %s", result);
SendClientMessageToAll(COLOR_YELLOW,string);
}
return 1;
}