Jump to content
  • 0

cum pun astea 2 comenzi


vasy

Question

Vreau si eu sa pun pe sv meu de truck 2 comenzi care doar rcon sa le poata folosi 1.announce pentru anunt si 2.clearchat

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

    if(strcmp(cmd, "/announce", true) == 0 || strcmp(cmd, "/ann", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   You havent logged in yet !");
	            return 1;
	        }
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[80];
			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, "{3C9DF6}Utilizare Comanda{FFFFFF}: (/ann)ouncement [text]");
				return 1;
			}
			if (IsPlayerAdmin(playerid))
			{
			format(string, sizeof(string), "* Anunt * Admin [%s]: %s", sendername, result);
			OOCOff(COLOR_ADMIN,string);
			printf("%s", string);
			}
		}
		return 1;
	}
    if(strcmp(cmd, "/cc", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	if (IsPlayerAdmin(playerid))
			{
				SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
				SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
				SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
				SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
    			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
 				SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
                SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
			    SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
     			SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " "); SendClientMessageToAll(COLOR_GREEN, " ");
                GetPlayerName(playerid, sendername, sizeof(sendername));
			    format(string, sizeof(string), "%s a sters tot chat-ul.", sendername);
			    BroadCast(COLOR_LIGHTRED,string);
     			return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "Ne pare rau, dar nu ai acces la aceasta comanda.");
  			}
		}
                else
                {
			SendClientMessage(playerid, COLOR_RED, "Ne pare rau, dar trebuie sa fi logat pentru a utiliza aceasta comanda.");
                }
		return 1;
	}

Toata treaba e de la [glow=red,2,300]IsPlayerAdmin(playerid)[/glow] care este adminul logat pe /rcon

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.