Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Comandos Complementares , Adicione no GM por favor.
- CMD:tempban(playerid,params[])
- {
- static
- string[256],DiaB,giveid,motivo[256],arq[20];
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,ROXO,"Você não é um admin logado na rcon");
- if(sscanf(params,"us[256]i",giveid,motivo,DiaB)) return SendClientMessage(playerid,AMARELO,"/tempban [ID] [Motivo] [Dias] !");
- new sendername[MAX_PLAYER_NAME],givename[MAX_PLAYER_NAME]; GetPlayerName(giveid,givename,sizeof(givename)); GetPlayerName(playerid,sendername,sizeof(sendername));
- if(DiaB > 360) return SendClientMessage(playerid,ROXO,"Erro:Maximo de dias ate 360 !");
- format(string,sizeof(string),"AdmCMD:O jogador %s foi banido por %d pelo motivo de :%s",givename,sendername,DiaB);
- SendClientMessageToAll(AMARELO,string);
- format(string,sizeof(string),"Voçe foi banido por %s com %d dias pelo motivo de:%s",sendername,DiaB,motivo);
- SendClientMessage(giveid,ROXO,string);
- format(arq,sizeof(arq),"LOG/%s.ini",givename);
- {
- if(!DOF2_FileExists(arq))
- {
- DOF2_CreateFile(arq);
- DOF2_SetInt(arq,"Ban",DiaB);
- DOF2_SetString(arq,"Motivo",motivo);
- PlayerInfo[giveid][pBandia] = getdate()*DiaB;
- DOF2_SaveFile();
- }
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new year,month,day;
- getdate(year,month,day);
- if(getdate() >= PlayerInfo[playerid][pBandia] > 0)
- {
- new lol,file[50];
- while(lol > PlayerInfo[playerid][pBandia])
- {
- format(file,sizeof(file),"LOG/%s.ini",lol);
- new string[256],sendername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,sendername,sizeof(sendername));
- format(string,sizeof(string),"Nick:%s\nMotivo De:%s\nDias%d",sendername,DOF2_GetString(file,"Motivo"),DOF2_GetInt(file,"Ban"));
- ShowPlayerDialog(playerid,1577,DIALOG_STYLE_MSGBOX,"Info Ban",string,"Ok","");
- PlayerInfo[playerid][pBandia] -= day*3600;
- Kick(playerid);
- return 1;
- }
- return 1;
- }
- CMD:bkick(playerid)
- {
- if(!BKICK[playerid]) return SendClientMessage(playerid,ROXO,"AdmCMD:Você já bloqueou o kick do ADMIN %s !");
- if(BKICK[playerid] == true)
- {
- SendClientMessage(playerid,AMARELO,"Você bloqueou o kick do ADMIN %s !");
- BKICK[playerid] == false;
- return 1;
- }
- return 1;
- }
- /* Topo do GM new bool:BKICK[MAX_PLAYES] = false; e if(!IsPlayerAdmin(playerid)) */
- CMD:mudarnick(playerid,params[])
- {
- new ano,mes,dia;
- getdate(ano,mes,dia);
- new novonick[256],sendername[MAX_PLAYER_NAME],giveid,string[100+2];
- GetPlayerName(giveid,sendername,sizeof(sendername));
- if(sscanf(params,"us[256]",novonick)) return SendClientMessage(playerid,ROXO,"/mudarnick [ID] [Novo Nome]");
- format(string,sizeof(string),"AdmCMD:Você mudou o novo nick para %s %i/%i/%i",novonick,ano,mes,dia);
- SendClientMessage(giveid,AMARELO,string);
- for(new letras=0; letras<sizeof(Palavrao); letras++)
- {
- if(strcmp(novonick,Palavrao[letras],true) == 0)
- SendClientMessage(playerid,ROXO,"Erro:Você não pode digitar essa palavra !");
- return 1;
- }
- if(IsPlayerConnected(giveid))
- {
- new lol[50];
- format(lol,sizeof(lol),"Texto/%s.txt",sendername);
- if(!DOF2_FileExists:D)
- {
- DOF2_CreateFile:D;
- DOF2_SetString(lol,"NovoNome",novonick);
- DOF2_SetInt(lol,"Ano",ano);
- DOF2_SetInt(lol,"Mes",mes);
- DOF2_SetInt(lol,"Dia",dia);
- DOF2_SaveFile();
- }
- return 1;
- }
- return 1;
- }
- CMD:report(playerid,params[])
- {
- static
- string[256],texto[256],arquivo[20];
- new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid,sendername,sizeof(sendername));
- if(sscanf(params,"s[256]",texto)) return SendClientMessage(playerid,AMARELO,"/report [TEXTO] !");
- format(string,sizeof(string),"Reporte de %s Texto>%s",sendername,texto);
- {
- for(new i=0, j=GetMaxPlayers(); j!=i; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pAdmin] > 0)
- {
- format(arquivo,sizeof(arquivo),"Texto/%s.txt",texto);
- DOF2_SetString(arquivo,"Nome",sendername);
- DOF2_SetString(arquivo,"TextLoL",texto);
- SendClientMessage(i,ROXO,string);
- Maximodereposts ++;
- return 1;
- }
- }
- }
- return 1;
- }
- }
- CMD:reports(playerid)
- {
- if(!IsPlayerAdmin(playerid))
- {
- new sendername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,sendername,sizeof(sendername));
- new string[256],arquivo[50];
- format(arquivo,sizeof(arquivo),"Texto/%s.txt");
- format(string,sizeof(string),"Report de:%s, Motivo:%s\nQuantidade de report [%d]",DOF2_GetString(arquivo,"Nome"),DOF2_GetString(arquivo,"TextLoL"),Maximodereposts);
- ShowPlayerDialog(playerid,13363,DIALOG_STYLE_MSGBOX,"Reports",string,"Ok","");
- return 1;
- }
- return 1;
- }
- CMD:congelar(playerid,params[])
- {
- new string[100],giveid[MAX_PLAYER_NAME],sendername[MAX_PLAYER_NAME];
- if(!IsPlayerAdmin(playerid) && PlayerInfo[playerid][pAdmin] >= 3) return SendClientMessage(playerid,VERMELHO,"Voce nao e administrador !");
- if(sscanf(params,"id",id)) return SendClientMessage(playerid,-1,"/congelar [id]");
- if(Logado[id] == false) return SendClientMessage(playerid,GetPlayerColor(playerid),"Esse jogador nao esta logado !");
- if(Logado[playerid] == false) return SendClientMessage(playerid,LARANJA,"Voçe nao esta logado !");
- if(id != playerid) return SendClientMessage(playerid,-1,"Voce nao pode se congelar !");
- GetPlayerName(id,giveid,sizeof(giveid));
- GetPlayerName(playerid,sendername,sizeof(sendername));
- format(string,sizeof(string),"AdmCMD:O Administrador %s congelou o player %s",sendername,giveid);
- SendClientMessageToAll(LARANJA,string);
- TogglePlayerControllable(id,false);
- PlayerInfo[id][Congelados] = false;
- return 1;
- }
- CMD:descongelar(playerid,params[])
- {
- new string[100],giveid[MAX_PLAYER_NAME],sendername[MAX_PLAYER_NAME];
- if(!IsPlayerAdmin(playerid) && PlayerInfo[playerid][pAdmin] >= 3) return SendClientMessage(playerid,VERMELHO,"Voce nao e administrador !");
- if(sscanf(params,"id",id)) return SendClientMessage(playerid,-1,"/descongelar [id]");
- if(Logado[id] == false) return SendClientMessage(playerid,GetPlayerColor(playerid),"Esse jogador nao esta logado !");
- if(Logado[playerid] == false) return SendClientMessage(playerid,LARANJA,"Você não está logado !");
- if(id != playerid) return SendClientMessage(playerid,-1,"Você não pode se descongelar !");
- GetPlayerName(id,giveid,sizeof(giveid));
- GetPlayerName(playerid,sendername,sizeof(sendername));
- format(string,sizeof(string),"AdmCMD:O Administrador %s Descongelou o player %s",sendername,giveid);
- SendClientMessageToAll(LARANJA,string);
- TogglePlayerControllable(id,true);
- PlayerInfo[id][Congelados] = true;
- return 1;
- }
- CMD:congelados(playerid)
- {
- if(!IsPlayerAdmin(playerid) && PlayerInfo[playerid][pAdmin] >= 3) return SendClientMessage(playerid,-1,"Você não é administrador !");
- if(Logado[playerid] == false) return SendClientMessage(playerid,VERMELHO,"Você não está logado !");
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new textocongelado[30];
- if(PlayerInfo[i][Congelados] == false) textocongelado = "Congelado";
- if(PlayerInfo[i][Congelados] == true) textocongelado = "Descongelado";
- {
- new string[100],sendername[MAX_PLAYER_NAME];
- GetPlayerName(i,sendername,sizeof(sendername));
- format(string,sizeof(string),"Nick:{8000FF}%s:{FF0000}%s\n",sendername,textocongelado);
- ShowPlayerDialog(playerid,1533,DIALOG_STYLE_MSGBOX,"Congelado",string,"Ok","");
- return 1;
- }
- }
- return 1;
- }
- return true;
- }
- /* Adicionar no OnplayerConnect
- PlayerInfo[playerid][Congelado] = true;
- PlayerInfo[playerid][Congelados] = true;
- */
Add Comment
Please, Sign In to add comment