Help me for commands (+REP)!
#1

Need me pmignore and pmunignore commands.This is my pm command :

Код:
	if(strcmp(cmd, "/pm", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   Ти не си логнат!");
	            return 1;
	        }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "ИЗПОЛЗВАЙ: /pm [playerid/PartOfName] [текст]");
				return 1;
			}
			giveplayerid = strval(tmp);
			if (IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					new length = strlen(cmdtext);
					while ((idx < length) && (cmdtext[idx] <= ' '))
					{
						idx++;
					}
					new offset = idx;
					new result[256];
					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, "ИЗПОЛЗВАЙ: /pm [playerid/PartOfName] [текст]");
						return 1;
					}
					format(string, sizeof(string), "* Лично съобщение от %s(ID: %d): %s", PlayerName(playerid), playerid, (result));
					SendClientMessage(giveplayerid, COLOR_YELLOW, string);
					format(string, sizeof(string), "* Лично съобщение към %s(ID: %d): %s", giveplayer, giveplayerid, (result));
					SendClientMessage(playerid,  COLOR_YELLOW, string);
					for(new i = 0; i < MAX_PLAYERS; i++)
					{
					    if(IsPlayerConnected(i))
					    {
					        if(PlayerInfo[i][pAdmin] >= 1)
							{
							    if(PlayerInfo[i][aTog] == 1)
							    {
								    format(string, sizeof(string), "* Лично съобщение от %s[%d] to %s[%d]: %s", PlayerName(playerid), playerid, giveplayer, giveplayerid, (result));
									SendClientMessage(i,  COLOR_YELLOW, string);
								}
							}
						}
					}
					return 1;
				}
			}
			else
			{
					format(string, sizeof(string), "   %d не е в игра.", giveplayerid);
					SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}
Need me factionmute,factionunmute commands for leaders.This is my faction command :

Код:
	if(strcmp(cmd, "/faction", true) == 0 || strcmp(cmd, "/f", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pMuted] != 0)
            {
                SendClientMessage(playerid, COLOR_ADMINCMD, " Ти си заглушен и не можеш да пишеш.");
                return 1;
            }
            if(PlayerInfo[playerid][pMember] == TEAM_CIVILIAN)
            {
                SendClientMessage(playerid, COLOR_ADMINCMD, " Неможеш да използваш тази команда понеже ти не си в банда или мафия.");
                return 1;
            }
			new length = strlen(cmdtext);
			new team = gTeam[playerid];
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[256];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/f)action [team chat]");
				return 1;
			}
			new ranktext[256];
   			switch(PlayerInfo[playerid][pRank])
		    {
      			case 1: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank1]);
	        	case 2: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank2]);
		        case 3: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank3]);
		        case 4: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank4]);
		        case 5: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank5]);
		        case 6: format(ranktext, sizeof(ranktext), "%s", TeamInfo[PlayerInfo[playerid][pMember]][fRank6]);
		    }
			format(string, sizeof(string), "[ID:%d Rank:%s] %s : %s",playerid, ranktext, PlayerName(playerid), result);
			SendFactionMessage(team, COLOR_LIGHTBLUE, string);
		}
		return 1;
	}
Reply
#2

Speak english plz
Reply
#3

I speak man..Help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)