heres my announce command works fine for me
COMMAND:announce(playerid,params[])
{
if(announce == 1) return SendClientMessage(playerid,orange,"Error: An announcement message is already on screen.");
if (level[playerid] >= 1)
{
new result[128], idx, string[128];
result = bigstrtok(params, idx);
if(!strlen(result))
{
SendClientMessage(playerid, orange, "Error: /announce message");
SendClientMessage(playerid, orange, "This will announce a message to all players!");
return 1;
}
announce = 1;
format(string, sizeof(string), "[Admin]: %s", result);
Announce0 = TextDrawCreate(1.000000,310.000000,string);
Announce1 = TextDrawCreate(73.000000,311.000000," ");
TextDrawUseBox(Announce1,1);
TextDrawBoxColor(Announce1,0x0000ffff);
TextDrawTextSize(Announce1,0.000000,3.000000);
TextDrawAlignment(Announce0,0);
TextDrawAlignment(Announce1,0);
TextDrawBackgroundColor(Announce0,0x000000ff);
TextDrawBackgroundColor(Announce1,0x000000ff);
TextDrawFont(Announce0,3);
TextDrawLetterSize(Announce0,0.499999,1.400000);
TextDrawFont(Announce1,3);
TextDrawLetterSize(Announce1,1.000000,1.000000);
TextDrawColor(Announce0,0xff0000ff);
TextDrawColor(Announce1,0xffffffff);
TextDrawSetOutline(Announce0,1);
TextDrawSetOutline(Announce1,1);
TextDrawSetProportional(Announce0,1);
TextDrawSetProportional(Announce1,1);
TextDrawSetShadow(Announce0,1);
TextDrawSetShadow(Announce1,1);
TextDrawShowForAll(Announce0);
SetTimer("AnnounceTimer", 5000, false);
SendClientMessageToAll(dpink, string);
print(string);
new File:ftw=fopen("logs/admin.txt", io_append);
new string1[128];
format(string1, 150, "%s\r\n", string);
fwrite(ftw, string1);
fclose(ftw);
}
else SendClientMessage(playerid, red, "Error: You are either not a admin or you are not a admin with the correct level.");
return 1;
}