public playerCheck(p) {
new pc[128], maior;
if(GetPlayerPing(p) > sData[Ping] || pFPS[p] < sData[Fps] || GetPlayerPacketLoss(p) > sData[Packetloss]) {
Warnings[p][0] ++;
Warnings[p][1] ++;
Warnings[p][2] ++;
if(Warnings[p][0] > Warnings[p][1]) { maior = 0; }
else maior = 1;
if(maior < Warnings[p][2]) { maior = 2; }
if(Warnings[p][0 || 1 || 2] >= 10) {
format(pc, sizeof(pc), "%s foi kickado por %s", GetName(p), (maior ? ("Ping Alto") : ("Fps Baixo") : ("Packetloss Alto")));
SendClientMessageToAll(COLOR_RED, pc);
}
}
return 1;
}
Kick(playerid);
format(pc, sizeof(pc), "%s foi kickado por %s", GetName(p), (maior ? ("Ping Alto") : ("Fps Baixo") : ("Packetloss Alto")));
Cerror 001: expected token: ")", but found ":" warning 215: expression has no effect error 001: expected token: ";", but found ")" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line |
public playerCheck(p) {
new pc[128], maior;
if(GetPlayerPing(p) > sData[Ping] || pFPS[p] < sData[Fps] || GetPlayerPacketLoss(p) > sData[Packetloss]) {
Warnings[p][0] ++;
Warnings[p][1] ++;
Warnings[p][2] ++;
if(Warnings[p][0] > Warnings[p][1]) { maior = 0; }
else maior = 1;
if(maior < Warnings[p][2]) { maior = 2; }
if(Warnings[p][0 || 1 || 2] >= 10) {
format(pc, sizeof(pc), "%s foi kickado por %s", GetName(p), (maior == 0 ? ("Ping") : maior == 1 ? ("Fps") : ("Packetloss")));
SendClientMessageToAll(COLOR_RED, pc);
}
}
return 1;
}
public playerCheck(p) {
for(new i; i != 3; i++) {
if(Warnings[p][i] >= 10) {
format(pc, 128, "%s foi kickado por %s", GetName(p), (i == 0 ? ("Ping") : i == 1 ? ("Fps") : ("Packetloss")));
SendClientMessageToAll(COLOR_RED, pc);
Kick(p);
return 1;
}
}
if(GetPlayerPing(p) > Data[Ping]) Warning[0]++;
else if(pFPS[p] < sData[Fps]) Warning[1]++;
else if(GetPlayerPacketLoss(p) > sData[Packetloss]) Warning[2]++;
return 0;
}