Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp> //
- #include <SII> //
- #include <ZCMD> //
- #include <sscanf2>//
- //===============//
- #if defined FILTERSCRIPT
- //--------------------------//
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("|.|.|.|System Cash v1.0|.|.|.|");
- print("|.|.|.|Criado Por Wellington Mateus|.|.|.|\n");
- print("--------------------------------------\n");
- new AtualizarGrana;// Variavel do Timer de Atualizar A GRANA!
- for(new i = 0; i < MAX_PLAYERS; i++) //LOop pra salvar a conta de geral
- {
- CarregarContas(x);
- }
- SetTimer("SendMensagens",30000,1);
- AtualizarGrana = SetTimer("AtualizarCash", 500, true);
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new i = 0; i < MAX_PLAYERS; i++) //LOop pra salvar a conta de geral
- {
- SalvarContas(i);
- }
- return 1;
- }
- #else
- main()
- {
- print("\n--------------------------------------");
- print("|.|.|.|System Cash v1.0|.|.|.|");
- print("|.|.|.|Criado Por Wellington Mateus|.|.|.|\n");
- print("--------------------------------------\n");
- }
- #endif
- //---------#Ant Money Hacker----------//
- #define GetPlayerMoneyEx(%0) \
- (((Cash[%0])))
- #define SetPlayerMoneyEx(%0,%1) \
- (((Cash[%0] = %1,ResetPlayerMoney(%0),GivePlayerMoney(%0,%1))))
- #define GivePlayerMoneyEx(%0,%1) \
- (((Cash[%0] += %1,GivePlayerMoney(%0,%1))))
- #define ResetPlayerMoneyEx(%0) \
- (((Cash[%0] = 0,ResetPlayerMoney(%0))))
- //---------#Enums#---------//
- enum pInfo
- {
- pVip,
- pAdmin,
- pCash,
- pLevel,
- pDias,
- pSkin,
- };
- new WInfo[MAX_PLAYERS][pInfo];
- //--------------------------------
- #define iPasta "Contas/%s.ini" //
- //----------#Dialogs#-----------//
- #define DIALOG_INFO 0
- #define DCash 1
- #define DGranaCash 2
- #define DVipCash 3
- #define DLevelCash 4
- #define DLogin 5
- #define DRegistro 6
- #define VIPInfo 7
- #define GMXInfo 8
- //---------#Variáveis#---------//
- new BigEar[MAX_PLAYERS];
- new TempoKitVip[MAX_PLAYERS];
- new Cash[MAX_PLAYERS];
- new cash;
- new iddele;
- new String[256];
- new Logado[MAX_PLAYERS];
- new TentandoRegistrar[MAX_PLAYERS];
- static corda[MAX_PLAYERS][128],formata[MAX_PLAYERS][30],mandoumensagem[MAX_PLAYERS];
- //----------[Stocks]----------//
- stock pNome(playerid)
- {//Essa função irá returnar o nome do jogador, sendo assim não precisa toda vez usar new nome[MAX_PLAYER_NAME]; GetPlayerName e bla bla bla.
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- return nome;
- }
- stock IsNumero(string[])
- {
- for (new i = 0, j = strlen(string); i < j; i++)
- {
- if (string[i] > '9' || string[i] < '0') return 0;
- }
- return 1;
- }
- //----------[Cores]----------//
- #define COR_VIP 0x98F5FFAA
- #define COR_BRANCO 0xFAFAFAFF
- #define COR_VERDE 0x00FF00FF
- #define COR_AZUL 0x33CCFFAA
- #define BRANCO2 0xFFFFFFAA
- #define AMARELO 0xFFFF33AA
- public OnPlayerRequestClass(playerid, classid)
- {
- if(Logado[playerid] == 0)
- {
- SetPlayerPos(playerid, 2173.4932,-1108.9648,25.3100);//Seta a visao da camera!
- SetPlayerCameraPos(playerid, 2171.3335,-1107.0033,25.4181);// Seta a posição!
- SetPlayerCameraLookAt(playerid, 2146.9326,-1077.8234,41.0193);// Seta o Angulo!
- if(fexist(Arquivo(playerid)))
- {
- format(String, 256, "{FFFFFF}Bem vindo %s\n\nStatus da conta: Registrada\nDigite sua senha abaixo para logar.", pNome(playerid));
- ShowPlayerDialog(playerid, DLogin, DIALOG_STYLE_INPUT, "Login", String, "Logar", "Sair");
- }
- else
- {
- format(String, 256, "{FFFFFF}Bem vindo %s\n\nStatus da conta: Não Registrada\nDigite uma senha abaixo para se registrar.", pNome(playerid));
- ShowPlayerDialog(playerid, DRegistro, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Sair");
- }
- }else SpawnPlayer(playerid), OnPlayerSpawn(playerid);
- return false;
- }
- public OnPlayerConnect(playerid)
- {
- CarregarContas(playerid);
- WInfo[playerid][pCash] = 0;
- WInfo[playerid][pVip] = 0;
- WInfo[playerid][pAdmin] = 0;
- BigEar[playerid] = 0;
- if(Logado[playerid] == 0)
- {
- SetPlayerPos(playerid, 2173.4932,-1108.9648,25.3100);//Seta a visao da camera!
- SetPlayerCameraPos(playerid, 2171.3335,-1107.0033,25.4181);// Seta a posição!
- SetPlayerCameraLookAt(playerid, 2146.9326,-1077.8234,41.0193);// Seta o Angulo!
- if(fexist(Arquivo(playerid)))
- {
- format(String, 256, "{FFFFFF}Bem vindo %s\n\nStatus da conta: Registrada\nDigite sua senha abaixo para logar.", pNome(playerid));
- ShowPlayerDialog(playerid, DLogin, DIALOG_STYLE_INPUT, "Login", String, "Logar", "Sair");
- }
- else
- {
- format(String, 256, "{FFFFFF}Bem vindo %s\n\nStatus da conta: Não Registrada\nDigite uma senha abaixo para se registrar.", pNome(playerid));
- ShowPlayerDialog(playerid, DRegistro, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Sair");
- }
- }else SpawnPlayer(playerid), OnPlayerSpawn(playerid);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- SalvarContas(playerid);
- switch(reason)
- {
- case 0: format(String, 40, "%s crashou do servidor", pNome(playerid));
- case 1: format(String, 55, "%s saiu do servidor por conta propria", pNome(playerid));
- case 2: format(String, 55, "%s saiu do servidor kickado ou banido", pNome(playerid));
- }
- MensagemPraQuemTaPerto(10.0, playerid, String, COR_VIP,COR_VIP,COR_VIP,COR_VIP,COR_VIP);
- return 1;
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- if(!success)
- {
- SendClientMessage(playerid, -1, "Comando Não existente /ajuda ou chame um Administrador!");
- return 1;
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(mandoumensagem[playerid] == 0)
- {
- if(WInfo[playerid][pAdmin] >= 1)
- {
- format(String, sizeof(String), "{DCDCDC}| INFO | {97FFFF}Você é Administrador e Logou com o Nível Admin: {FFEC8B}[%d]", WInfo[playerid][pAdmin]);
- SendClientMessage(playerid, 0x00FF00AA, String);
- }
- if(WInfo[playerid][pVip] >= 1)
- {
- format(String, sizeof(String), "{DCDCDC}| INFO | {97FFFF}Você é Jogador Vip");
- SendClientMessage(playerid, 0xDCDCDCAA, String);
- }
- if(WInfo[playerid][pCash] >= 1)
- {
- format(String, sizeof(String), "{DCDCDC}| INFO | {97FFFF}Você tem o Saldo de [%d] de [*Cash*]",WInfo[playerid][pCash]);
- SendClientMessage(playerid, 0xDCDCDCAA, String);
- }
- mandoumensagem[playerid] = 1;
- ScoreLevel(playerid);
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(response)
- {
- if(dialogid == DCash)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid,DGranaCash,DIALOG_STYLE_INPUT,"Dinheiro","\n{04dfff}Digite abaixo quanto de Dinheiro você quer Pegar:\nPreço: {e76f1b}(1000 Reais = {fd0505}1 Cash)","OK","Fechar");
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid,DVipCash,DIALOG_STYLE_INPUT,"Vip","\n{04dfff}Digite abaixo Quantos Dias vips você quer comprar:\nPreço: {e76f1b}(Vip = {fd0505}100 Cash(Cada Dia)","OK","Fechar");
- }
- if(listitem == 2)
- {
- ShowPlayerDialog(playerid,DLevelCash,DIALOG_STYLE_INPUT,"Leveis","\n{04dfff}Digite abaixo o número de leveis que você deseja comprar:\n(Preço: {e76f1b}1 level = {fd0505}5 Cash)\n","OK","Fechar");
- }
- return 1;
- }
- }
- if(dialogid == DGranaCash)
- {
- new valor = strval(inputtext);
- if(response)
- {
- if(valor < 1)
- {
- ShowPlayerDialog(playerid,DGranaCash,DIALOG_STYLE_INPUT,"Dinheiro","\n{04dfff}O número não pode ser 0.\nPreço: {e76f1b}(1 Real(is) = {fd0505}1 Cash)","OK","Fechar");
- return 1;
- }
- if(WInfo[playerid][pCash] < valor*1)
- {
- format(String, sizeof(String), "{FF00FF}[*Cash*] Você não tem {FFFF00}%d{FF00FF} Cash.",valor*1);
- ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, "Dinheiro", String, "Voltar", "");
- return 1;
- }
- if(WInfo[playerid][pCash] >= valor*1)
- {
- WInfo[playerid][pCash] -= valor*1;
- GivePlayerMoneyEx(playerid,valor);
- format(String, sizeof(String), "{FF00FF}[*Cash*] Você comprou {FFFF00}%d{FF00FF} de Dinheiro por {FFFF00}%d{FF00FF} Cash.",valor,valor*1);
- ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, "Dinheiro", String, "Voltar", "");
- return 1;
- }
- }
- else
- {
- }
- }
- if(dialogid == DVipCash)
- {
- new valor = strval(inputtext);
- if(response)
- {
- if(!IsNumero(inputtext))
- {
- ShowPlayerDialog(playerid,DVipCash,DIALOG_STYLE_INPUT,"Vip","Digite\n {04dfff}apenas NÚMEROS:\n(Preço: {e76f1b}(Vip(1 Dia) = {fd0505}100 Cash)\n","Comprar","Cancelar");
- return 1;
- }
- if(valor < 1)
- {
- ShowPlayerDialog(playerid,DVipCash,DIALOG_STYLE_INPUT,"Vip","\n{04dfff}Os Dias tem de ser maior de 0.\n(Preço: {e76f1b}(Vip(1 Dia) = {fd0505}100 Cash)\n","Comprar","Cancelar");
- return 1;
- }
- if(WInfo[playerid][pCash] < valor*100)
- {
- format(String, sizeof(String), "{FF00FF}[*CASH*] Você não tem {FFFF00}500{FF00FF} Cash.");
- ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, "Telefone", String, "Voltar", "");
- return 1;
- }
- if(WInfo[playerid][pCash] >= valor*100)
- {
- WInfo[playerid][pVip] = 1;
- WInfo[playerid][pDias] = (gettime() + (valor * 24 * 60 * 60));
- WInfo[playerid][pCash] -= valor*100;
- format(String, sizeof(String), "{FF00FF}[*CASH*] Você Comprou {FFFF00}%d{FF00FF} dias Vip por {FFFF00}%d{FF00FF} Cash ",valor,valor*100);
- ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, "Vip", String, "Voltar", "");
- return 1;
- }
- }
- else
- {
- }
- }
- if(dialogid == DLevelCash)
- {
- new valor = strval(inputtext);
- if(response)
- {
- if(valor < 1)
- {
- ShowPlayerDialog(playerid,DLevelCash,DIALOG_STYLE_INPUT,"Level","\n{04dfff}O número não pode ser 0.\nPreço: {e76f1b}(1 Nivel = {fd0505}3 Cash)","OK","Fechar");
- return 1;
- }
- if(WInfo[playerid][pCash] < valor*3)
- {
- format(String, sizeof(String), "{FF00FF}[*Cash*] Você não tem {FFFF00}%d{FF00FF} Cash.",valor*3);
- ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, "Level", String, "Voltar", "");
- return 1;
- }
- if(WInfo[playerid][pCash] >= valor*3)
- {
- WInfo[playerid][pLevel] += valor;
- WInfo[playerid][pCash] -= valor*3;
- ScoreLevel(playerid);
- format(String, sizeof(String), "{FF00FF}[*CASH*] Você comprou {FFFF00}%d{FF00FF} Level por {FFFF00}%d{FF00FF} Cash.",valor,valor*3);
- ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, "Level", String, "Voltar", "");
- return 1;
- }
- }
- else
- {
- }
- }
- if(dialogid == DRegistro)
- {
- TentandoRegistrar[playerid] = 1;
- if(!response)
- return SendClientMessage(playerid, COR_VERDE, "Você não quis se registrar, então foi kickado!"), TentandoRegistrar[playerid] = 0, Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext))//Se a senha estiver em branco irá returnar essa mensagem, junto com o dialog box
- return ShowPlayerDialog(playerid, DRegistro, DIALOG_STYLE_INPUT, "Registro", "{FFFFFF}Sua senha está no formato incorreto!\nDigite sua senha abaixo.\n\n\nVocê não digitou nada.", "Registrar", "Sair");
- if(strlen(inputtext) < 5 || strlen(inputtext) > 20)//Se a senha tiver menos do que 5 dígitos irá returnar essa mensagem, junto com o dialog box
- return ShowPlayerDialog(playerid, DRegistro, DIALOG_STYLE_INPUT, "Registro", "{FFFFFF}Sua senha está no formato incorreto!\nDigite sua senha abaixo.\n\n\nSua senha deve conter no mínimo 5 e no máximo 20 dígitos.", "Registrar", "Sair");
- if(TentandoRegistrar[playerid] == 1)
- {
- if(INI_Open(Arquivo(playerid)))
- {
- INI_WriteString("Senha",inputtext);//Aqui estarão sendo salvos os dados da conta do jogador, tais como a senha, admin, Nivel e etc..
- INI_WriteInt("Admin", 0);
- INI_WriteInt("Vip", 0);
- INI_WriteInt("Level", 0);
- INI_WriteInt("Cash", 0);
- INI_Save();//Toda vez que abrir algum arquivo é importante salvar
- INI_Close();//E logo em seguida fecha-lo.
- format(String, 256, "Bem vindo %s\n\nStatus da conta: registrada\nDigite sua senha abaixo para logar.", pNome(playerid));
- ShowPlayerDialog(playerid, DLogin, DIALOG_STYLE_INPUT, "Login", String, "Logar", "");
- }
- }
- return 1;
- }
- }
- if(dialogid == DLogin)
- {
- if(!response)
- return Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext))
- {
- format(String, 256, "Bem vindo %s\n\nStatus da conta: registrada\nDigite sua senha abaixo para logar.", pNome(playerid));
- ShowPlayerDialog(playerid, DLogin, DIALOG_STYLE_INPUT, "Login", String, "Logar", "");
- return 1;
- }
- if(INI_Open(Arquivo(playerid)))
- {
- INI_ReadString(corda[playerid], "Senha", 20);
- if(strcmp(inputtext, corda[playerid], false))//Caso o jogador entre com a senha errada
- {
- format(String, 256, "{FFFFFF}Bem vindo %s\n\nStatus da conta:registrada\nDigite sua senha abaixo para logar.", pNome(playerid));
- ShowPlayerDialog(playerid, DLogin, DIALOG_STYLE_INPUT, "Senha errada :(", String, "Logar", "");
- return 1;
- }
- ResetPlayerMoneyEx(playerid);
- SetPlayerMoneyEx(playerid, INI_ReadInt("Dinheiro"));//Irá dar o dinheiro do jogador
- WInfo[playerid][pVip] = INI_ReadInt("Vip");//Irá dar o nível do admin
- WInfo[playerid][pCash] = INI_ReadInt("Cash");
- WInfo[playerid][pLevel] = INI_ReadInt("Level");
- WInfo[playerid][pAdmin] = INI_ReadInt("Admin");
- WInfo[playerid][pSkin] = INI_ReadInt("Skin");
- INI_Close();
- Logado[playerid] = 1;
- SetSpawnInfo(playerid, 1, SetPlayerSkin(playerid, WInfo[playerid][pSkin]), 1716.5039, -1692.5128, 13.5177, 183.2262, -1, -1, -1, -1, -1, -1), SpawnPlayer(playerid), OnPlayerSpawn(playerid);
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- forward ScoreLevel(playerid);
- public ScoreLevel(playerid)
- {
- new LevScore;
- LevScore = WInfo[playerid][pLevel];
- SetPlayerScore(playerid, LevScore);
- }
- //---------------[Comandos do FS]---------------//
- COMMAND:kitvip(playerid, params[])
- {
- if(GetTickCount() - TempoKitVip[playerid] < 180000)
- {
- SendClientMessage(playerid,COR_VIP,"Aguarde 3 Minutos para usar O Kit novamente!");
- return 1;
- }
- if(WInfo[playerid][pVip] < 1)
- return SendClientMessage(playerid, COR_VIP, "Você não é um vip!");
- format(String, sizeof(String), "%s Pegou Seu Kit Vip.", pNome(playerid));
- MensagemPraQuemTaPerto(30.0, playerid, String, COR_VIP,COR_VIP,COR_VIP,COR_VIP,COR_VIP);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 46,1);
- GivePlayerWeapon(playerid, 35,1);
- GivePlayerWeapon(playerid, 24, 350);
- GivePlayerWeapon(playerid, 31, 350);
- GivePlayerWeapon(playerid, 29, 350);
- GivePlayerWeapon(playerid, 25, 350);
- GivePlayerWeapon(playerid, 4,1);
- GivePlayerWeapon(playerid,16,4);
- GivePlayerWeapon(playerid, 34, 4);
- SetPlayerArmour(playerid,100);
- SetPlayerHealth(playerid,100);
- TempoKitVip[playerid] = GetTickCount();
- SendClientMessage(playerid,COR_VIP,"Você pegou o seu Kit Vip");
- return 1;
- }
- COMMAND:menucash(playerid, params[])
- {
- if(WInfo[playerid][pCash] < 1)
- return SendClientMessage(playerid, COR_VIP, "Você não tem cash!");
- if(IsPlayerConnected(playerid))
- {
- ShowPlayerDialog(playerid,DCash,DIALOG_STYLE_LIST,"Menu","{FFFFFF}Pegar Grana\nVip\nLevel","OK","Fechar");
- }
- return 1;
- }
- COMMAND:gmx(playerid, params[])
- {
- if(WInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_VIP, "Você não tem permissão para usar esse comando!");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- new day,month,year,ghour,minute,second;
- getdate(day, month, year);
- gettime(ghour, minute, second);
- if(IsPlayerConnected(i))
- format(String,sizeof(String),"{FACC43}Isto é um GMX, não saiam do Servidor\n\n{45FF54}Informações do GMX:\n\n{FF45E6}Admin: %s\n{FF45AE}Data do GMX: %d/%d/%d\n{FF4557}Hora do GMX: %d:%d:%d\n\n{FACC43}Por Favor Aguarde!",pNome(playerid),day,month,year,ghour,minute,second);
- ShowPlayerDialog(i,GMXInfo,DIALOG_STYLE_MSGBOX,"{EB00CB}GMX:",String,"Ok","");
- SendRconCommand("gmx");
- { SalvarContas(i); }
- }
- return 1;
- }
- COMMAND:pegaradmin(playerid, params[])
- {
- WInfo[playerid][pAdmin] = 1;
- format(String, sizeof(String), "Você acabou de pegar Admin level [1]");
- SendClientMessage(playerid, COR_AZUL, String);
- SalvarContas(playerid);
- SalvarContas(iddele);
- return 1;
- }
- COMMAND:comandos(playerid, params[])
- {
- format(String, sizeof(String), "Admins : |/setarcash|/retirarcash|/pegaradmin|/darcash|/statusplayer|/gmx|");
- SendClientMessage(playerid, COR_AZUL, String);
- format(String, sizeof(String), "Comandos : |/menu|/status|/vips|/admins");
- SendClientMessage(playerid, COR_AZUL, String);
- return 1;
- }
- COMMAND:vips(playerid, params[])
- {
- SendClientMessage(playerid, AMARELO , "¤ Jogadores Vips Online ¤");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(WInfo[i][pVip] >= 1)
- {
- format(String, 40, "Nick: %s | Tipo: VIP", pNome(i));
- SendClientMessage(playerid, COR_VIP, String);
- }
- }
- }
- return 1;
- }
- COMMAND:admins(playerid, params[])
- {
- SendClientMessage(playerid, AMARELO , "¤ Administradores Online ¤");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(WInfo[i][pVip] >= 1)
- {
- format(String, 40, "Admin: [%s] ID [%d]", pNome(i),i);
- SendClientMessage(playerid, COR_VIP, String);
- }
- }
- }
- return 1;
- }
- COMMAND:status(playerid, params[])
- {
- format(String, sizeof(String), "|------------|*Status De %s*|------------|",pNome(playerid));
- SendClientMessage(playerid, AMARELO, String);
- if(WInfo[playerid][pAdmin] > 0)
- {
- format(String, sizeof(String), "Admin {FFFF00}[Sim]");
- SendClientMessage(playerid, 0x97FFFFAA, String);
- }
- if(WInfo[playerid][pAdmin] < 1)
- {
- format(String, sizeof(String), "Admin {FF0000}[Não]");
- SendClientMessage(playerid, 0x97FFFFAA, String);
- }
- format(String, sizeof(String), "Saldo De Cash's {FF8C00}[%d]",WInfo[playerid][pCash]);
- SendClientMessage(playerid, 0x97FFFFAA, String);
- format(String, sizeof(String), "Level {FF8C00}[%d]",WInfo[playerid][pLevel]);
- SendClientMessage(playerid, 0x97FFFFAA, String);
- if(WInfo[playerid][pVip] > 0)
- {
- format(String, sizeof(String), "Vip {FFFF00}[Sim]");
- SendClientMessage(playerid, 0x97FFFFAA, String);
- }
- if(WInfo[playerid][pVip] < 1)
- {
- format(String, sizeof(String), "Vip {FF0000}[Não]");
- SendClientMessage(playerid, 0x97FFFFAA, String);
- }
- format(String, sizeof(String), "|------------|*Fim*|------------|");
- SendClientMessage(playerid, AMARELO, String);
- return 1;
- }
- COMMAND:darcash(playerid, params[])
- {
- if(WInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_VIP, "Você não tem permissão para usar esse comando!");
- if(sscanf(params, "dd",iddele,cash)) return SendClientMessage(playerid, COR_BRANCO, "USE: /darcash [id] [Quantidade]");
- WInfo[playerid][pCash] = cash;
- format(String, sizeof(String), "Você recebeu [%d] de cash do Admin [%s]", cash, pNome(playerid));
- SendClientMessage(iddele, COR_AZUL, String);
- format(String, sizeof(String), "Você deu [%d] de cash para [%s]", cash, pNome(iddele));
- SendClientMessage(playerid, COR_AZUL, String);
- SalvarContas(playerid);
- SalvarContas(iddele);
- return 1;
- }
- COMMAND:statusplayer(playerid, params[])
- {
- if(WInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_VIP, "Você não tem permissão para usar esse comando!");
- if(sscanf(params, "d",iddele)) return SendClientMessage(playerid, COR_BRANCO, "USE: /statusplayer [id]");
- format(String, sizeof(String), "|------------|*Status De %s*|------------|",pNome(iddele));
- SendClientMessage(playerid, AMARELO, String);
- format(String, sizeof(String), "Admin Level {FF8C00}[%d]",WInfo[iddele][pAdmin]);
- SendClientMessage(playerid, 0x97FFFFAA, String);
- format(String, sizeof(String), "Saldo De Cash's {FF8C00}[%d]",WInfo[iddele][pCash]);
- SendClientMessage(playerid, 0x97FFFFAA, String);
- format(String, sizeof(String), "Level {FF8C00}[%d]",WInfo[iddele][pLevel]);
- SendClientMessage(playerid, 0x97FFFFAA, String);
- if(WInfo[iddele][pVip] > 0)
- {
- format(String, sizeof(String), "Vip {FFFF00}[Sim]");
- SendClientMessage(playerid, 0x97FFFFAA, String);
- }
- if(WInfo[iddele][pVip] < 1)
- {
- format(String, sizeof(String), "Vip {FF0000}[Não]");
- SendClientMessage(playerid, 0x97FFFFAA, String);
- }
- format(String, sizeof(String), "|------------|*Fim*|------------|");
- SendClientMessage(playerid, AMARELO, String);
- return 1;
- }
- COMMAND:setarcash(playerid, params[])
- {
- if(WInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_VIP, "Você não tem permissão para usar esse comando!");
- if(sscanf(params, "dd",iddele,cash)) return SendClientMessage(playerid, COR_BRANCO, "USE: /setarcash [id] [Quantidade]");
- WInfo[playerid][pCash] = cash;
- format(String, sizeof(String), "Você recebeu [%d] de cash do Admin [%s]", cash, pNome(playerid));
- SendClientMessage(iddele, COR_AZUL, String);
- format(String, sizeof(String), "Você deu [%d] de cash para [%s]", cash, pNome(iddele));
- SendClientMessage(playerid, COR_AZUL, String);
- SalvarContas(playerid);
- SalvarContas(iddele);
- return 1;
- }
- COMMAND:retirarcash(playerid, params[])
- {
- if(WInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_VIP, "Você não tem permissão para usar esse comando!");
- if(sscanf(params, "dd",iddele,cash)) return SendClientMessage(playerid, COR_BRANCO, "USE: /retirarcash [id] [Quantidade]");
- WInfo[playerid][pCash] -= cash;
- format(String, sizeof(String), "O Admin [%s] Retirou %d de cash seu",pNome(playerid),cash);
- SendClientMessage(iddele, COR_AZUL, String);
- format(String, sizeof(String), "Você retirou [%d] de cash de [%s]", cash, pNome(iddele));
- SendClientMessage(playerid, COR_AZUL, String);
- SalvarContas(playerid);
- SalvarContas(iddele);
- return 1;
- }
- // SALVAR CONTA!!
- stock SalvarContas(playerid)
- {
- format(formata[playerid], 69, "Contas/%s.ini", pNome(playerid));//formata
- if(INI_Open(formata[playerid]))//Abre a conta
- {
- INI_WriteInt("Admin", WInfo[playerid][pAdmin]);
- INI_WriteInt("Vip", WInfo[playerid][pVip]);
- INI_WriteInt("Cash", WInfo[playerid][pCash]);
- INI_WriteInt("Level", WInfo[playerid][pLevel]);
- INI_Save();//Salva
- INI_Close();//Fecha
- }
- return 1;
- }
- stock CarregarContas(playerid)
- {
- WInfo[playerid][pAdmin] = INI_ReadInt("Admin");//Irá dar o nível do admin
- WInfo[playerid][pVip] = INI_ReadInt("Vip");
- WInfo[playerid][pCash] = INI_ReadInt("Cash");
- WInfo[playerid][pLevel] = INI_ReadInt("Level");
- INI_Close();
- }
- stock Arquivo(playerid)
- {
- format(corda[playerid], 50, "Contas/%s.ini", pNome(playerid));//Endereço onde será salvo as contas.
- return corda[playerid];
- }
- // =================== ATUALIZAR ANTI MONEY ==================== //
- forward AtualizarCash();
- public AtualizarCash()
- {
- for(new i = 0; i < MAX_PLAYERS; i++) //LOop Ant money hacker
- {
- ResetPlayerMoney( i); //nem essa pra ResetPlayerMoneyEx! não troque!
- GivePlayerMoney(i, GetPlayerMoneyEx( i)); //não troque essa função para GivePlayerMoneyEx!
- }
- return 1;
- }
- // ================== Mensagens randomicas no server! ====================//
- new Cores[] = {
- COR_VIP,
- COR_BRANCO,
- COR_VERDE,
- BRANCO2,
- AMARELO,
- COR_AZUL
- };
- new Mensagens[][400] = {
- "[SERVER] Não sabe os comandos do Filterscript? /comandos!",
- "[SERVER] Para pegar administrador /pegaradmin!",
- "[SERVER] Se você não sabe algum comando digite /ajuda ou /relatorio."
- };
- forward MSGRandom();
- public MSGRandom()
- {
- new random1 = random(sizeof(Mensagens));
- new random2 = random(sizeof(Cores));
- format(String, sizeof(String), "%s", Mensagens[random1]);
- SendClientMessageToAll(Cores[random2],String);
- return 1;
- }
- forward MensagemPraQuemTaPerto(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
- public MensagemPraQuemTaPerto(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- //radi = 2.0; //Trigger Radius
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(!BigEar[i])
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- SendClientMessage(i, col1, string);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- SendClientMessage(i, col2, string);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- SendClientMessage(i, col3, string);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- SendClientMessage(i, col4, string);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- SendClientMessage(i, col5, string);
- }
- }
- else
- {
- SendClientMessage(i, col1, string);
- }
- }
- }
- }//not connected
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment