/announce problem !
#1

If you are admin 103 you can tipe /announce [style] [text] the "style is from 0 to 6 "

Example : /announce 3 asdfgs . They all disappear from the screen except the style : 2 . I wanna make it dissapear after a time like the other styles . Here is the command code :


Код:
	if(strcmp(cmd, "/announce", true) == 0)
	{
	  tmp = strtok(cmdtext, idx);
		if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 103)
		{
			new txtid;
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GREY, "USAGE: /announce [type] [text]");
				return 1;
			}
			txtid = strval(tmp);
			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_GREY, "USAGE: /announce [type] [text]");
				return 1;
			}
			format(string, sizeof(string), "~w~%s",result);
			GameTextForAll(string, 5000, txtid);
			format(string, sizeof(string), "-ANNOUNCE- %s",result);
			//ircSay(EchoConnection, EchoChan, string);
			return 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this command.");
		}
		return 1;
Reply
#2

at https://sampwiki.blast.hk/wiki/GameTextStyle it says just that style wont disappear until you respawn >-<
Reply
#3

ty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)