Some strange bug
#1

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:
Код:
	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;
	}
Thanks if you can help me
Reply


Messages In This Thread
Some strange bug - by VonLeeuwen - 01.02.2010, 09:42
Re: Some strange bug - by actiwe - 01.02.2010, 10:26
Re: Some strange bug - by VonLeeuwen - 01.02.2010, 10:47
Re: Some strange bug - by ¤Adas¤ - 01.02.2010, 10:59
Re: Some strange bug - by VonLeeuwen - 01.02.2010, 14:48

Forum Jump:


Users browsing this thread: 1 Guest(s)