Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include a_samp
- #define Kick(%0) SetTimerEx("Kicka", 100, false, "i", %0)
- #define Ban(%0) SetTimerEx("Bana", 100, false, "i", %0)
- enum
- {
- DIALOG_ADMIN_COMMAND,
- DIALOG_KICK_PLAYER,
- DIALOG_BAN_PLAYER,
- DIALOG_PM_PLAYER,
- DIALOG_MONEY,
- DIALOG_WEAPON
- }
- new idclicked[MAX_PLAYERS];
- new bool:Calado[MAX_PLAYERS];
- public OnFilterScriptInit()
- return print("\nSCRIPT iRcon - Created By: _Gamer8 ( Input )\n");
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- new Dialog[500];
- if(IsPlayerAdmin(playerid))
- {
- idclicked[playerid] = clickedplayerid;
- strcat(Dialog, "[ > ] Desconectar Jogador.\n");
- strcat(Dialog, "[ > ] Banir Jogador.\n");
- strcat(Dialog, "[ > ] PM.\n");
- strcat(Dialog, "[ > ] Ir até o jogador..\n");
- strcat(Dialog, "[ > ] Trazer o jogador até você.\n");
- strcat(Dialog, "[ > ] Matar Jogador.\n");
- strcat(Dialog, "[ > ] Deixar a vida cheia.\n");
- strcat(Dialog, "[ > ] Deixar o colete cheio.\n");
- strcat(Dialog, "[ > ] Dar Dinheiro.\n");
- strcat(Dialog, "[ > ] Dar Arma.\n");
- strcat(Dialog, "[ > ] Calar o jogador.\n");
- strcat(Dialog, "[ > ] Descalar o jogador.\n");
- strcat(Dialog, "[ > ] Congelar o jogador.\n");
- strcat(Dialog, "[ > ] Descongelar o jogador.\n");
- ShowPlayerDialog(playerid, DIALOG_ADMIN_COMMAND, DIALOG_STYLE_LIST, "Funções Administrativas:", Dialog, "Selecionar", "Cancelar");
- }
- return true;
- }
- public OnPlayerText(playerid)
- {
- if(Calado[playerid] == true) return SendClientMessage(playerid, -1, "Você esta calado e não pode usar o chat");
- return false;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new Float: pos[3];
- new string[128];
- switch(dialogid)
- {
- case DIALOG_ADMIN_COMMAND:
- {
- if(!response) return false;
- if(response)
- {
- switch(listitem)
- {
- case 0:
- return ShowPlayerDialog(playerid, DIALOG_KICK_PLAYER, DIALOG_STYLE_INPUT, "Desconectar Jogador:", "Porque você quer desconectar o jogador?", "Desconetar", "Cancelar");
- case 1:
- return ShowPlayerDialog(playerid, DIALOG_BAN_PLAYER, DIALOG_STYLE_INPUT, "Banir Jogador:", "Porque você quer banir o jogador?", "Banir", "Cancelar");
- case 2:
- return ShowPlayerDialog(playerid, DIALOG_PM_PLAYER, DIALOG_STYLE_INPUT, "Mandar Mensagem:", "Digite abaixo o conteúdo da mensagem:", "Enviar", "Cancelar");
- case 3:
- {
- GetPlayerPos(idclicked[playerid], pos[0], pos[1], pos[2]);
- SetPlayerPos(playerid, pos[0]+2, pos[1]+2, pos[2]+2);
- format(string, sizeof string, "Você foi até o jogador %s.", PegarNome(idclicked[playerid]));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- }
- case 4:
- {
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- SetPlayerPos(idclicked[playerid], pos[0]+2, pos[1]+2, pos[2]+2);
- format(string, sizeof string, "Você trouxe o jogador %s até você.", PegarNome(idclicked[playerid]));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- }
- case 5:
- {
- SetPlayerHealth(idclicked[playerid], 0);
- format(string, sizeof string, "Você matou o jogador %s.", PegarNome(idclicked[playerid]));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- }
- case 6:
- {
- SetPlayerHealth(idclicked[playerid], 100);
- format(string, sizeof string, "Você enxeu o HP do jogador %s.", PegarNome(idclicked[playerid]));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- }
- case 7:
- {
- SetPlayerArmour(idclicked[playerid], 100);
- format(string, sizeof string, "Você enxeu o colete do jogador %s.", PegarNome(idclicked[playerid]));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- }
- case 8:
- return ShowPlayerDialog(playerid, DIALOG_MONEY, DIALOG_STYLE_INPUT, "Dar Dinheiro:", "Digite abaixo a quantia que deseja:", "Dar", "Cancelar");
- case 9:
- return ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_INPUT, "Dar Arma:", "Digite abaixo o id da arma que deseja:", "Equipar", "Cancelar");
- case 10:
- {
- Calado[idclicked[playerid]] = true;
- format(string, sizeof string, "Você calou o jogador %s.", PegarNome(idclicked[playerid]));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- }
- case 11:
- {
- Calado[idclicked[playerid]] = false;
- format(string, sizeof string, "Você descalou o jogador %s.", PegarNome(idclicked[playerid]));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- }
- case 12:
- {
- TogglePlayerControllable(idclicked[playerid], false);
- format(string, sizeof string, "Você congelou o jogador %s.", PegarNome(idclicked[playerid]));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- }
- case 13:
- {
- TogglePlayerControllable(idclicked[playerid], true);
- format(string, sizeof string, "Você descongelou o jogador %s.", PegarNome(idclicked[playerid]));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- }
- }
- }
- }
- case DIALOG_KICK_PLAYER:
- {
- if(!response) return false;
- if(response)
- {
- format(string, sizeof string, "[ADM:CMD] O Jogador %s foi desconectado pelo administrador %s, motivo: %s.", PegarNome(idclicked[playerid]), PegarNome(playerid), inputtext);
- SendClientMessageToAll(0xFF6347AA, string);
- Kick(idclicked[playerid]);
- }
- }
- case DIALOG_BAN_PLAYER:
- {
- if(!response) return false;
- if(response)
- {
- format(string, sizeof string, "[ADM:CMD] O Jogador %s foi banido pelo administrador %s, motivo: %s.", PegarNome(idclicked[playerid]), PegarNome(playerid), inputtext);
- SendClientMessageToAll(0xFF6347AA, string);
- Ban(idclicked[playerid]);
- }
- }
- case DIALOG_PM_PLAYER:
- {
- if(!response) return false;
- if(response)
- {
- format(string, sizeof string, "Mensagem: %s. Usuario: %s.", inputtext, PegarNome(playerid));
- SendClientMessage(idclicked[playerid], 0xFFFF00AA, string);
- }
- }
- case DIALOG_MONEY:
- {
- GivePlayerMoney(idclicked[playerid], strlen(inputtext));
- format(string, sizeof string, "Você deu $%d para o jogador %s.", inputtext, PegarNome(idclicked[playerid]));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- }
- case DIALOG_WEAPON:
- {
- GivePlayerWeapon(idclicked[playerid], strlen(inputtext), 50);
- format(string, sizeof string, "Você deu a arma de ID %d para o jogador %s.", inputtext, PegarNome(idclicked[playerid]));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- }
- }
- return true;
- }
- forward Kicka(p); public Kicka(p) {
- #undef Kick
- Kick(p);
- #define Kick(%0) SetTimerEx("Kicka", 100, false, "i", %0)
- return 1;
- }
- forward Bana(p); public Bana(p) {
- #undef Ban
- Ban(p);
- #define Ban(%0) SetTimerEx("Bana", 100, false, "i", %0)
- return 1;
- }
- stock PegarNome(playerid)
- {
- new sendername[MAX_PLAYERS];
- GetPlayerName(playerid, sendername, sizeof sendername);
- return sendername;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement