Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/ping", true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- new escolha[64];
- strmid(escolha, tmp, 0, strlen(tmp), 255);
- new arq[256];
- if(FusioN_Info[playerid][pAdmin] < ADMINISTRADOR_MASTER) { SendClientMessage(playerid, 0xFFFFFFAA, "{EB1047}Você não tem autorização para usar esse comando"); return 1; }
- format(arq, sizeof(arq), "Config/config.ini");
- if(!dini_Exists(arq)) { dini_Create(arq); return 1; }
- dini_Set(arq,"Ping",escolha);
- return 1;
- }
- stock PingMaximo()
- {
- new arq[256];
- format(arq, sizeof(arq), "Config/config.ini");
- new Ping = dini_Int(arq,"Ping")
- new pingmax[MAX_PLAYERS];
- for(new playerid = 0; playerid < sizeof(MAX_PLAYERS); playerid++)
- {
- if(GetPlayerPing(playerid) < Ping)
- {
- pingmax[playerid] = 0;
- return 1;
- }
- if(GetPlayerPing(playerid) > Ping)
- {
- pingmax[playerid] += 1;
- }
- if(pingmax[playerid] == 3)
- {
- new PingPlayer[MAX_PLAYERS];
- PingPlayer[playerid] = GetPlayerPing(playerid);
- format(gstring,sizeof(gstring),"{FFFF0A}Nick Kickado: {12F1FC}%s\n{FFFF0A}Motivo Kickado: {12F1FC}Ping Maior que %d",pNome(playerid), Ping);
- ShowPlayerDialog(playerid,DIALOG_ATOA,DIALOG_STYLE_MSGBOX,"{FC12E9}Kickado",gstring,"Obrigado","");
- format(string, sizeof(string), "{EBD810}AdmCmd: {3510EB}%s {0AF50A}foi kickado por causa do ping excessivo: %d/%d", playerid, PingPlayer[playerid],Ping);
- SendClientMessageToAll(0xFFFFFFAA, string);
- Kick(playerid);
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement