01.02.2010, 09:42
Hey guys,
I made an 'announce' command, so that when an admin types '/announce hi' the chat will say: "ADMIN ANNOUNCEMENT: hi", but it only shows "ADMIN ANNOUNCEMENT:" at the moment..
Here's my script:
Thanks if you can help me
I made an 'announce' command, so that when an admin types '/announce hi' the chat will say: "ADMIN ANNOUNCEMENT: hi", but it only shows "ADMIN ANNOUNCEMENT:" at the moment..
Here's my script:
Код:
if(strcmp(cmd, "/announce", true) == 0)
{
if(adminlevel[playerid] <= 1)
{
SendClientMessage(playerid,COLOR_RED,"You need to be at least admin level 2 to use this command!");
return 0;
}
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /announce [message]");
return 1;
}
new message[150],message1;
message1 = strval(tmp);
{
format(message,sizeof(message),"ADMIN ANNOUNCEMENT: %s", message1);
SendClientMessageToAll(COLOR_RED,message);
}
return 1;
}

