14.07.2013, 14:51
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..
Help please зuз
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; }