SA-MP Forums Archive
[PEDIDO] Avisar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [PEDIDO] Avisar (/showthread.php?tid=262955)



[PEDIDO] Avisar - Tifany_CHOC - 20.06.2011

Queria um cmd tipo assim
o player usa o comando /avisar aн mostra pra todo mundo a mensagem:
"Fulano estб avisando: bla blabla"
entendeu?
me ajudem ae pf
ja usei o search e nao encontrei nada

Grata,
Tifany_CHOC


Re: [PEDIDO] Avisar - Erickini - 20.06.2011

ve se da ae

Код:
	if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pAdmin] == 1)
			{
			    SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo й um ADM !");
			    return 1;
			}
			if(admadministrando[playerid] < 1)
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/administrar)");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			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_GRAD2, "USE: (/av)isar [text]");
				return 1;
			}
			SendClientMessageToAll(COLOR_WHITE, "|-_-|Aviso da Administraзгo |-_-|");
			format(string, sizeof(string), "Admin %s: %s", sendername, result);
			SendClientMessageToAll(0x00FFFFFF, string);
		}
		return 1;
	}



Re: [PEDIDO] Avisar - Tifany_CHOC - 20.06.2011

vlw


Re: [PEDIDO] Avisar - Erickini - 20.06.2011

e noix ^^