OnPlayerText prob..
#1

Hey guys, i just wanted to make a clan and clan chat system..
Idk where is the prob, but ig even if i have a registred tag it says that im in public team..
This is the code..
Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '!')
    {
        if(TagUfficiali(playerid))
        {
            new string[128];
    		GetPlayerName(playerid, string, sizeof(string));
    		format(string, sizeof(string), "[Clan chat] %s: %s", string, text[1]);
    		for(new i = 0; i < MAX_PLAYERS; i++)
    		{
    			if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, DAEDRIC_TCOLOUR, string);
			}
   			return 1;
 		}
        else
        {
            if(!TagUfficiali(playerid))
           	{
           		new string[128];
    			GetPlayerName(playerid, string, sizeof(string));
    			format(string, sizeof(string), "[Civilian chat] %s: %s", string, text[1]);
    			for(new i = 0; i < MAX_PLAYERS; i++)
    			{
    			if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, DAEDRIC_TCOLOUR, string);
				}
				return 0;
			}
		}
    }
	return 1;
}


stock TagUfficiali(playerid)
{
    GetPlayerName(playerid, Name, sizeof(Name));
    if(strfind(Name, "[Test]", true) != -1 || strfind(Name, "[Deadric]", true) != -1) return 1;
    return 0;
}
Help please зuз
Reply
#2

Please do not open new topics when you still have previous open about same issue.
Reply
#3

I've edited some parts.. so i thought i could make another topic
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)