04.06.2015, 20:13
I have problem in chat leaders , just leader LSPD is can see chat and speak and admins , and other leaders can't chat i don't know why , what wrong here?
code
code
pawn Код:
CMD:lc(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need login frist!");
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pLeader] >= 1 || PlayerInfo[playerid][pAdmin] >= 1)
{
new sendername[30],mesajelc[250],string[250];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(sscanf(params, "s[250]",mesajelc)) return SCM(playerid,COLOR_WHITE,"{FFFFFF}Syntax: /l <text>");
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
format(string, sizeof(string), "Admin %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "(/lc) Leader LSPD %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "(/lc) Leader F.B.I %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 3)
{
format(string, sizeof(string), "(/lc) Leader N.G. %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 4)
{
format(string, sizeof(string), "(/lc) Leader Los Aztecas %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 5)
{
format(string, sizeof(string), "(/lc) Leader Grove Street %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 6)
{
format(string, sizeof(string), "(/lc) Leader Los Vagos %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 7)
{
format(string, sizeof(string), "(/lc) Leader Gouvernment %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 8)
{
format(string, sizeof(string), "(/lc) Leader LVPD %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 9)
{
format(string, sizeof(string), "(/lc) Leader News Reporters %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 10)
{
format(string, sizeof(string), "(/lc) Leader Ballas %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 11)
{
format(string, sizeof(string), "(/lc) Leader Hitman Agency %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 12)
{
format(string, sizeof(string), "(/lc) Leader School Instructors %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 13)
{
format(string, sizeof(string), "(/lc) Leader Taxi Cab Company %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
else if (PlayerInfo[playerid][pLeader] == 14)
{
format(string, sizeof(string), "(/lc) Leader Paramedic Department. %s: %s",sendername, mesajelc);
LeaderChat(COLOR_TEAL, string);
HAdmins(COLOR_TEAL, string,1);
}
}
}
else
{
SendClientMessage(playerid, 0xFFB870FF, "{FFB870}Leader/Admin can use chat!");
return 1;
}
}
return 1;
}