In my server when we reach more than 100 sometimes it happens that RP chat appears to all players and most of the commands doesn't works, i can't understand why.. Can you help me plis?
Its possible that what ever you're using in loops is set to 100, IE, MAX_PLAYERS is some where set to 100.
Код:
public OnPlayerText(playerid, text[])
{
if(ADuty[playerid]==1 && PlayerAccount[playerid][AdminLevel]!=0){
new string[170];
format(string, sizeof(string), "(( Admin %s [%d] dice: %s ))", GetPlayerNameEx(playerid),playerid, text);
ProxDetector(30.0, playerid, string,0xA9EEFFFF,0xA9EEFFFF,0xA9EEFFFF,0xA9EEFFFF,0xA9EEFFFF);
return 0;
}
if(HelperDuty[playerid]==1 && PlayerAccount[playerid][Helper]!=0){
new string[170];
format(string, sizeof(string), "(( Helper %s [%d] dice: %s ))", GetPlayerNameEx(playerid),playerid, text);
ProxDetector(30.0, playerid, string,0x91FFADFF,0x91FFADFF,0x91FFADFF,0x91FFADFF,0x91FFADFF);
return 0;
}
if(Mobile[playerid] == 911)
{
new string[150];
if (PlayerAccount[playerid][wearingmask] == 1)
{
new location[MAX_ZONE_NAME];
GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
SendFactionTypeMessage(1, COLOR_LSPD, "_________[CENTRALINO POLIZIA]_________");
format(string,sizeof(string), "Chiamata da: Sconosciuto #%d (%d)",PlayerAccount[playerid][ID], PlayerAccount[playerid][Phone]);
SendFactionTypeMessage(1, 0x00B9FFF1, string);
format(string, sizeof(string), "Contenuto: %s",text);
SendFactionTypeMessage(1, 0x00B9FFF1, string);
format(string, sizeof(string), "Luogo: %s",location);
SendFactionTypeMessage(1, 0x00B9FFF1, string);
SendFactionTypeMessage(1, COLOR_LSPD, "______________________________________");
SendClientMessage(playerid,COLOR_WHITE,"Operatore: La tua chiamata и stata accolta, Attendere prego...");
Mobile[playerid] = 255;
format(string, sizeof(string), "[Telefono] Sconosciuto #%d dice: %s", PlayerAccount[playerid][ID], text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 0;
}else{
new location[MAX_ZONE_NAME];
GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
SendFactionTypeMessage(1, COLOR_LSPD, "_________[CENTRALINO POLIZIA]_________");
format(string,sizeof(string), "Chiamata da: %s (%d)",GetPlayerNameEx(playerid), PlayerAccount[playerid][Phone]);
SendFactionTypeMessage(1, 0x00B9FFF1, string);
format(string, sizeof(string), "Contenuto: %s",text);
SendFactionTypeMessage(1, 0x00B9FFF1, string);
format(string, sizeof(string), "Luogo: %s",location);
SendFactionTypeMessage(1, 0x00B9FFF1, string);
SendFactionTypeMessage(1, COLOR_LSPD, "______________________________________");
SendClientMessage(playerid,COLOR_WHITE,"Operatore: La tua chiamata и stata accolta, Attendere prego...");
Mobile[playerid] = 255;
format(string, sizeof(string), "[Telefono] %s dice: %s", GetPlayerNameEx(playerid), text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
LastCaller = playerid;
PhoneAnimation(playerid);
return 0;
}
if(Mobile[playerid] != 255)
{
new string[150];
if (PlayerAccount[playerid][wearingmask] == 1)
{
format(string, sizeof(string), "[Telefono] Sconosciuto #%d dice: %s",PlayerAccount[playerid][ID], text);
}
else{
format(string, sizeof(string), "[Telefono] %s dice: %s", GetPlayerNameEx(playerid), text);}
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(IsPlayerConnected(Mobile[playerid]))
{
if(Mobile[Mobile[playerid]] == playerid)
{
new Float:SpeakerX,Float:SpeakerY,Float:SpeakerZ;
GetPlayerPos(playerid,SpeakerX,SpeakerY,SpeakerZ);
if(!PlayerToPoint(20.0,Mobile[playerid],SpeakerX,SpeakerY,SpeakerZ))
{
SendClientMessage(Mobile[playerid], COLOR_LIGHTGREEN,string);
SendClientMessage(playerid, COLOR_LIGHTGREEN,string);
}
if(SpeakerPhone[Mobile[playerid]])
{
format(string, sizeof(string), "[Autoparlante] %s dice: %s", GetPlayerNameEx(playerid), text);
ProxDetector(20.0, Mobile[playerid], string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2,"[ERRORE:] Nessuno и in Linea.");
}
return 0;
}
if(TalkingLive[playerid] != 255)
{
new string[150];
if(PlayerAccount[playerid][Faction] == 5)
{
format(string, sizeof(string), "[LIVE] Giornalista %s: %s", GetPlayerNameEx(playerid), text);
SendClientMessageToAlls(COLOR_LIGHTGREEN, string);
}
else
{
format(string, sizeof(string), "[LIVE] %s: %s", GetPlayerNameEx(playerid), text);
SendClientMessageToAlls(COLOR_LIGHTGREEN, string);
}
return 0;
}
if(IsPlayerInAnyVehicle(playerid) && IsABike(GetPlayerVehicleID(playerid))==0)
{
new string[150];
if(CarWindowStatus[GetPlayerVehicleID(playerid)] == 1)
{
if (PlayerAccount[playerid][wearingmask] == 0)
{
format(string, sizeof(string), "[Finestrino Chiuso] %s dice: %s", GetPlayerNameEx(playerid), text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 0;
}
else
{
format(string, sizeof(string), "[Finestrino Chiuso]Uno sconosciuto dice: %s", text);
ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 0;
}
}
else
{
if (PlayerAccount[playerid][wearingmask] == 0)
{
format(string, sizeof(string), "[Finestrino Aperto] %s dice: %s", GetPlayerNameEx(playerid), text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
format(string, sizeof(string), "[Finestrino Aperto]Uno sconosciuto dice: %s", text);
ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
return 0;
}
new string[256];
if (PlayerAccount[playerid][wearingmask] == 1)
{
format(string, sizeof(string), "Sconosciuto #%d dice: %s",PlayerAccount[playerid][ID], text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
format(string, sizeof(string), "%s dice: %s", GetPlayerNameEx(playerid), text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
ChatAnimation(playerid);
}
return 0;
}