Some admin chat help please
#8

Код:
if(strcmp(cmdtext, "/a", true) == 0)
	{
		if(dini_Int(file, "admin") <1) return SendClientMessage(playerid, COLOR, "You are not admin!");
		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)) return SendClientMessage(playerid, COLOR, "Usage: /a [ur txt here]");
		GetPlayerName(playerid, plyrname, sizeof(plyrname));
		format(string,sizeof(string),"[ADMIN]: %s (lvl:%d): %s", plyrname, PlayerInfo[playerid][Admin], result);
		for(new i=0;i<MAX_PLAYERS;i++)
		{
			if(dini_Int(file, "admin") >= 1)
			SendClientMessage(i,COLOR,string);
		}
		return 1;
	}
try that, it should work
and you can set only LeaD admin chat or something by changing 1 to 5 or max level you have, but if you have cmd spec then try hide that command......
Reply


Messages In This Thread
Some admin chat help please - by Danand - 13.04.2009, 18:18
Re: Some admin chat help please - by luxeon - 13.04.2009, 19:16
Re: Some admin chat help please - by Danand - 13.04.2009, 19:20
Re: Some admin chat help please - by luxeon - 13.04.2009, 19:42
Re: Some admin chat help please - by Danand - 13.04.2009, 19:44
Re: Some admin chat help please - by luxeon - 13.04.2009, 19:46
Re: Some admin chat help please - by Danand - 13.04.2009, 19:49
Re: Some admin chat help please - by FranKyG70 - 13.04.2009, 20:02
Re: Some admin chat help please - by Danand - 13.04.2009, 20:50
Re: Some admin chat help please - by Danand - 14.04.2009, 04:51

Forum Jump:


Users browsing this thread: 5 Guest(s)