Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /* GAME MODE PARA USO DE QUEM QUER SER ALGUEM NA VIDA E APRENDER A LINGUAGNEM (FUCK SE ) '-' */
- /* Créditos dos sistema aos seus criadores, tenho esse gamemode faz um tempo parei já de mecher nele e no pawno, por isso n lembro nome de alguns criadores ._. */
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- #include <a_samp>
- #include <dini>
- #include <zcmd>
- #include <sscanf2>
- //#include <string>
- //#include <pgrana>
- #define DIRETORIO "/Jogadores/%s.ini"
- #define DBANCO "/Jogadores/Banco/%s.ini"
- #define paislogin 1996
- #define REGISTRO 1997
- #define LOGIN 1998
- #define SPAWNJ 1999
- #define pMenuProf 5059
- #define pHonestas 5060
- #define pHonestas2 5061
- #define pCriminosas 5062
- #define pGoverno 5063
- #define pMafia 5064
- #define pTransporte 5065
- #define MenuBancoH 5024
- //======= [ Cores ] =====
- #define Vermelho 0xFF0000AA
- #define Branco 0xFFFFFFAA
- #define newadm 0x46BBAA00
- #define Amarelo 0xFFFF00FF
- #define Verde 0x00D700AA
- #define Green 0x16EB43FF
- #define Red 0xff0000ff
- #define Laranja 0xFF6600AA
- //========== [ Salarios ] ==========
- #define SeguroDesemprego 65
- #define Salario_Caminhao 600
- #define Salario_MTaxi 450
- #define Salario_Taxi 480
- #define Salario_Maquinista 450
- #define Salario_PolicialM 1200
- #define Salario_PolicialC 1400
- #define Salario_PolicialF 1500
- #define Salario_VDrogas 800
- #define Salario_TrafArmas 1150
- #define Salario_GuardaTr 810
- #define Salario_Advogado 1500
- #define Salario_VSorvete 250
- #define Salario_Paramedico 950
- #define Salario_Hacker 1240
- #define Fianca 4500
- #define MAX_TEMPO_AFK 5
- #define MAX_CARROS 350
- #define VALOR_LITRO 2.0 //- Definir valor por litro da gasolina
- #define DIALOG_GAS 24 //- ID Do Dialog para Colocar Gasolina
- //========== [ Empregos ] ==========
- #define Desempregado 0
- #define Caminhoneiro 1
- #define MotoTaxi 2
- #define Taxista 3
- #define Maquinista 4
- #define PolicialM 5
- #define PolicialC 6
- #define PolicialF 7
- #define VDrogas 8
- #define TrafArmas 9
- #define GuardaTransito 10
- #define Advogado 11
- #define VSorvete 12
- #define Paramedico 13
- #define Hacker 14
- new pGasolina[MAX_PLAYERS];
- new Text:gText3[MAX_PLAYERS];
- new Text:TGasosa[MAX_PLAYERS];
- new Text:BemVindo;
- new Text:ImagemConnect;
- new proximocarro;
- new incar[MAX_PLAYERS];
- new scar[MAX_PLAYERS];
- new AreaPosto[MAX_PLAYERS];
- //========= [ Portões ] ==========
- new PortaoDP;
- new PortaoDP2;
- new ElevadorDP;
- new ElevadorCima = 0;
- new PortaoAberto = 0;
- new Portao2Aberto = 0;
- //========= [ Pickups ] ==========
- new EntrarPref;
- new SaidaPref;
- //===========[ Forwards ]===========
- forward PostosG();
- forward Gasolina();
- forward IsNumeric(const string[]);
- forward CriarVeiculo2(m,Float:x,Float:y,Float:z,Float:r,c,d);
- forward Liberar(playerid);
- forward LoteriaPublic();
- forward AntAfk(playerid);
- forward GanharExp(playerid);
- forward CheckCurriculo(playerid);
- forward ReprovarC(playerid);
- forward ChecarPing(playerid);
- forward AtualizarGrana();
- forward TempoExpMinuto();
- forward BanLog(string[]);
- forward PayDay();
- forward AtualizarChatBubble();
- forward LogarProf(playerid);
- forward AcessoBanco(playerid);
- forward Firewall(playerid);
- forward FirewallLigado();
- forward Avisado(playerid);
- forward LimiteGrana(playerid);
- new Mutecmd[MAX_PLAYERS]= 0;
- new Aviso[MAX_PLAYERS]= 0;
- //======[ Roubo ao Banco ]======
- new Assalto[MAX_PLAYERS] = 0;
- new FirewallOn[MAX_PLAYERS] = 0;
- new RoubarBanco[MAX_PLAYERS] = 0;
- new KillFirewall[MAX_PLAYERS];
- new bool:AcessoOn[MAX_PLAYERS];
- new KillAcesso;
- new KillFirewallOn;
- new KillFirewallOn2;
- new KillFirewallOn3;
- new KillTransferencia;
- new cudigos[MAX_PLAYERS];
- new Codigos[4][256] =
- {
- "TROLLED",
- "MEGUSTA",
- "POKERFC",
- "NOKUZIN"
- };
- //=====[ S. Caças ]=====
- //new CacaInProgress[MAX_PLAYERS] = 0;
- //new QtCacas[MAX_PLAYERS] = 0;
- //=====[ S. Caças ]=====
- new vfile[128];
- new StringLg[256];
- new Preso[MAX_PLAYERS]= 0;
- new TempoPreso[MAX_PLAYERS] = 0;
- new Autorizado[MAX_PLAYERS];
- new bool:SenhaBanco[MAX_PLAYERS];
- new LogadoBanco[MAX_PLAYERS];
- new podedm;
- // == Loteria ==
- new NumeroLoto[MAX_PLAYERS];
- new TGanhador;
- new DinheiroAcumuladoLoto;
- new vernumerosorteado[MAX_PLAYERS];
- new TaJogando[MAX_PLAYERS];
- new PlanoMedico[MAX_PLAYERS] = 0;
- new pAdmin[MAX_PLAYERS];
- // Level Systen
- new Experiencia[MAX_PLAYERS];
- new pLevel[MAX_PLAYERS];
- new TempoLevelMinuto[MAX_PLAYERS];
- //=== [ Profissão ] ===
- new Profissao[MAX_PLAYERS];
- new reprovado[MAX_PLAYERS], aprovado[MAX_PLAYERS];
- new GranaEx[MAX_PLAYERS];
- enum pInfo
- {
- Logado,
- pBrasil,
- pPortugal
- }
- new pFase[MAX_PLAYERS][pInfo];
- enum pPos
- {
- Float:LastX,
- Float:LastY,
- Float:LastZ,
- }
- new
- PlayerLastPos[MAX_PLAYERS][pPos],
- PlayerAfkTicks[MAX_PLAYERS],
- pAFK[MAX_PLAYERS],
- Text:AfkText,
- Text:AfkBackText,
- Float:PlayerPosAfk[3];
- main(){}
- public OnGameModeInit()
- {
- print("\n\nººººººººººººº ** Servidor Ligado ** ººººººººººººº\n\n");
- SendRconCommand("hostname * Brasil Games [RPG v1.0 - 2012] *");
- SendRconCommand("mapname Brasil RPG");
- SetGameModeText("Brasil Games v1.0");
- //textdrawns
- for (new i=0;i<MAX_PLAYERS;i++)
- {
- gText3[i] = TextDrawCreate(498.000000, 75.000000, "~g~$~w~000000000");
- TextDrawBackgroundColor(gText3[i], 255);
- TextDrawFont(gText3[i], 3);
- TextDrawLetterSize(gText3[i], 0.559998, 2.599998);
- TextDrawColor(gText3[i], -1);
- TextDrawSetOutline(gText3[i], 0);
- TextDrawSetProportional(gText3[i], 1);
- TextDrawSetShadow(gText3[i], 1);
- TGasosa[i] = TextDrawCreate(30,326, " ");
- TextDrawFont(TGasosa[i],1);
- TextDrawBackgroundColor(TGasosa[i], 0x000000FF);
- TextDrawSetOutline(TGasosa[i], 1);
- TextDrawColor(TGasosa[i], 0xFFFFFFFF);
- TextDrawShowForPlayer (i, TGasosa[i]);
- }
- //-
- if(!fexist("Banidos.ini")) dini_Create("Banidos.ini");
- new string[256];
- for(new carro = 0; carro < MAX_CARROS; carro++)
- {
- format(string, sizeof(string), "/Carros/carro%d.ini", carro);
- if(dini_Exists(string))
- {
- new carroid;
- //carroid = AddStaticVehicle(dini_Int(string, "Modelo"), dini_Float(string, "CordX"), dini_Float(string, "CordY"), dini_Float(string, "CordZ"), dini_Float(string, "Angulo"), dini_Int(string, "Cor1"), dini_Int(string, "Cor2"));
- dini_IntSet(string, "Id", carroid);
- //SetVehicleNumberPlate(carro, "{FF0000}[ {000000}Sem Dono {FF0000}]");
- SetVehicleNumberPlate(carroid = CreateVehicle(dini_Int(string,"Modelo"), dini_Float(string,"CordX"), dini_Float(string,"CordY"), dini_Float(string,"CordZ"), dini_Float(string,"Angulo"), dini_Int(string,"Cor1"), dini_Int(string,"Cor2"),9999999), dini_Get(string,"Placa"));
- proximocarro++;
- }
- }
- UsePlayerPedAnims();
- DisableInteriorEnterExits();
- EnableStuntBonusForAll(0);
- TGanhador = 0;
- // LotoQuantiaGrana = DinheiroLotoSortear();
- SetTimers();
- TempoExpMinuto();
- //=== [ Pickups ] ====
- EntrarPref = CreatePickup(1239, 1318, 1480.8987, -1770.6410, 18.7958, -1);
- SaidaPref = CreatePickup(1239, 1318, 389.3070, 173.6391, 1008.3828, -1);
- //=== [ 3d Label ] ===
- Create3DTextLabel("Prefeitura\nDe\nLos Santos",-1,1480.8987, -1770.6410, 18.7958,60.0,0);// Prefeitura Entrada
- Create3DTextLabel("Saida",-1,389.3070, 173.6391, 1008.3828,60.0,0);// Prefeitura Saida
- Create3DTextLabel("\n/profissoes",-1,362.4499,173.8849,1008.3828,60.0,0);// comando pra peg
- //===[ Textdraws' ] ===
- AfkText = TextDrawCreate(168.000000,319.000000,"Voce esta bloqueado de upar!");
- TextDrawAlignment(AfkText,0);
- TextDrawBackgroundColor(AfkText,0x000000ff);
- TextDrawFont(AfkText,1);
- TextDrawLetterSize(AfkText,1.000000,2.699999);
- TextDrawColor(AfkText,0xffffffff);
- TextDrawSetOutline(AfkText,1);
- TextDrawSetProportional(AfkText,1);
- TextDrawSetShadow(AfkText,1);
- BemVindo = TextDrawCreate(168.000000,319.000000," ~b~Brasil Games [v1.0]");
- TextDrawAlignment(BemVindo,0);
- TextDrawBackgroundColor(BemVindo,0x000000ff);
- TextDrawFont(BemVindo,1);
- TextDrawLetterSize(BemVindo,1.000000,2.699999);
- TextDrawColor(BemVindo,0xffffffff);
- TextDrawSetOutline(BemVindo,1);
- TextDrawSetProportional(BemVindo,1);
- TextDrawSetShadow(BemVindo,1);
- ImagemConnect = TextDrawCreate(1.000000, -1.000000, "loadsuk:loadsc6");
- TextDrawBackgroundColor(ImagemConnect, 255);
- TextDrawFont(ImagemConnect, 4);
- TextDrawLetterSize(ImagemConnect, 0.500000, 1.000000);
- TextDrawColor(ImagemConnect, -1);
- TextDrawSetOutline(ImagemConnect, 0);
- TextDrawSetProportional(ImagemConnect, 1);
- TextDrawSetShadow(ImagemConnect, 1);
- TextDrawUseBox(ImagemConnect, 1);
- TextDrawBoxColor(ImagemConnect, 255);
- TextDrawTextSize(ImagemConnect, 645.000000, 450.000000);
- AfkBackText = TextDrawCreate(248.000000,351.000000,"Para ser desbloqueado de upar Use: ~r~/~w~sairafk");
- TextDrawAlignment(AfkBackText,0);
- TextDrawBackgroundColor(AfkBackText,0x000000ff);
- TextDrawFont(AfkBackText,1);
- TextDrawLetterSize(AfkBackText,0.299999,1.100000);
- TextDrawColor(AfkBackText,0xffffffff);
- TextDrawSetOutline(AfkBackText,1);
- TextDrawSetProportional(AfkBackText,1);
- TextDrawSetShadow(AfkBackText,1);
- //-
- PortaoDP = CreateObject(980,1540.68652344,-1627.59179688,15.15620422,0.00000000,0.00000000,90.00000000);
- PortaoDP2 = CreateObject(980,1589.98474121,-1638.26818848,15.21242142,0.00000000,0.00000000,359.99523926); //object(airportgate) (1)
- ElevadorDP = CreateObject(976,1561.68164062,-1641.38964844,12.56751347,270.79650879,0.00000000,90.00000000); //object(phils_compnd_gate)
- for(new i=1; i<MAX_VEHICLES; i++)
- {
- SetVehicleNumberPlate(i, "{FF0000}[ {000000}BRGames {FF0000}]");
- }
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- if(!success)
- {
- printf("Rcon Errada!! - IP %s - Senha Usada: %s",ip, password);
- new pip[16];
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- GetPlayerIp(i, pip, sizeof(pip));
- if(!strcmp(ip, pip, true))
- {
- SendClientMessage(i, 0xFFFFFFFF, "Senha Errada!. Bye!");
- Kick(i);
- }
- }
- }
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- TextDrawShowForPlayer(playerid, ImagemConnect);
- TextDrawShowForPlayer(playerid, BemVindo);
- if(pFase[playerid][Logado] == 0)
- {
- ShowPlayerDialog(playerid, SPAWNJ, DIALOG_STYLE_MSGBOX,"Registro/Login", "Bem Vindo Ao servidor!\nClique em continuar para prosseguir o seu registro/login!", "Continuar", "");
- SetPlayerCameraPos(playerid,2683.2480,-1676.5824,36.8194);
- SetPlayerCameraLookAt(playerid,2686.4868,-1680.4825,36.8194);
- SetPlayerPos(playerid, 2701.9219,-1697.5417,30.5223);
- SetPlayerInterior(playerid, 0);
- SetPlayerSkin(playerid, 70);
- TextDrawHideForPlayer(playerid, gText3[playerid]);
- ApplyAnimation(playerid, "STRIP", "strip_E", 4.0, 1, 1, 1, 1, 0);
- }
- if(pFase[playerid][Logado] == 1)
- {
- SpawnPlayer(playerid);
- //TextDrawHideForPlayer(playerid, gText3[playerid]);
- TextDrawShowForPlayer(playerid, gText3[playerid]);
- }
- if(classid == 1 || classid == 0 && !IsPlayerAdmin(playerid))
- {
- //SendClientMessage(playerid,Verde,"This skin is only for admins!");
- return 0;
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- pFase[playerid][Logado] = 0;
- pAFK[playerid] = 0;
- ResetPlayerGranaEx(playerid);
- new string[128];
- format(string,sizeof string,"{00FF00}~> {FFFAFA}%s {FFFAFA}[ {00FF00}%d {FFFAFA}] Conectou-se ao Servidor.",pName(playerid),playerid);
- SendClientMessageToAll(-1, string);
- printf("%s [ID: %d] logou-se ao servidor.",pName(playerid), playerid);
- // Check Ban
- new aname[MAX_PLAYER_NAME];
- new nomepl[MAX_PLAYER_NAME];
- if(dini_Int("NicksBan.ini",pName(playerid)) == 1)
- {
- SendClientMessage(playerid, 0x11B1FFAA, "Você foi Kickado Motivo: Você está banido!");
- format(string, sizeof(string), "%s (%d) Foi Kickado [Motivo]: Nick está Banido!", aname,playerid);
- SendClientMessageToAll(Laranja, string);
- Kick(playerid);
- return 1;
- }
- //
- if(dini_Int("Banidos.ini",pName(playerid)) == 1)
- {
- SendClientMessage(playerid, 0x11B1FFAA, "Você foi Kickado [Motivo]: Conta está banida!");
- format(string, sizeof(string), "%s (%d) Foi Kickado [Motivo]: Conta está banida", aname,playerid);
- SendClientMessageToAll(Laranja, string);
- Kick(playerid);
- return 1;
- }
- if(dini_Int(vfile,"Banido") == 1)
- {
- new Ip[30];
- GetPlayerIp(playerid, Ip, sizeof(Ip));
- SendClientMessage(playerid,Verde,"~> Log Ban <~");
- format(string, sizeof(string),"Nick: %s", nomepl);
- SendClientMessage(playerid,-1,string);
- format(string, sizeof(string),"Banido Por: %s", dini_Get(vfile,"BanPor"));
- SendClientMessage(playerid,-1,string);
- format(string, sizeof(string),"Motivo: %s", dini_Get(vfile,"BanMotivo"));
- SendClientMessage(playerid,-1,string);
- format(string, sizeof(string),"Data: %s", dini_Get(vfile,"Login"));
- SendClientMessage(playerid,-1,string);
- if(dini_Int(vfile,"TBan") == 1)
- {
- format(string, sizeof(string),"Banido Até:%d/%d/%d as %d:%d", dini_Int(vfile,"BanAteD"), dini_Int(vfile,"BanAteME"), dini_Int(vfile,"BanAteY"), dini_Int(vfile,"BanAteH"), dini_Int(vfile,"BanAteMI"));
- SendClientMessage(playerid,-1,string);
- new year, month,day;
- getdate(year, month, day);
- new h, m, s;
- gettime(h, m, s);
- if(year > dini_Int(vfile,"BanAteY"))
- {
- SendClientMessage(playerid,-1,"Seu tempo de banimento acabou, pode voltar a jogar!");
- dini_IntSet(vfile, "Banido", 0);
- dini_IntSet(vfile,"TBan", 0);
- return 1;
- }
- if(year == dini_Int(vfile,"BanAteY"))
- {
- if(month > dini_Int(vfile,"BanAteME"))
- {
- SendClientMessage(playerid,-1,"Seu tempo de banimento acabou, pode voltar a jogar!");
- dini_IntSet(vfile, "Banido", 0);
- dini_IntSet(vfile,"TBan", 0);
- return 1;
- }
- if(month == dini_Int(vfile,"BanAteME"))
- {
- if(day > dini_Int(vfile,"BanAteD"))
- {
- SendClientMessage(playerid,-1,"Seu tempo de banimento acabou, pode voltar a jogar!");
- dini_IntSet(vfile, "Banido", 0);
- dini_IntSet(vfile,"TBan", 0);
- return 1;
- }
- if(day == dini_Int(vfile,"BanAteD"))
- {
- if(h > dini_Int(vfile,"BanAteH"))
- {
- SendClientMessage(playerid,-1,"Seu tempo de banimento acabou, pode voltar a jogar!");
- dini_IntSet(vfile, "Banido", 0);
- dini_IntSet(vfile,"TBan", 0);
- return 1;
- }
- if(h == dini_Int(vfile,"BanAteH"))
- {
- if(m >= dini_Int(vfile,"BanAteMI"))
- {
- SendClientMessage(playerid,-1,"Seu tempo de banimento acabou, pode voltar a jogar!");
- dini_IntSet(vfile, "Banido", 0);
- dini_IntSet(vfile,"TBan", 0);
- return 1;
- }
- }
- }
- }
- }
- }
- SendClientMessage(playerid,Verde,"~> Log Ban <~");
- dini_Set(vfile,"Ip", Ip);
- SendDeathMessage(INVALID_PLAYER_ID, playerid, 0);
- Kick(playerid);
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- printf("%s [ID: %d] desconectou-se do servidor.",pName(playerid), playerid);
- //Desconectar();
- Desconectar(playerid);
- new
- string[128],
- name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,MAX_PLAYER_NAME);
- switch(reason)
- {
- case 0: format(string,sizeof string,"{00FF00}~> {FFFAFA}%s saiu do servidor. {00FF00}({FFFAFA}Crash{00FF00}/{FFFAFA}Conexão{00FF00})",name);
- case 1: format(string,sizeof string,"{00FF00}~> {FFFAFA}%s saiu do servidor. {00FF00}({FFFAFA}Vontade Própia{00FF00})",name);
- case 2: format(string,sizeof string,"{00FF00}~> {FFFAFA}%s saiu do servidor. {00FF00}({FFFAFA}Kickado{00FF00}/{FFFAFA}Banido{00FF00})",name);
- }
- SendClientMessageToAll(-1,string);
- pFase[playerid][Logado] = 0;
- LogadoBanco[playerid] = 0;
- new grana;
- grana = GetPlayerGranaEx(playerid);
- dini_IntSet(vfile, "Dinheiro", grana);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- LogarProf(playerid);
- TextDrawHideForPlayer(playerid, ImagemConnect);
- TextDrawHideForPlayer(playerid, BemVindo);
- if(Preso[playerid] == 1)
- {
- if(GetPlayerWantedLevel(playerid) == 1)
- {
- SetPlayerInterior(playerid, 6);
- Assalto[playerid] = 0;
- Preso[playerid] = 1;
- GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
- SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
- TempoPreso[playerid] = SetTimerEx("Liberar", 120000, false, "i", playerid);
- ResetPlayerWeapons(playerid);
- }
- else if(GetPlayerWantedLevel(playerid) == 2)
- {
- SetPlayerInterior(playerid, 6);
- Assalto[playerid] = 0;
- Preso[playerid] = 1;
- GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
- SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
- TempoPreso[playerid] = SetTimerEx("Liberar", 240000, false, "i", playerid);
- ResetPlayerWeapons(playerid);
- }
- else if(GetPlayerWantedLevel(playerid) == 3)
- {
- SetPlayerInterior(playerid, 6);
- Assalto[playerid] = 0;
- Preso[playerid] = 1;
- GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
- SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
- TempoPreso[playerid] = SetTimerEx("Liberar", 480000, false, "i", playerid);
- ResetPlayerWeapons(playerid);
- }
- else if(GetPlayerWantedLevel(playerid) == 4)
- {
- SetPlayerInterior(playerid, 6);
- Assalto[playerid] = 0;
- Preso[playerid] = 1;
- GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
- SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
- TempoPreso[playerid] = SetTimerEx("Liberar", 600000, false, "i", playerid);
- ResetPlayerWeapons(playerid);
- }
- else if(GetPlayerWantedLevel(playerid) == 5)
- {
- SetPlayerInterior(playerid, 6);
- Assalto[playerid] = 0;
- Preso[playerid] = 1;
- GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
- SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
- TempoPreso[playerid] = SetTimerEx("Liberar", 720000, false, "i", playerid);
- ResetPlayerWeapons(playerid);
- }
- else if(GetPlayerWantedLevel(playerid) == 6)
- {
- SetPlayerInterior(playerid, 6);
- Assalto[playerid] = 0;
- Preso[playerid] = 1;
- GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
- SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
- TempoPreso[playerid] = SetTimerEx("Liberar", 840000, false, "i", playerid);
- ResetPlayerWeapons(playerid);
- }
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendDeathMessage(killerid,playerid,reason);
- new aname[MAX_PLAYER_NAME];
- if(podedm == 0)
- {
- SendClientMessage(killerid, Amarelo, "* Você foi preso por fazer dm em local proibido!");
- SpawnPlayer(killerid);
- SetPlayerPos(killerid, 264.4181,77.3247,1001.0391);
- SetPlayerHealth(killerid, 99999);
- SetPlayerInterior(killerid, 6);
- ResetPlayerWeapons(killerid);
- dini_IntSet(aname, "Preso", 1);
- }
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- new sChat[256],
- sNome[MAX_PLAYER_NAME];
- if(pAdmin[playerid] > 1)
- {
- GetPlayerName(playerid, sNome, MAX_PLAYER_NAME);
- format(sChat, 128, "[Adm Lv : %d] - %s (%d) : %s", pAdmin[playerid], sNome, playerid, text);
- for(new i; i != GetMaxPlayers(); i++)
- SendClientMessage(i, -1, sChat);
- }
- if(!pAdmin[playerid])
- {
- GetPlayerName(playerid, sNome, MAX_PLAYER_NAME);
- format(sChat, 128, "%s (%d) : %s", sNome, playerid, text);
- for(new i; i != GetMaxPlayers(); i++)
- SendClientMessage(i, -1, sChat);
- }
- if(pAFK[playerid] == 1)
- {
- SendClientMessage(playerid, Vermelho, "* Saia do Modo AFK Primeiro! Use: /sairafk");
- return 0;
- }
- if(AcessoOn[playerid] == true)
- {
- new codigos = random(sizeof(Codigos));
- cudigos = Codigos[codigos];
- if(strfind(text, Codigos[codigos], true) == 0)
- {
- KillTimer(KillFirewall[playerid]);
- KillAcesso = SetTimerEx("AcessoBanco", 1000, 20, "i", playerid);
- KillTransferencia = SetTimerEx("LimiteGrana", 27000, false, "i", playerid);
- format(sChat, sizeof(sChat), "* %s conseguiu derrubar o firewall", pName(playerid));
- SendClientMessageToAll(0x7FFF00AA, sChat);
- Assalto[playerid] = 1;
- return 0;
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000FF, "(ERRO) Codigo Inválido!");
- return 0;
- }
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new string[128], IP[24];
- if(dialogid == REGISTRO)
- {
- if(!response)
- {
- SendClientMessage(playerid,-1,"{00BFFF}Voce foi kickado por nao registrar!.");
- Kick(playerid);
- }
- else {
- if(!strlen(inputtext))
- {
- format(StringLg, sizeof(StringLg), "{FFFAFA}Usuario: {FFD700}%s\n{FFFAFA}Conta: {FF0000}Não Registrada\n{FFFAFA}Digite uma Senha e Clique em Registrar", pName(playerid));
- ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", StringLg, "Registrar", "Sair");
- }
- dini_Create(vfile);
- format(vfile, sizeof(vfile), DIRETORIO, pName(playerid));
- dini_Set(vfile, "Senha", inputtext);
- GetPlayerIp(playerid, IP, sizeof(IP));
- dini_Set(vfile, "Login", pName(playerid));
- dini_Set(vfile, "IP", IP);
- dini_Set(vfile, "Level", "0");
- dini_Set(vfile, "ExpJogador", "0");
- dini_Set(vfile, "LevelAdmin", "0");
- dini_Set(vfile, "Dinheiro", "0");
- dini_Set(vfile, "Procurado", "0");
- dini_Set(vfile, "Preso", "0");
- dini_Set(vfile, "Skin", "1");
- dini_Set(vfile, "Gasolina", "20");
- dini_Set(vfile, "VipL", "0");
- dini_Set(vfile, "Avisos", "0");
- dini_Set(vfile, "TContaBancaria", "0");
- dini_Set(vfile, "HabTerrestre", "0");
- dini_Set(vfile, "Pais", "Nenhum");
- dini_Set(vfile, "HabAerea", "0");
- dini_Set(vfile, "HabNautica", "0");
- dini_Set(vfile, "Profissao", "0");
- dini_Set(vfile,"Porte", "0");
- GivePlayerGranaEx(playerid,500);
- ShowPlayerDialog(playerid, paislogin, DIALOG_STYLE_MSGBOX, "Registro", "Agora\tSelecione o Seu Pais", "Brasil", "Portugal");
- GameTextForPlayer(playerid, "~w~Registrado", 8000, 1);
- PlayerPlaySound(playerid, 1057, 0, 0, 0);
- pFase[playerid][Logado] = 1;
- return 1;
- }
- }
- if(dialogid == DIALOG_GAS)
- {
- if(!response)
- return SendClientMessage(playerid, 0xFFFFFFFF, "Você não colocou gasolina");
- new sGasolinaT = strval(inputtext),quantia = sGasolinaT*floatround(VALOR_LITRO);
- /* if(GetPlayerGranaEx(playerid) < quantia)
- return SendClientMessage(playerid, 0xFFFFFFFF, "Você não tem dinheiro para isto");*/
- if(quantia <= 0 || GetPlayerGranaEx(playerid) < VALOR_LITRO)
- return SendClientMessage(playerid, 0xFFFFFFFF, "Você não tem dinheiro para isto");
- if(sGasolinaT > 100 || sGasolinaT <= 0)
- return SendClientMessage(playerid, 0xFFFFFFFF, "Quantia Inválida");
- format(string,60, "* Você completou seu tanque com '[%d]' litros de combustível. Valor: [ %dR$ ]",sGasolinaT,quantia);
- SendClientMessage(playerid, Amarelo, string);
- dini_IntSet (vfile, "Gasolina", pGasolina[playerid] + sGasolinaT);
- GivePlayerGranaEx(playerid,-quantia);
- return 1;
- }
- if(dialogid == 4501)// Menu
- {
- if(response)
- {
- if(listitem == 0)
- {//Salvar posição
- if(IsPlayerInAnyVehicle(playerid))
- {
- new aname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
- new Float:carroX,Float:carroY,Float:carroZ,Float:carroA;
- new vid;
- vid = GetPlayerVehicleID(playerid);
- GetVehiclePos(vid, carroX, carroY, carroZ);
- GetVehicleZAngle(vid, carroA);
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- for(new carro = 0; carro < MAX_CARROS; carro++)
- {
- format(string, sizeof(string), "/Carros/carro%d.ini", carro);
- if(strcmp(dini_Get(string, "Dono"), pname, true) == 0)
- {
- dini_FloatSet(string, "CordX", Float:carroX);
- dini_FloatSet(string, "CordY", Float:carroY);
- dini_FloatSet(string, "CordZ", Float:carroZ);
- dini_FloatSet(string, "Angulo", Float:carroA);
- SendClientMessage(playerid, Verde, "Seu carro foi salvo na sua posição.");
- }
- }
- SendClientMessage(playerid, Verde, "* A posição do seu veiculo foi salva com sucesso.");
- }
- else {
- SendClientMessage(playerid, 0xff6633AA, "* Você precisa estar em seu veiculo para salvar a posição.");
- }
- }
- if(listitem == 1)
- {//Alterar cor 1
- format(string, sizeof(string), "Alterar Cor 1\n\nDigite o número da cor desejada e aperte \"Alterar\".\n\n ~ !");
- ShowPlayerDialog(playerid, 4502, DIALOG_STYLE_INPUT, "Meu Carro", string, "Alterar", "Cancelar");
- }
- if(listitem == 2)
- {//Alterar cor 2
- format(string, sizeof(string), "Alterar Cor 2\n\nDigite o número da cor desejada e aperte \"Alterar\".\n\n ~ !");
- ShowPlayerDialog(playerid, 4503, DIALOG_STYLE_INPUT, "Meu Carro", string, "Alterar", "Cancelar");
- }
- if(listitem == 3)
- {// Respawnar carro
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- for(new carro = 0; carro < MAX_CARROS; carro++) {
- format(string, sizeof(string), "/Carros/carro%d.ini", carro);
- if(strcmp(dini_Get(string, "Dono"), pname, true) == 0)
- {
- DestroyVehicle(dini_Int(string, "Id"));
- new carroid;
- //carroid = AddStaticVehicle(dini_Int(string, "Modelo"), dini_Float(string, "CordX"), dini_Float(string, "CordY"), dini_Float(string, "CordZ"), dini_Float(string, "Angulo"), dini_Int(string, "Cor1"), dini_Int(string, "Cor2"));
- dini_IntSet(string, "Id", carroid);
- SetVehicleNumberPlate(carroid = CreateVehicle(dini_Int(string,"Modelo"), dini_Float(string,"CordX"), dini_Float(string,"CordY"), dini_Float(string,"CordZ"), dini_Float(string,"Angulo"), dini_Int(string,"Cor1"), dini_Int(string,"Cor2"),false), dini_Get(string,"Placa"));
- }
- }
- SendClientMessage(playerid, Amarelo, "* Veiculo respawnado!");
- }
- if(listitem == 4)
- {//Alterar nome
- format(string, sizeof(string), "Alterar nome do veiculo\n\nDigite o novo nome do veiculo e clique em \"Alterar\"!");
- ShowPlayerDialog(playerid, 4504, DIALOG_STYLE_INPUT, "Nome do veiculo", string, "Alterar", "Cancelar");
- }
- }
- if(listitem == 5)//Alterar placa
- {
- format(string, sizeof(string),"Alterar Placa\n\nDigite sua nova placa e clique em Alterar\"Alterar\"");
- ShowPlayerDialog(playerid, 4505, DIALOG_STYLE_INPUT,"Meu Carro", string,"Alterar","Cancelar");
- }
- if(listitem == 6) // Ativar Dono2
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "/Carros/carro%d.ini", dini_Int(vfile,string));
- if(strcmp(dini_Get(string,"Dono"), pname, false) == 0) {
- if(dini_Int(string,"cDono2") == 0) {
- dini_IntSet(string,"cDono2", 1);
- SendClientMessage(playerid, Amarelo,"* Sistema de 2º dono ativado!");
- return 1;
- }
- else {
- dini_IntSet(string,"cDono2", 0);
- SendClientMessage(playerid, Amarelo,"* Sistema de 2º dono desativado!");
- return 1;
- }
- }
- return 1;
- }
- if(listitem == 7) // Definir 2º dono
- {
- format(string, sizeof(string),"Definir 2º dono\n\nDigite o nome do 2º dono e clique em \"Definir\".\n\n ~ TheLife!");
- ShowPlayerDialog(playerid, 4506, DIALOG_STYLE_INPUT,"Meu Carro", string,"Definir","Cancelar");
- }
- if(listitem == 8) // Alarme
- {
- format(string, sizeof(string), "/Carros/carro%d.ini", dini_Int(vfile,string));
- if(strcmp(dini_Get(string,"Dono"), pName(playerid), false) == 0)
- {
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(dini_Int(string,"Id"), mot, lu, alar, por, cap, porma, ob);
- if(dini_Int(string,"Alarme") == 0)
- {
- dini_IntSet(string,"Alarme", 1);
- SendClientMessage(playerid, Amarelo,"Alarme ativado!");
- return 1;
- }
- else {
- dini_IntSet(string,"Alarme", 0);
- SetVehicleParamsEx(dini_Int(string,"Id"), mot, lu, VEHICLE_PARAMS_OFF, por, cap, porma, ob);
- SendClientMessage(playerid, Amarelo,"Alarme desativado!");
- return 1;
- }
- }
- return 1;
- }
- if(listitem == 7)
- {// Vender carro
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- for(new carro = 0; carro < MAX_CARROS; carro++) {
- format(string, sizeof(string), "/Carros/carro%d.ini", carro);
- if(strcmp(dini_Get(string, "Dono"), pname, true) == 0) {
- dini_Set(string, "Dono", "Nenhum");
- dini_IntSet(string, "cDono", 0);
- GivePlayerGranaEx(playerid, dini_Int(string, "Preco"));
- }
- }
- }
- }
- if(dialogid == 4506)
- {
- new nomepl[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nomepl, sizeof(nomepl));
- if(response == 1)
- {
- new string2[256];
- new aname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, aname, sizeof(aname));
- if(strlen(inputtext) <= 24)
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- //format(string2,sizeof(string2),"CarroID%d",scar[playerid]);
- format(string, sizeof(string), "/Carros/carro%d.ini", dini_Int(vfile,string2));
- if(strcmp(dini_Get(string,"Dono"), aname, true) == 0) {
- if(dini_Exists(tfile(inputtext)))
- {
- dini_Set(string,"Dono2", inputtext);
- SetVehicleNumberPlate(dini_Int(string,"Id"), inputtext);
- format(string2,sizeof(string2),"O 2º dono do carro agora é %s",inputtext);
- SendClientMessage(playerid, 0x408080FF,string2);
- } else return SendClientMessage(playerid, Vermelho,"Este jogador não existe!");
- return 1;
- }
- }
- else {
- SendClientMessage(playerid, Vermelho,"O nome é de no máximo 24 caracteres");
- }
- }
- }
- if(dialogid == 4505)
- {
- new nomepl[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nomepl, sizeof(nomepl));
- if(response == 1)
- {
- new aname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, aname, sizeof(aname));
- if(strlen(inputtext) <= 8)
- {
- new string2[256];
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(vfile, sizeof(vfile), DIRETORIO, pname);
- format(string2,sizeof(string2),"CarroID%d",scar[playerid]);
- format(string2, sizeof(string2), "/Carros/carro%d.ini", dini_Int(vfile,string2));
- if(strcmp(dini_Get(string2,"Dono"), aname, true) == 0) {
- dini_Set(string2,"Placa", inputtext);
- SetVehicleNumberPlate(dini_Int(string2,"Id"), inputtext);
- SendClientMessage(playerid, 0x408080FF,"* Placa do carro alterada, para atualizar respawne o carro > Use: /meucarro <!");
- return 1;
- }
- }
- else {
- SendClientMessage(playerid, Vermelho,"Placa máxima de 8 caracteres");
- }
- }
- }
- if(dialogid == 4504)
- {
- new nomepl[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nomepl, sizeof(nomepl));
- if(response == 1) {
- new aname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, aname, sizeof(aname));
- for(new carro = 0; carro < MAX_CARROS; carro++) {
- format(string, sizeof(string), "/Carros/carro%d.ini", carro);
- if(strcmp(dini_Get(string, "Dono"), aname, true) == 0) {
- dini_Set(string, "Nome", inputtext);
- SendClientMessage(playerid, 0xC0C0C0AA, "* Nome do veiculo alterado com sucesso.");
- return 1;
- }
- }
- }
- }
- if(dialogid == 4502)
- {
- new nomepl[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nomepl, sizeof(nomepl));
- if(response == 1)
- {
- new aname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, aname, sizeof(aname));
- if(!IsNumeric(inputtext))
- {
- SendClientMessage(playerid, Vermelho, "* Valor inválido.");
- return 1;
- }
- else {
- for(new carro = 0; carro < MAX_CARROS; carro++) {
- format(string, sizeof(string), "/Carros/carro%d.ini", carro);
- if(strcmp(dini_Get(string, "Dono"), aname, true) == 0) {
- dini_IntSet(string, "Cor1", StrToInt(inputtext));
- ChangeVehicleColor(dini_Int(string, "Id"), dini_Int(string, "Cor1"), dini_Int(string, "Cor2"));
- }
- }
- }
- }
- }
- if(dialogid == 4503)
- {
- new nomepl[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nomepl, sizeof(nomepl));
- if(response == 1) {
- new aname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, aname, sizeof(aname));
- if(!IsNumeric(inputtext)) {
- SendClientMessage(playerid, Vermelho, "* Valor inválido.");
- return 1;
- }
- else {
- for(new carro = 0; carro < MAX_CARROS; carro++) {
- format(string, sizeof(string), "/Carros/carro%d.ini", carro);
- if(strcmp(dini_Get(string, "Dono"), aname, true) == 0) {
- dini_IntSet(string, "Cor2", StrToInt(inputtext));
- ChangeVehicleColor(dini_Int(string, "Id"), dini_Int(string, "Cor1"), dini_Int(string, "Cor2"));
- }
- }
- }
- }
- }
- if(dialogid == 9459)
- {
- if(response)
- {
- dini_Set(vfile, "Senha", inputtext);
- format(string, sizeof(string), "(INFO) %s sua senha foi alterada com sucesso!", pName(playerid));
- SendClientMessage(playerid, 0xCDCDB4AA, string);
- format(string, sizeof(string), "(INFO) Sua nova senha: %s", inputtext);
- SendClientMessage(playerid, 0xCDCDB4AA, string);
- }
- return 1;
- }
- if(dialogid == MenuBancoH)
- {
- //
- }
- if(dialogid == pMenuProf)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, pHonestas, DIALOG_STYLE_LIST, "Profissões - Honestas", "Vendedor de Sorvete - Level 0\n<- Voltar", "Selecionar", "Fechar");
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, pHonestas2, DIALOG_STYLE_LIST, "Profissões - Honestas 2", "Troll Face\nVoltar", "Selecionar", "Fechar");
- }
- if(listitem == 2)
- {
- ShowPlayerDialog(playerid, pCriminosas, DIALOG_STYLE_LIST, "Profissões - Criminosas", "Vendedor de Drogas - Level 20\nTraficante de Armas - Level 15\nVoltar", "Selecionar", "Fechar");
- }
- if(listitem == 3)
- {
- ShowPlayerDialog(playerid, pGoverno, DIALOG_STYLE_LIST, "Profissões - Governo", "Policia Militar - Level 40\nPolicia Civil - Level 50\nPolicia Federal - Level 70\nAdvogado - Level 30\nGuarda de Transito - Level 25\nVoltar", "Selecionar", "Fechar");
- }
- if(listitem == 4)
- {
- ShowPlayerDialog(playerid, pTransporte, DIALOG_STYLE_LIST, "Profissões - Transporte", "Caminhoneiro - Level 15\nMoto Taxista - Level 10\nTaxista - Level 10\nMaquinista - Level 5\nVoltar", "Selecionar", "Fechar");
- }
- if(listitem == 5)
- {
- ShowPlayerDialog(playerid, pMafia, DIALOG_STYLE_LIST, "Profissões - Mafia", "Hacker - Level 50\nVoltar", "Selecionar", "Fechar");
- }
- }
- }
- if(dialogid == pCriminosas)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(pLevel[playerid] >= 19)
- {
- Profissao[playerid] = VDrogas;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- if(listitem == 1)
- {
- if(pLevel[playerid] >= 19)
- {
- Profissao[playerid] = TrafArmas;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- }
- if(listitem == 2) // Voltar
- {
- ShowPlayerDialog(playerid,pMenuProf, DIALOG_STYLE_LIST, "Empregos", "{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {FFFAFA}2 {00FF00}]\n{00FF00}[ {FFFAFA}Carreira {FFD700}Criminosa {00FF00}]\n{00FF00}[ {FFD700}Governo {00FF00}]\n{00FF00}[ {FFD700}Transporte {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}da {FFFAFA}Mafia {00FF00}]", "Ok", "Fechar");
- }
- return 1;
- }
- }
- }
- if(dialogid == pMafia)
- {
- if(response)
- {
- if(listitem == 1)
- {
- if(pLevel[playerid] >= 49)
- {
- Profissao[playerid] = Hacker;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- }
- if(listitem == 0) // Voltar
- {
- ShowPlayerDialog(playerid,pMenuProf, DIALOG_STYLE_LIST, "Empregos", "{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {FFFAFA}2 {00FF00}]\n{00FF00}[ {FFFAFA}Carreira {FFD700}Criminosa {00FF00}]\n{00FF00}[ {FFD700}Governo {00FF00}]\n{00FF00}[ {FFD700}Transporte {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}da {FFFAFA}Mafia {00FF00}]", "Ok", "Fechar");
- }
- return 1;
- }
- }
- if(dialogid == pGoverno)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(pLevel[playerid] >= 39)
- {
- Profissao[playerid] = PolicialM;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- if(listitem == 1)
- {
- if(pLevel[playerid] >= 49)
- {
- Profissao[playerid] = PolicialC;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- }
- if(listitem == 2)
- {
- if(pLevel[playerid] >= 69)
- {
- Profissao[playerid] = PolicialF;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- }
- if(listitem == 3)
- {
- if(pLevel[playerid] >= 29)
- {
- Profissao[playerid] = Advogado;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- }
- if(listitem == 4)
- {
- if(pLevel[playerid] >= 24)
- {
- Profissao[playerid] = GuardaTransito;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- }
- if(listitem == 5) // Voltar
- {
- ShowPlayerDialog(playerid,pMenuProf, DIALOG_STYLE_LIST, "Empregos", "{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {FFFAFA}2 {00FF00}]\n{00FF00}[ {FFFAFA}Carreira {FFD700}Criminosa {00FF00}]\n{00FF00}[ {FFD700}Governo {00FF00}]\n{00FF00}[ {FFD700}Transporte {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}da {FFFAFA}Mafia {00FF00}]", "Ok", "Fechar");
- }
- return 1;
- }
- }
- }
- if(dialogid == pTransporte)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(pLevel[playerid] >= 14)
- {
- Profissao[playerid] = Caminhoneiro;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- if(listitem == 1)
- {
- if(pLevel[playerid] >= 9)
- {
- Profissao[playerid] = MotoTaxi;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- }
- if(listitem == 2)
- {
- if(pLevel[playerid] >= 9)
- {
- Profissao[playerid] = Taxista;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- }
- if(listitem == 3)
- {
- if(pLevel[playerid] >= 4)
- {
- Profissao[playerid] = Maquinista;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- }
- if(listitem == 4) // Voltar
- {
- ShowPlayerDialog(playerid,pMenuProf, DIALOG_STYLE_LIST, "Empregos", "{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {FFFAFA}2 {00FF00}]\n{00FF00}[ {FFFAFA}Carreira {FFD700}Criminosa {00FF00}]\n{00FF00}[ {FFD700}Governo {00FF00}]\n{00FF00}[ {FFD700}Transporte {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}da {FFFAFA}Mafia {00FF00}]", "Ok", "Fechar");
- }
- return 1;
- }
- }
- }
- if(dialogid == pHonestas)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(pLevel[playerid] >= 0)
- {
- Profissao[playerid] = VSorvete;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- if(listitem == 1)
- {
- if(pLevel[playerid] >= 0)
- {
- Profissao[playerid] = Paramedico;
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else {
- SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
- reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- if(listitem == 2) // Voltar
- {
- ShowPlayerDialog(playerid,pMenuProf, DIALOG_STYLE_LIST, "Empregos", "{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {FFFAFA}2 {00FF00}]\n{00FF00}[ {FFFAFA}Carreira {FFD700}Criminosa {00FF00}]\n{00FF00}[ {FFD700}Governo {00FF00}]\n{00FF00}[ {FFD700}Transporte {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}da {FFFAFA}Mafia {00FF00}]", "Ok", "Fechar");
- }
- return 1;
- }
- }
- }
- }
- if(dialogid == 1444)
- {
- new banco[128];
- format(banco, sizeof(banco), DBANCO, pName(playerid));
- if(response)
- {
- if(strlen(inputtext))
- {
- new confirmado[256];
- confirmado = dini_Get(banco, "SenhaBanco");
- if(strcmp(inputtext, confirmado, true) == 0)
- {
- SendClientMessage(playerid, -1, "(BANCO) Sua conta bancária foi carregada com sucesso!");
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- LogadoBanco[playerid] = 1;
- ShowPlayerDialog(playerid, 4242, DIALOG_STYLE_LIST,"Banco","~> {FFFFFF}[ {00FF00}Sacar {FFFFFF}]\n~> {FFFFFF}[ {00FF00}Depositar {FFFFFF}]\n~> {FFFFFF}[ {00FF00}Consultar Saldo {FFFFFF}]\n~> {FFFFFF}[ {00FF00}Alterar Senha da Conta {FFFFFF}]","Solicitar","Fechar");
- if(SenhaBanco[playerid] == true)
- {
- new str[128];
- format(str, sizeof(str), "Nome de usuário: %s\n\nInsira sua nova senha bancária:", pName(playerid));
- ShowPlayerDialog(playerid, 4343, DIALOG_STYLE_INPUT, "Conta", str, "Confirmar", "Cancelar");
- SenhaBanco[playerid] = false;
- }
- }
- else {
- format(string, sizeof(string), "Senha Incorreta!\n\nNome de usuário: %s\n\nInsira sua senha bancária:", pName(playerid));
- ShowPlayerDialog(playerid, 1444, DIALOG_STYLE_INPUT, "Conta Bancária", string, "Entrar", "Cancelar");
- SendClientMessage(playerid, Vermelho, "(BANCO) Senha Incorreta.");
- }
- }
- else {
- new str[128];
- format(str, sizeof(str), "Não deixe o campo em branco!\n\nNome de usuário: %s\n\nInsira sua senha:", pName(playerid));
- ShowPlayerDialog(playerid, 9997, DIALOG_STYLE_INPUT, "Conta Bancária", str, "Entrar", "Cancelar");
- }
- }
- }
- if(dialogid == 4343)
- {
- new banco[128];
- format(banco, sizeof(banco), DBANCO, pName(playerid));
- if(response)
- {
- dini_Set(banco, "SenhaBanco", inputtext);
- format(string, sizeof(string), "(BANCO) %s sua senha bancária foi alterada com sucesso!", pName(playerid));
- SendClientMessage(playerid, Verde, string);
- format(string, sizeof(string), "(BANCO) Sua nova senha bancária: %s", inputtext);
- SendClientMessage(playerid, Verde, string);
- }
- }
- if(dialogid == 1442)
- {
- new banco[128];
- format(banco, sizeof(banco), DBANCO, pName(playerid));
- if(response)
- {
- if(strlen(inputtext))
- {
- dini_Create(banco);
- dini_Set(banco, "SenhaBanco", inputtext);
- dini_IntSet(banco, "SaldoBancario", 500);
- GameTextForPlayer(playerid, "~w~Conta ~n~ Criada", 3000, 1);
- GivePlayerGranaEx(playerid, 500);
- SendClientMessage(playerid, -1, "(BANCO) Sua conta bancária foi criada com sucesso!");
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- LogadoBanco[playerid] = 1;
- }
- else {
- new str[128];
- format(str, sizeof(str), "Não deixe o campo em branco!\n\nNome de usuário: %s\n\nInsira uma senha:", pName(playerid));
- ShowPlayerDialog(playerid, 1444, DIALOG_STYLE_INPUT, "Conta Bancária", str, "Criar", "Cancelar");
- }
- }
- }
- if(dialogid == 4242) // Bank
- {
- new banco[128];
- format(banco, sizeof(banco), DBANCO, pName(playerid));
- new saldo = dini_Int(banco, "SaldoBancario");
- if(response)
- {
- if(listitem == 0)
- { // Sacar
- format(string, sizeof(string), "* Digite a quantia a sacar.");
- SendClientMessage(playerid, Verde, string);
- format(StringLg, sizeof(StringLg), "Nome do Usuário: %s\n\nDigite a quantia que deseja sacar e aperte \"Sacar\".\n\n ~ Brasil Games", pName(playerid));
- ShowPlayerDialog(playerid, 100, DIALOG_STYLE_INPUT, "Banco", StringLg, "Sacar", "Sair");
- }
- if(listitem == 1)
- {// Depositar
- format(string, sizeof(string), "* Digite a quantia a depositar.");
- SendClientMessage(playerid, Verde, string);
- format(StringLg, sizeof(StringLg), "Nome do Usuário: %s\n\nDigite a quantia que deseja depositar e aperte \"Depositar\".\n\n ~ Brasil Games", pName(playerid));
- ShowPlayerDialog(playerid, 200, DIALOG_STYLE_INPUT, "Banco", StringLg, "Depositar", "Sair");
- }
- if(listitem == 2)
- {// Ver Saldo
- format(string, sizeof(string), "\tExtrato Bancário\n\n{FFFAFA}\tNome do Usuário: %s\n\tSaldo Atual: %dR$", pName(playerid), saldo);
- ShowPlayerDialog(playerid, 200, DIALOG_STYLE_MSGBOX, " Saldo",string,"Fechar","");
- }
- if(listitem == 3)
- {// Alterar Senha
- new str[128];
- format(str, sizeof(str), "** Banco Brasil Games **\n\nInsira sua senha antiga:", pName(playerid));
- ShowPlayerDialog(playerid, 1444, DIALOG_STYLE_INPUT, "Senha Conta Bancária", str, "Confirmar", "Cancelar");
- SenhaBanco[playerid] = true;
- }
- }
- }
- if(dialogid == LOGIN)
- {
- if(!response)
- {
- SendClientMessage(playerid,-1,"{00BFFF}Voce foi kickado por nao Logar.");
- Kick(playerid);
- }
- else {
- if(response == 1)
- {
- format(vfile, sizeof(vfile), DIRETORIO, pName(playerid));
- new senhaacc[256];
- senhaacc = dini_Get(vfile, "Senha");
- if(strcmp(inputtext, senhaacc, true) == 0)
- {
- pAdmin[playerid] = dini_Int(vfile, "LevelAdmin");
- pGasolina[playerid] = dini_Int(vfile, "Gasolina");
- GivePlayerGranaEx(playerid, dini_Int(vfile, "Dinheiro"));
- SetPlayerWantedLevel(playerid, dini_Int(vfile, "Procurado"));
- Experiencia[playerid] = dini_Int(vfile, "Experiencia");
- SetPlayerSkin(playerid, dini_Int(vfile, "Skin"));
- Preso[playerid] = dini_Int(vfile, "Preso");
- pLevel[playerid] = dini_Int(vfile, "Level");
- Profissao[playerid] = dini_Int(vfile, "Profissao");
- SetSpawnInfo(playerid, 0, 23, 2491.4192, -1958.0892, 13.58, 13.75, 0, 0, 0, 0, 0, 0 );
- pFase[playerid][Logado] = 1;
- GivePlayerGranaEx(playerid, dini_Int(vfile, "Dinheiro"));
- SpawnPlayer(playerid);
- GameTextForPlayer(playerid, "~g~Logado ~n~ Com Sucesso", 8000, 1);
- PlayerPlaySound(playerid, 1057, 0, 0, 0);
- }
- else {
- SendClientMessage(playerid, Vermelho ,"(x) Senha Incorreta");
- format(StringLg, sizeof(StringLg), "Senha Incorreta, %s\n Tente Digitar sua Senha Novamente!", pName(playerid));
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", StringLg, "Logar", "Sair");
- }
- }
- else {
- format(StringLg, sizeof(StringLg), "{FFFAFA}Usuario: {FFD700}%s\n{FFFAFA}Conta: {00FF00}Registrada\n{FFFAFA}Digite sua Senha e Clique em Logar", pName(playerid));
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", StringLg, "Logar", "Sair");
- return 1;
- }
- }
- }
- if(dialogid == paislogin)
- {
- if(response == 1)
- {// BR
- SetSpawnInfo(playerid, 0, 30, 2491.4192, -1958.0892, 13.58, 13.75, 0, 0, 0, 0, 0, 0 );
- SetPlayerSkin(playerid, 30);
- dini_IntSet(vfile, "Skin", 30);
- pFase[playerid][pBrasil] = 1;
- dini_Set(vfile,"Pais", "Brasil");
- SpawnPlayer(playerid);
- }// PT
- else {
- SetSpawnInfo(playerid, 0, 50, 2491.4192, -1958.0892, 13.58, 13.75, 0, 0, 0, 0, 0, 0 );
- SetPlayerSkin(playerid, 50);
- dini_IntSet(vfile, "Skin", 50);
- dini_Set(vfile,"Pais", "Portugal");
- pFase[playerid][pPortugal] = 1;
- SpawnPlayer(playerid);
- }
- return 1;
- }
- if(dialogid == SPAWNJ)
- {
- if(!response)
- {
- SendClientMessage(playerid,-1,"{00BFFF}Voce foi kickado por nao registrar/logar.");
- Kick(playerid);
- }
- else {
- if(response == 1)
- {
- format(vfile, sizeof(vfile), DIRETORIO, pName(playerid));
- if(!dini_Exists(vfile))
- {
- format(StringLg, sizeof(StringLg), "{FFFAFA}Usuario: {FFD700}%s\n{FFFAFA}Conta: {FF0000}Não Registrada\n{FFFAFA}Digite uma Senha e Clique em Registrar", pName(playerid));
- ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", StringLg, "Registrar", "Sair");
- }
- if(dini_Exists(vfile))
- {
- format(StringLg, sizeof(StringLg), "{FFFAFA}Usuario: {FFD700}%s\n{FFFAFA}Conta: {00FF00}Registrada\n{FFFAFA}Digite sua Senha e Clique em Logar", pName(playerid));
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", StringLg, "Logar", "Sair");
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == EntrarPref)
- {
- SetPlayerInterior(playerid, 3);
- GameTextForPlayer(playerid,"~g~Prefeitura", 3000, 1);
- SetPlayerPos(playerid, 387.3434, 173.8979, 1008.3828);
- }
- if(pickupid == SaidaPref)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1480.9331, -1768.5493, 18.7958);
- }
- return 1;
- }
- public ChecarPing(playerid)
- {
- if(GetPlayerPing(playerid) > 1000) Kick(playerid);
- return 1;
- }
- public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
- {
- if(pAdmin[playerid] < 2 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"");
- SetPlayerPosFindZ(playerid, fX, fY, fZ);
- return 1;
- }
- public PostosG()
- for (new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerToPoint(7.0, i, 2221.3298,-1108.0605,26.2748) || PlayerToPoint(7.0, i, 2159.1794,-1004.8632,62.7888) || PlayerToPoint(7.0, i, 2326.2520,-1079.5879,50.0407) || PlayerToPoint(7.0, i, 2058.4858,-979.0306,46.2862)) {
- AreaPosto[i] = 1;
- GameTextForPlayer(i,"~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~w~Posto ~n~ ~b~/abastecer",3000,4);
- }
- else {
- if(AreaPosto[i] == 1)
- {
- AreaPosto[i] = 0;
- }
- //Posto LV \/
- if (PlayerToPoint(7.0, i, 2638.9553,1107.1788,10.8203) || PlayerToPoint(7.0, i, 1595.6233,2199.6162,10.8203) || PlayerToPoint(7.0, i, 1940.8671,-1773.2283,13.3906) || PlayerToPoint(5.0, i, -2243.8435,-2560.5598,31.9219)) {
- GameTextForPlayer(i,"~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~w~Posto ~n~ ~b~/abastecer",3000,4);
- AreaPosto[i] = 1;
- }
- else {
- if(AreaPosto[i] == 1) {
- AreaPosto[i] = 0;
- }
- //Posto LS/SF \/
- if (PlayerToPoint(7.0, i, 1382.3647,459.0785,20.3452) || PlayerToPoint(8.0, i, -1675.4781,413.1594,7.1797) || PlayerToPoint(7.0, i, 655.5922,-565.3943,16.3359) || PlayerToPoint(7.0, i, -1606.3616,-2713.5872,48.5335)) {
- GameTextForPlayer(i,"~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~w~Posto ~n~ ~b~/abastecer",3000,4);
- AreaPosto[i] = 1;
- }
- else {
- if(AreaPosto[i] == 1) {
- AreaPosto[i] = 0;
- }
- //Posto acima FC \/
- if(IsPlayerInPlace(i,576.3771, 1662.789, 619.3304, 1709.206) || PlayerToPoint(7.0, i, 1004.1403,-937.8801,42.1797) || PlayerToPoint(7.0, i, 2202.1230,2476.8582,10.8203) || PlayerToPoint(6.0, i, 417.2369,-1912.7708,1.5641) || PlayerToPoint(6.0, i, 70.3983,1218.9958,18.8117)) {
- GameTextForPlayer(i,"~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~w~Posto ~n~ ~b~/abastecer",3000,4);
- AreaPosto[i] = 1;
- }
- else {
- if(AreaPosto[i] == 1)
- {
- AreaPosto[i] = 0;
- }
- }
- }
- }
- }
- }
- }
- public OnVehicleMod(playerid,vehicleid,componentid)
- {
- printf("Veiculo %d > Estava com o ID: %d > De Nome: %s > Usando o Componente No seu Carro de ID: %d",vehicleid,pName(playerid),playerid,componentid);
- if(GetPlayerInterior(playerid) == 0)
- {
- BanEx(playerid, "Tuning Hack - Mod S0beit"); // Ant-Tunning Hack
- //Testado e Aprovando :D
- }
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- SetPlayerScore(playerid, pLevel[playerid]);
- return 1;
- }
- public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
- {
- new Float: fVehicle[3];
- GetVehiclePos(vehicleid, fVehicle[0], fVehicle[1], fVehicle[2]);
- if(!IsPlayerInRangeOfPoint(playerid, 10, fVehicle[0], fVehicle[1], fVehicle[2]))
- {
- return;
- }
- }
- public LogarProf(playerid)
- {
- if(Profissao[playerid] == Desempregado)
- {
- SetPlayerColor(playerid, -1);
- }
- else if(Profissao[playerid] == Caminhoneiro)
- {
- SetPlayerColor(playerid, 0x4B687EF6);
- GivePlayerWeapon(playerid, 7 , 1);
- SetPlayerSkin(playerid, 8);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- else if(Profissao[playerid] == MotoTaxi)
- {
- SetPlayerColor(playerid, 0xCD853FAA);
- GivePlayerWeapon(playerid, 1 , 1);
- SetPlayerSkin(playerid, 16);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- else if(Profissao[playerid] == Taxista)
- {
- SetPlayerColor(playerid, 0x6F4E8DAA);
- GivePlayerWeapon(playerid, 5 , 1);
- SetPlayerSkin(playerid, 61);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- else if(Profissao[playerid] == PolicialM)
- {
- SetPlayerColor(playerid, 0x843E65AA);
- GivePlayerWeapon(playerid,24,500);
- GivePlayerWeapon(playerid,31,600);
- GivePlayerWeapon(playerid,29,700);
- GivePlayerWeapon(playerid,17,400);
- SetPlayerSkin(playerid, 281);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- else if(Profissao[playerid] == PolicialC)
- {
- SetPlayerColor(playerid, 0x007C49AA);
- GivePlayerWeapon(playerid,24,900);
- GivePlayerWeapon(playerid,31,800);
- GivePlayerWeapon(playerid,29,600);
- GivePlayerWeapon(playerid,17,400);
- SetPlayerSkin(playerid, 280);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- else if(Profissao[playerid] == PolicialF)
- {
- SetPlayerColor(playerid, 0x004E00AA);
- GivePlayerWeapon(playerid,24,600);
- GivePlayerWeapon(playerid,31,300);
- GivePlayerWeapon(playerid,29,300);
- GivePlayerWeapon(playerid,17,200);
- SetPlayerSkin(playerid, 283);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- else if(Profissao[playerid] == VDrogas)
- {
- SetPlayerColor(playerid, 0x004E00AA);
- GivePlayerWeapon(playerid, 23, 400);
- GivePlayerWeapon(playerid, 25, 200);
- SetPlayerSkin(playerid, 273);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- else if(Profissao[playerid] == TrafArmas)
- {
- SetPlayerColor(playerid, 0x485807AA);
- GivePlayerWeapon(playerid, 28, 400);
- GivePlayerWeapon(playerid, 30, 300);
- SetPlayerSkin(playerid, 293);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- else if(Profissao[playerid] == GuardaTransito)
- {
- SetPlayerColor(playerid, 0xAA4B27AA);
- GivePlayerWeapon(playerid,3,1);
- GivePlayerWeapon(playerid,23,200);
- SetPlayerSkin(playerid, 284);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- else if(Profissao[playerid] == Advogado)
- {
- SetPlayerColor(playerid, 0x8C00F6AA);
- GivePlayerWeapon(playerid,46,0);
- SetPlayerSkin(playerid, 59);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- else if(Profissao[playerid] == VSorvete)
- {
- SetPlayerColor(playerid, Verde);
- GivePlayerWeapon(playerid,5,0);
- SetPlayerSkin(playerid, 229);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- else if(Profissao[playerid] == Paramedico)
- {
- SetPlayerColor(playerid, 0x2641FEAA);
- SetPlayerSkin(playerid, 275);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- else if(Profissao[playerid] == Hacker)
- {
- SetPlayerColor(playerid, 0xEEB4B4AA);
- SetPlayerSkin(playerid, 123);
- dini_IntSet(vfile, "Skin", GetPlayerSkin(playerid));
- }
- return 1;
- }
- /*public GanharExp(playerid)
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- dini_IntSet(vfile, "TempoExp", dini_Int(vfile, "TempoExp")+1);
- static sStr[128];
- if(dini_Int(vfile, "TempoExp") >= 1)
- {
- dini_IntSet(vfile, "ExpJogador", dini_Int(vfile, "ExpJogador")+1);
- dini_IntSet(vfile, "TempoExp",0);
- GameTextForPlayer(i,"~g~+1 Exp", 3000, 1);
- format(sStr, 64,"[ EXP ] %s Voce ganhou +1 Exp Formando : %d/5 ",pName(playerid),dini_Int(vfile, "ExpJogador"));
- SendClientMessage(i, 0x75EA00AA, sStr);
- }
- if(dini_Int(vfile, "ExpJogador") >= 5)
- {
- format(sStr, 64,"[ Level Up ] Você Passou de Level. -> Level Atual: %d ",dini_Int(vfile, "Level"));
- SendClientMessage(i, 0x75EA00AA, sStr);
- GameTextForPlayer(i,"~g~Level ~n~ ~y~UP", 3000, 1);
- PlayerPlaySound(i, 1057, 0, 0, 0);
- dini_IntSet(vfile, "Level", dini_Int(vfile, "Level")+1);
- dini_IntSet(vfile, "ExpJogador",0);
- }
- }
- }
- return 1;
- }*/
- public TempoExpMinuto()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(TempoLevelMinuto[i] == 0)
- {
- TempoLevelMinuto[i] = 10;
- }
- if(TempoLevelMinuto[i] == 1)
- {
- TempoLevelMinuto[i] = 10;
- }
- else
- {
- TempoLevelMinuto[i]--;
- }
- }
- }
- return 1;
- }
- public Firewall(playerid)
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- FirewallOn[i] = 1;
- KillTimer(KillFirewall[i]);
- SendClientMessage(i, 0xCD0000AA, "* O Firewall do Banco Está desligado, Cuidado com os Hackers! Protejam suas Contas!");
- }
- }
- RoubarBanco[playerid] = 0;
- SendClientMessage(playerid, 0xCD0000AA, "* Você demorou demais e o firewall foi re-ativado!");
- KillFirewallOn = SetTimer("FirewallLigado", 60000 * 30, false);
- AcessoOn[playerid] = false;
- return 1;
- }
- public FirewallLigado()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- KillTimer(KillFirewallOn);
- KillTimer(KillFirewallOn2);
- KillTimer(KillFirewallOn3);
- FirewallOn[i] = 0;
- return 1;
- }
- }
- return 1;
- }
- public LimiteGrana(playerid)
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- FirewallOn[i] = 1;
- }
- }
- KillTimer(KillAcesso);
- KillTimer(KillTransferencia);
- RoubarBanco[playerid] = 0;
- SendClientMessage(playerid, 0xCD0000AA, "* O Firewall do Banco Foi Ativado Novamente!");
- AcessoOn[playerid] = false;
- KillFirewallOn2 = SetTimer("FirewallLigado", 60000 * 30, false);
- return 1;
- }
- public CriarVeiculo2(m,Float:x,Float:y,Float:z,Float:r,c,d)
- {
- new string[256];
- format(string, sizeof(string), "/Carros/carro%d.ini", proximocarro);
- new carroid;
- carroid = AddStaticVehicle(m, x, y, z, r, c, d);
- dini_IntSet(string, "Id", carroid);
- proximocarro++;
- return 1;
- }
- public AcessoBanco(playerid)
- {
- if(PlayerToPoint(1.0, playerid, 823.0374, 2.9839, 1004.1797))
- {
- GivePlayerGranaEx(playerid, 75);
- AcessoOn[playerid] = false;
- SendClientMessage(playerid, 0x00B2EEAA, "* Transferindo dinheiro!");
- SetPlayerWantedLevel(playerid, 3);
- return 1;
- }
- else
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- FirewallOn[i] = 1;
- }
- }
- KillTimer(KillAcesso);
- KillTimer(KillTransferencia);
- SendClientMessage(playerid, 0xFF0000AA, "* Porta do Firewall desligada!!");
- RoubarBanco[playerid] = 0;
- KillFirewallOn3 = SetTimer("FirewallLigado", 60000 * 30, false);
- AcessoOn[playerid] = false;
- return 1;
- }
- }
- public GanharExp()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- new string[128];
- format(vfile, sizeof(vfile), DIRETORIO, pName(i));
- if(IsPlayerConnected(i))
- {
- if(pFase[i][Logado] == 1)
- {
- if(Experiencia[i] >= 5)
- {
- pLevel[i]++;
- Experiencia[i] = 0;
- TempoLevelMinuto[i] = 10;
- format(string, sizeof(string), "[ Level Up ] Você acaba de Ganhar +1 level! Level Atual: %d", pLevel[i]);
- SendClientMessage(i, 0x00FF00AA, string);
- PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
- GameTextForPlayer(i,"~g~Level ~n~ ~y~UP", 3000, 1);
- dini_IntSet(vfile, "ExpJogador", Experiencia[i]);
- dini_IntSet(vfile, "Level", pLevel[i]);
- }
- else
- {
- Experiencia[i]++;
- TempoLevelMinuto[i] = 10;
- format(string, sizeof(string), "[ Exp ] Você acaba de Ganhar + 1 Ponto de Experiencia (%d/5)", Experiencia[i]);
- SendClientMessage(i, 0x00FF00AA, string);
- PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
- dini_IntSet(vfile, "ExpJogador", Experiencia[i]);
- }
- }
- }
- }
- return 1;
- }
- public AtualizarChatBubble()
- {
- for(new x=0; x < MAX_PLAYERS; x++)
- {
- if(pAdmin[x] > 3)
- {
- SetPlayerChatBubble(x, "Administrador", 0x0080C0AA, 100.0, 10000);
- }
- }
- }
- public ReprovarC(playerid)
- {
- KillTimer(reprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Reprovado ]==============");
- SendClientMessage(playerid, -1, "* O Seu Curriculo foi analizado e reprovado!");
- SendClientMessage(playerid, -1, "* Para melhorar Seu Curriculo, Você terá que passar de level!");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Reprovado ]==============");
- return 1;
- }
- public CheckCurriculo(playerid)
- {
- format(vfile, sizeof(vfile), DIRETORIO, pName(playerid));
- if(Profissao[playerid] == Caminhoneiro)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é Caminhoneiro!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else if(Profissao[playerid] == MotoTaxi)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Moto Taxista!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid,1);
- }
- else if(Profissao[playerid] == Taxista)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Taxista!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid,1);
- }
- else if(Profissao[playerid] == Maquinista)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Maquinista!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid,1);
- }
- else if(Profissao[playerid] == PolicialM)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Policial Militar!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else if(Profissao[playerid] == PolicialC)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Policial Civil!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else if(Profissao[playerid] == PolicialF)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Policial Federal!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else if(Profissao[playerid] == VDrogas)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Vendedor de Drogas!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else if(Profissao[playerid] == TrafArmas)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Traficante de Armas!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else if(Profissao[playerid] == GuardaTransito)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Guarda de Transito!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else if(Profissao[playerid] == Advogado)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Advogado!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else if(Profissao[playerid] == VSorvete)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Vendedor de Sorvete!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else if(Profissao[playerid] == Paramedico)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Paramedico!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- else if(Profissao[playerid] == Hacker)
- {
- KillTimer(aprovado[playerid]);
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
- SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Hacker!");
- SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
- SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
- LogarProf(playerid);
- dini_IntSet(vfile, "Profissao", Profissao[playerid]);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- TogglePlayerControllable(playerid, 1);
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (newkeys == KEY_SECONDARY_ATTACK && incar[playerid] == 1)
- {
- TogglePlayerControllable(playerid, 1);
- RemovePlayerFromVehicle(playerid);
- incar[playerid] = 0;
- }
- return 1;
- }
- forward Combustivel();
- public Combustivel()
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- new nomepl[MAX_PLAYER_NAME];
- GetPlayerName(i, nomepl, sizeof(nomepl));
- format(vfile, sizeof(vfile), DIRETORIO, nomepl);
- new vid;
- vid = GetPlayerVehicleID(i);
- new modelo;
- modelo = GetVehicleModel(vid);
- if(!(modelo == 509 || modelo == 510 || modelo == 481))
- {
- new estado;
- estado = GetPlayerVehicleSeat(i);
- GetPlayerState(i);
- if(IsPlayerInAnyVehicle(i) == 1)
- {
- if(estado == 0)
- {
- dini_IntSet(vfile, "Gasolina", dini_Int(vfile, "Gasolina")-1);
- }
- if(dini_Int(vfile, "Gasolina") <= 0) {
- SendClientMessage(i, Vermelho, "* Seu combustivel acabou, vá até o posto mais próximo abastecer...");
- RemovePlayerFromVehicle(i);
- }
- }
- }
- }
- }
- /*stock GivePlayerGranaEx(playerid, quantia)
- {
- ResetPlayerMoney(playerid);
- GranaEx[playerid] += quantia;
- GivePlayerGranaEx(playerid, GranaEx[playerid]);
- return 1;
- }
- stock ResetPlayerGranaEx(playerid)
- {
- ResetPlayerMoney(playerid);
- GranaEx[playerid] = 0;
- return 1;
- }
- stock GetPlayerGranaEx(playerid)
- {
- return GranaEx[playerid];
- }
- */
- stock GivePlayerGranaEx(playerid, quant)
- {
- GivePlayerMoney(playerid, GranaEx[playerid] += quant);
- //return GranaEx[playerid] += quant;
- return 1;
- }
- stock GetPlayerGranaEx(playerid)
- return GranaEx[playerid];
- stock ResetPlayerGranaEx(playerid)
- return GranaEx[playerid] = 0;
- stock tfile(name[])
- {
- format(vfile, sizeof(vfile), DIRETORIO, name);
- return vfile;
- }
- public AtualizarGrana()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- ResetPlayerGranaEx(i);
- GivePlayerGranaEx(i, GetPlayerGranaEx(i));
- }
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new string[256];
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(pGasolina[playerid] == 0)
- {
- SendClientMessage(playerid, Vermelho, "* Seu Combustivel Acabou!");
- RemovePlayerFromVehicle(playerid);
- TogglePlayerControllable(playerid, 1);
- }
- }
- if(newstate == PLAYER_STATE_DRIVER)
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- for(new carro = 0; carro < MAX_CARROS; carro++)
- {
- new vid;
- vid = GetPlayerVehicleID(playerid);
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(vid, mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(vid, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
- format(string, sizeof(string), "/Carros/carro%d.ini", carro);
- if(dini_Exists(string))
- {
- if(vid == dini_Int(string, "Id"))
- {
- if(dini_Int(string, "cDono") == 1 || dini_Int(string,"cDono2") == 1)
- {
- //if(strcmp(dini_Get(string, "Dono"), pname, true) == 0) {
- if(strcmp(dini_Get(string,"Dono"), pname, true) == 0 || strcmp(dini_Get(string,"Dono2"), pname, true) == 0)
- {
- format(string, sizeof(string), "* %s, bem-vindo ao seu veiculo '%s'", dini_Get(string, "Dono"), dini_Get(string, "Nome"));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- } else if(dini_Int(string,"cDono2") == 1 && dini_Int(string,"cDono") == 1)
- {
- format(string, sizeof(string),"Você é o segundo dono do carro (%s) de %s, seja bem vindo !", dini_Get(string,"Nome"),dini_Get(string,"Dono"));
- SendClientMessage(playerid, 0xC0C0C0AA, string);
- }
- else {
- if(dini_Int(string,"Alarme") == 0)
- {
- GetVehicleParamsEx(vid, mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(vid, mot, lu, VEHICLE_PARAMS_ON, por, cap, porma, ob);
- format(string, sizeof(string), "* Este veiculo : '%s' é de '%s' portanto ele deixou o alarme desativado.", dini_Get(string, "Nome"), dini_Get(string, "Dono"));
- SendClientMessage(playerid, 0xff6633AA, string);
- if(dini_Int(string,"Alarme") == 1)
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new tname[MAX_PLAYER_NAME];
- GetPlayerName(i, tname, sizeof(tname));
- if(strcmp(dini_Get(string, "Dono"), tname, true) == 0 && GetPlayerVehicleID(playerid) == dini_Int(string, "Id")) {
- format(string, sizeof(string), "* %s (%d) Tentou Roubar seu veiculo!", pname, playerid);
- SendClientMessage(i, 0xff6633AA, string);
- }
- }
- }
- }
- }
- RemovePlayerFromVehicle(playerid);
- }
- }
- else {
- format(string, sizeof(string), "[ A VENDA ] Este veiculo está a venda para compra-lo use: /comprarcarro.", dini_Int(string, "Preco"));
- SendClientMessage(playerid, -1, string);
- SendClientMessage(playerid, -1, "* Para sair aperte 'F' ou ' ENTER '");
- incar[playerid] = 1;
- TogglePlayerControllable(playerid, 0);
- }
- }
- }
- }
- }
- }
- public Liberar(playerid)
- {
- SetPlayerInterior(playerid, 0);
- SpawnPlayer(playerid);
- SetPlayerWantedLevel(playerid, 0);
- Preso[playerid] = 0;
- SendClientMessage(playerid, 0xA9C4E4AA, "(CADEIA) Você foi solto automáticamente por cumprir a sua pena na cadeia!");
- KillTimer(TempoPreso[playerid]);
- return 1;
- }
- public PayDay()
- {
- new str[128],banco[128], aname[MAX_PLAYER_NAME];
- for(new i = 0; i<MAX_PLAYERS; i++)
- {
- format(banco, sizeof(banco), DBANCO, aname);
- //if(!dini_Exists(banco))
- //{
- if(dini_Int(vfile, "TContaBancaria") == 0)
- {
- SendClientMessage(i, Vermelho, "* Você não tem uma conta bancária, e assim não receberá seu salário.");
- SendClientMessage(i, Vermelho, "* Para abrir uma conta bancária procure um banco mais próximo de você.");
- return 1;
- }
- if(dini_Int(vfile, "TContaBancaria") == 1)
- {
- format(str, sizeof(str), "* Você recebeu seu salário.");
- SendClientMessage(i, 0xCAFF95AA, str);
- PlayerPlaySound(i, 1057, 0, 0, 0);
- }
- if(Profissao[i] == Desempregado)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+SeguroDesemprego);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você Recebeu o Seguro-Desemprego e Ganhou : %d", SeguroDesemprego);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == Caminhoneiro)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_Caminhao);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Caminhoneiro e Ganhou: %d", Salario_Caminhao);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == Taxista)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_Taxi);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Taxista e Ganhou: %d", Salario_Taxi);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == MotoTaxi)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_Maquinista);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Maquinista e Ganhou: %d", Salario_Maquinista);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == PolicialM)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_PolicialM);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Policial Militar e Ganhou: %d", Salario_PolicialM);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == PolicialC)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_PolicialC);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Policial Civil e Ganhou: %d", Salario_PolicialC);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == PolicialF)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_PolicialF);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Policial Federal e Ganhou: %d", Salario_PolicialF);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == VDrogas)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_VDrogas);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Vendedor de Dorgas e Ganhou: %d", Salario_VDrogas);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == TrafArmas)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_TrafArmas);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Traficante de Armas e Ganhou: %d", Salario_TrafArmas);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == GuardaTransito)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_GuardaTr);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Guarda de Transito e Ganhou: %d", Salario_GuardaTr);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == Advogado)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_Advogado);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Advogado e Ganhou: %d", Salario_Advogado);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == VSorvete)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_VSorvete);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Vendedor de Sorvete e Ganhou: %d", Salario_VSorvete);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == Paramedico)
- {
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_Paramedico);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Paramedico e Ganhou: %d", Salario_Paramedico);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- else if(Profissao[i] == Hacker)
- dini_IntSet(banco, "SaldoBancario", dini_Int(banco, "SaldoBancario")+Salario_Hacker);
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- format(str,128,"Você trabalha como Hacker e Ganhou: %d", Salario_Hacker);
- SendClientMessage(i, -1, str);
- SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
- SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
- }
- return 1;
- }
- public Avisado(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(Aviso[playerid] == 1)
- {
- Aviso[playerid]= 0;
- }
- }
- }
- forward TextoGaso();
- public TextoGaso()
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerInAnyVehicle(i))
- {
- new string3[256];
- format(string3, sizeof(string3), " ~b~%d ~w~Litros",pGasolina[i]);
- TextDrawSetString(TGasosa[i], string3);
- }
- else {
- TextDrawHideForPlayer(i, TGasosa[i]);
- }
- }
- }
- }
- forward TextoGrana();
- public TextoGrana()
- {
- new string[256];
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- format(string, sizeof(string), "~g~$~w~000000000", GetPlayerGranaEx(i));
- TextDrawSetString(gText3[i], string);
- TextDrawShowForPlayer(i, gText3[i]);
- TextDrawHideForPlayer(i, gText3[i]);
- }
- }
- return 1;
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- if(Mutecmd[playerid] == 1)
- {
- SendClientMessage(playerid, 0xFF0000AA, "* Você está bloqueado de usar Comandos. Aguarde..");
- return 1;
- }
- if(Aviso[playerid] == 1)
- {
- SendClientMessage(playerid, 0xFF0000AA, "* Você foi bloqueado de usar comandos. Motivo: Flood");
- Mutecmd[playerid] = 1;
- Aviso[playerid] = 0;
- return 0;
- }
- if(!success)
- {
- new strx[64];
- format(strx, 46, "SERVER: Comando %s - Inexistente!",cmdtext);
- return SendClientMessage(playerid, Vermelho, strx);
- }
- return true;
- }
- public OnPlayerExitedMenu(playerid)
- {
- TogglePlayerControllable(playerid,1);
- return 1;
- }
- stock SetPlayerPosEx(playerid,Float:X,Float:Y,Float:Z)
- {
- PlayerEnterTime[playerid]+=221;
- SetPlayerPos(playerid,X,Y,Z);
- }
- stock PutPlayerInVehicleEx(playerid,vehicleid,seatid)
- {
- PlayerEnterTime[playerid]+=221;
- PutPlayerInVehicle(playerid,vehicleid,seatid);
- }
- stock RemovePlayerFromVehicleEx(playerid)
- {
- PlayerEnterTime[playerid]+=221;
- RemovePlayerFromVehicle(playerid);
- }
- stock strrest(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[128];
- while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- stock GetPlayerArea(playerid)
- {
- new str[130];
- format(str,sizeof(str),"%s",Zones[GetPlayerZone(playerid)][zone_name]);
- return str;
- }
- stock chrfind(needle, haystack[], start = 0)
- {
- while(haystack[start])
- {
- if(haystack[start++] == needle)
- {
- return start-1;
- }
- }
- return -1;
- }
- stock IsPlayerInPlace(playerid,Float:XMin,Float:YMin,Float:XMax,Float:YMax )
- {
- new RetValue = 0;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid,X,Y,Z );
- if( X >= XMin && Y >= YMin && X < XMax && Y < YMax )
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock SetTimers()
- {
- SetTimer("Avisado", 2000, 1);
- SetTimer("Combustivel",180000, 1);
- SetTimer("ChecarPing", 60000, 1);
- SetTimer("LoteriaPublic", 600000, 1);
- SetTimer("AntAfk", 1000, 1);
- SetTimer("Payday", 2400000 , 1);
- SetTimer("TextoGrana", 800, 1);
- SetTimer("TextoGaso", 800, 1);
- SetTimer("GanharExp", 600000 , 1);
- SetTimer("AtualizarChatBubble", 10000, true);
- SetTimer("TempoExpMinuto", 60000, 1);
- SetTimer("PostosG", 800, 1);
- SetTimer("AtualizarGrana", 250, 1);
- }
- stock GetPlayerDistanceToPoint(playerid,Float:x,Float:y)
- {
- new Float:x1,Float:y1,Float:z1;
- new Float:tmpdis;
- GetPlayerPos(playerid,x1,y1,z1);
- tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x1)),2)+floatpower(floatabs(floatsub(y,y1)),2));
- return floatround(tmpdis);
- }
- stock IsPlayerFlooding(playerid)
- {
- if(GetTickCount() - iPlayerChatTime[playerid] < 2000)
- return 1;
- return 0;
- }
- stock ConverterTexto(string[])
- {
- for(new arraysize = 0; arraysize < strlen(string); arraysize++)
- {
- if(strfind(string, "â", true) != -1){new pos = strfind(string, "â", true); strdel(string, pos, pos+strlen("â")); strins(string, "™", pos, sizeof(pos));}
- if(strfind(string, "ã", true) != -1){new pos = strfind(string, "ã", true); strdel(string, pos, pos+strlen("ã")); strins(string, "š", pos, sizeof(pos));}
- if(strfind(string, "á", true) != -1){new pos = strfind(string, "á", true); strdel(string, pos, pos+strlen("á")); strins(string, "˜", pos, sizeof(pos));}
- if(strfind(string, "é", true) != -1){new pos = strfind(string, "é", true); strdel(string, pos, pos+strlen("é")); strins(string, "ž", pos, sizeof(pos));}
- if(strfind(string, "ú", true) != -1){new pos = strfind(string, "ú", true); strdel(string, pos, pos+strlen("ú")); strins(string, "“", pos, sizeof(pos));}
- if(strfind(string, "ó", true) != -1){new pos = strfind(string, "ó", true); strdel(string, pos, pos+strlen("ó")); strins(string, "¦", pos, sizeof(pos));}
- if(strfind(string, "ê", true) != -1){new pos = strfind(string, "ê", true); strdel(string, pos, pos+strlen("ê")); strins(string, "Ÿ", pos, sizeof(pos));}
- if(strfind(string, "í", true) != -1){new pos = strfind(string, "í", true); strdel(string, pos, pos+strlen("í")); strins(string, "¢", pos, sizeof(pos));}
- if(strfind(string, "ç", true) != -1){new pos = strfind(string, "ç", true); strdel(string, pos, pos+strlen("ç")); strins(string, "œ", pos, sizeof(pos));}
- if(strfind(string, "ô", true) != -1){new pos = strfind(string, "ô", true); strdel(string, pos, pos+strlen("ô")); strins(string, "§", pos, sizeof(pos));}
- }
- }
- public AntAfk(playerid)
- {
- if(!floatcmp(PlayerPosAfk[ 0 ], PlayerLastPos[ playerid ][ LastX ]) && !floatcmp(PlayerPosAfk[ 1 ], PlayerLastPos[ playerid ][ LastY ]))
- {
- PlayerAfkTicks[ playerid ] ++;
- }
- else {
- PlayerAfkTicks[ playerid ] = 0;
- }
- PlayerLastPos[ playerid ][ LastX ] = PlayerPosAfk[ 0 ];
- PlayerLastPos[ playerid ][ LastY ] = PlayerPosAfk[ 1 ];
- PlayerLastPos[ playerid ][ LastZ ] = PlayerPosAfk[ 2 ];
- if(PlayerAfkTicks[ playerid ] == MAX_TEMPO_AFK * 60)
- {
- pAFK[ playerid ] = 1;
- SendClientMessage( playerid, Amarelo, "[ ANT - AFK ] Você foi bloqueado de passar de nivel!");
- SetPlayerVirtualWorld( playerid, 1);
- SetCameraBehindPlayer( playerid );
- TogglePlayerControllable( playerid, 0);
- TextDrawShowForPlayer( playerid, AfkText);
- TextDrawShowForPlayer( playerid, AfkBackText);
- }
- return 1;
- }
- public BanLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\r\n",string);
- new File:hFile;
- hFile = fopen("Ban.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public IsNumeric(const string[])
- {
- for (new i = 0, j = strlen(string); i < j; i++) if (string[i] > '9' || string[i] < '0') return 0;
- return 1;
- }
- public LoteriaPublic()
- {
- new stringcm[256];
- new numerosorteado = randomEx(0, 99);
- new rand = random(15000); rand += 5000;
- DinheiroAcumuladoLoto += rand;
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(TaJogando[i] == 1)
- {
- if(vernumerosorteado[i] == numerosorteado)
- {
- TGanhador = i;
- }
- TaJogando[i] = 0;
- NumeroLoto[i] = 0;
- }
- }
- if(TGanhador != 0)
- {
- format(stringcm, sizeof(stringcm), "( Loteria ) %s ganhou %iR$ Na Loteria!!! - Número Sorteado: %i - Parabens ao Ganhador!", pName(TGanhador), DinheiroAcumuladoLoto, numerosorteado);
- GivePlayerGranaEx(TGanhador, DinheiroAcumuladoLoto);
- SendClientMessageToAll(Verde, stringcm);
- TGanhador = -1;
- }
- format(stringcm, sizeof(stringcm), "( Loteria ) Prêmio Acumulado: %iR$ - Número Sorteado: %i - Nenhum Ganhador", DinheiroAcumuladoLoto, numerosorteado); // %i %i = antigo
- SendClientMessageToAll(Verde, stringcm);
- return 1;
- }
- stock randomEx(minnum = cellmin,maxnum = cellmax) return random(maxnum - minnum + 1) + minnum;
- stock pName(playerid)
- {
- new aname[24];
- GetPlayerName(playerid,aname,24);
- return aname;
- }
- stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz >-radi)))
- {
- return true;
- }
- return false;
- }
- stock AtualizarRG(playerid)
- {
- SendClientMessage(playerid, 0x00FFFFAA, " ");
- SendClientMessage(playerid, 0x00FFFFAA, " ");
- new String[128];
- new terrestre[10], nautica[10], aerea[10], porte[10];
- static HabTerrestre[MAX_PLAYERS], HabNautica[MAX_PLAYERS], Porte[MAX_PLAYERS], HabAerea[MAX_PLAYERS];
- format(String, sizeof(String),"» Nome do Personagem : %s",pName(playerid));
- SendClientMessage(playerid, 0x00FFFFAA,String);
- format(String, sizeof(String),"Level: [%d] » Saldo Em Mãos: [%d] » Pais: [%s]", pLevel[playerid], GetPlayerGranaEx(playerid), dini_Get(vfile, "Pais"));
- SendClientMessage(playerid, 0x00FFFFAA,String);
- format(String, sizeof(String),"Exp: [%d/5] » Skin: [%d] » Saldo Bancario: [%d]", Experiencia[playerid], dini_Int(vfile,"Skin"), dini_Int(vfile, "SaldoBancario"));
- SendClientMessage(playerid, 0x00FFFFAA,String);
- format(String, sizeof(String),"Habilitação Terreste: [ %s ] » Habilitação Nautica : [ %s ] » Habilitação Aerea : [ %s ] » Porte Legal de Armas : [ %s ]",terrestre, nautica, aerea, porte);
- SendClientMessage(playerid, 0x00FFFFAA,String);
- if(HabTerrestre[playerid] == 1)
- { terrestre = "Sim"; } else { terrestre = "Nao"; }
- if(HabNautica[playerid] == 1)
- { nautica = "Sim"; } else { nautica = "Nao"; }
- if(HabAerea[playerid] == 1) {
- aerea = "Sim"; } else { aerea = "Nao";
- }
- if(Porte[playerid] == 1) { porte = "Sim"; } else { porte = "Nao";
- }
- return true;
- }
- stock GetDistanceBetweenPlayers(playerid,playerid2)
- {
- new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
- new Float:tmpdis;
- GetPlayerPos(playerid,x1,y1,z1);
- GetPlayerPos(playerid2,x2,y2,z2);
- tmpdis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
- return floatround(tmpdis);
- }
- stock Desconectar(playerid)
- {
- new conta[256], banco[256];
- format(conta, sizeof(conta), DIRETORIO, pName(playerid));
- format(banco, sizeof(banco), DBANCO, pName(playerid));
- if(pFase[playerid][Logado] == 1)
- {
- dini_IntSet(conta, "Procurado", GetPlayerWantedLevel(playerid));
- dini_IntSet(conta, "Gasolina", pGasolina[playerid]);
- dini_IntSet(conta, "Level", pLevel[playerid]);
- dini_IntSet(conta, "ExpJogador", Experiencia[playerid]);
- dini_IntSet(conta, "Profissao", Profissao[playerid]);
- dini_IntSet(conta, "Preso", Preso[playerid]);
- return 1;
- }
- return 1;
- }
- // ***** Comandos *****
- //- Sistema Banco -
- CMD:logarconta(playerid)
- {
- new string[128];
- new banco[128];
- if(LogadoBanco[playerid] == 1)
- {
- SendClientMessage(playerid, Vermelho, "(ERRO) Você já está logado em sua conta bancária.");
- return 1;
- }
- format(banco, sizeof(banco), DBANCO, pName(playerid));
- if(!dini_Exists(banco))
- {
- SendClientMessage(playerid, Vermelho, "(BANCO) Você não tem uma conta no banco, Para criar uma: /criarconta");
- return 1;
- }
- format(string, sizeof(string), "** Banco Brasil Games **\n\nNome de usuário: %s\n\nInsira sua senha bancária:", pName(playerid));
- ShowPlayerDialog(playerid, 1444, DIALOG_STYLE_INPUT, "Conta Bancária", string, "Entrar", "Cancelar");
- return 1;
- }
- CMD:dfirewall(playerid)
- {
- SendClientMessage(playerid, 0x7FFFD4, "(») Aguarde enquanto derrubamos o firewall.......");
- AcessoOn[playerid] = true;
- KillFirewall[playerid] = SetTimerEx("Firewall", 20000, false, "i", playerid);
- FirewallOn[playerid] = 0;
- return 1;
- }
- CMD:invadirbanco(playerid)
- {
- if(Profissao[playerid] == Hacker)
- {
- if(FirewallOn[playerid] == 1)
- {
- SendClientMessage(playerid, 0xFF5E35AA, "* Você vai ter que derrubar o firewall para acessar o banco! use: /dfirewall - para Acessar o Menu Hacker");
- }
- if(FirewallOn[playerid] == 0)
- {
- if(RoubarBanco[playerid] == 0)
- {
- new str[128];
- format(str, sizeof(str), "\nDigite: SHUTDOWN\nPara Derrubar o Firewall do Banco e Aguarde!");
- ShowPlayerDialog(playerid, 7484, DIALOG_STYLE_INPUT, "DDOS * SA:MP", str, "Ok", "Cancelar Invasao");
- SendClientMessage(playerid, 0x7FFFD4, "(») Assalto em Andamento! Digite: ' SHUTDOWN ' No Dialog - Para derrubar o firewall do banco!");
- AcessoOn[playerid] = true;
- RoubarBanco[playerid] = 1;
- KillFirewall[playerid] = SetTimerEx("Firewall", 20000, false, "i", playerid);
- }
- }
- }
- return 1;
- }
- CMD:criarconta(playerid)
- {
- new string[128];
- new banco[128];
- format(banco, sizeof(banco), DBANCO, pName(playerid));
- if(dini_Exists(banco))
- {
- SendClientMessage(playerid, Vermelho, "(BANCO) Você já tem uma conta no banco, para acessa-lá: /logarconta");
- return 1;
- }
- format(string, sizeof(string), "Conta Bancária\n\nNome de usuário: %s\n\nInsira uma senha bancária:", pName(playerid));
- ShowPlayerDialog(playerid, 1442, DIALOG_STYLE_INPUT, "Conta Bancária", string, "Criar", "Cancelar");
- dini_IntSet(vfile, "TContaBancaria", 1);
- return 1;
- }
- CMD:comandos(playerid)
- {
- SendClientMessage(playerid, 0xCDCD00AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, -1, "> /comandos » /ajuda » /admins » /vips » /coomprarbilhete » /rg » senhabanco » /banco");
- SendClientMessage(playerid, -1, "> /logarconta » /criarconta » /relatorio » /creditos » /lutas » /gps » pm");
- SendClientMessage(playerid, -1, "> /trancar » /destrancar » /p » /sairafk » /modoafk ");
- SendClientMessage(playerid, 0xCDCD00AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- return 1;
- }
- CMD:empregos(playerid)
- {
- ShowPlayerDialog(playerid,pMenuProf, DIALOG_STYLE_LIST, "Empregos", "{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {FFFAFA}2 {00FF00}]\n{00FF00}[ {FFFAFA}Carreira {FFD700}Criminosa {00FF00}]\n{00FF00}[ {FFD700}Governo {00FF00}]\n{00FF00}[ {FFD700}Transporte {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}da {FFFAFA}Mafia {00FF00}]", "Ok", "Fechar");
- SendClientMessage(playerid, Amarelo,"~> {FFD700}Escolha a Profissão de Acordo com seu Level!");
- return 1;
- }
- CMD:rg(playerid)
- {
- AtualizarRG(playerid);
- return 1;
- }
- CMD:grana(playerid)
- {
- GivePlayerGranaEx(playerid, 5000);
- return 1;
- }
- CMD:banco(playerid)
- {
- new banco[128];
- if(Assalto[playerid] == 1)
- {
- SendClientMessage(playerid, Vermelho, "(x) Houve um assalto no banco, tente novamente mas tarde!");
- return 1;
- }
- if(!LogadoBanco[playerid])
- {
- SendClientMessage(playerid, Vermelho, "(BANCO) Você precisa logar em sua conta bancária.");
- return 1;
- }
- format(banco, sizeof(banco), DBANCO, pName(playerid));
- if(!dini_Exists(banco))
- {
- SendClientMessage(playerid, Vermelho, "(BANCO) Você não tem uma conta no banco, Para criar uma: /criarconta");
- return 1;
- }
- ShowPlayerDialog(playerid, 4242, DIALOG_STYLE_LIST,"Banco","~> {FFFFFF}[ {00FF00}Sacar {FFFFFF}]\n~> {FFFFFF}[ {00FF00}Depositar {FFFFFF}]\n~> {FFFFFF}[ {00FF00}Consultar Saldo {FFFFFF}]","Solicitar","Fechar");
- TogglePlayerControllable(playerid,1);
- SendClientMessage(playerid, -1, "Escolha o seu serviço e clique em Solicitar.");
- return 1;
- }
- CMD:senhabanco(playerid)
- {
- if(!LogadoBanco[playerid])
- {
- SendClientMessage(playerid, Vermelho, "(BANCO) Você precisa logar em sua conta bancária.");
- return 1;
- }
- new str[128];
- format(str, sizeof(str), "** Banco Brasil Games **\n\nInsira sua senha antiga:", pName(playerid));
- ShowPlayerDialog(playerid, 1444, DIALOG_STYLE_INPUT, "Senha Conta Bancária", str, "Confirmar", "Cancelar");
- SenhaBanco[playerid] = true;
- return 1;
- }
- //- Fim Bank Systen -
- CMD:meulevel(playerid)
- {
- static string[128];
- format(string, sizeof(string), "~w~LEVEL: ~p~%d ~n~ ~w~EXPERIENCIA: ~p~(%d/5)", pLevel[playerid], Experiencia[playerid]);
- GameTextForPlayer(playerid, string, 3000, 1);
- SendClientMessage(playerid, 0x8B7500AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Level ~~~~~~~~~~~~~~~~~~~~~~~~~");
- format(string, sizeof(string), "* Level: %d", pLevel[playerid]);
- SendClientMessage(playerid, 0xFFFFFFFF, string);
- format(string, sizeof(string), "* Experiência: (%d/5)", Experiencia[playerid]);
- SendClientMessage(playerid, 0xFFFFFFFF, string);
- format(string, sizeof(string), "* Faltam %d minuto(s) restantes para proxima Exp!!", TempoLevelMinuto);
- SendClientMessage(playerid, 0xFFFFFFFF, string);
- SendClientMessage(playerid, 0x8B7500AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Level ~~~~~~~~~~~~~~~~~~~~~~~~~");
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- return 1;
- }
- CMD:sistema(playerid, params[])
- {
- if(sscanf(params, "ui", params)) return SendClientMessage(playerid, -1, "SERVER: /sistema [level/salario]");
- else if(strcmp(params, "level", true) == 0)
- {
- SendClientMessage(playerid, 0xCDCD00AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, -1, "* A Cada 20 Minutos Você Ganhar 1 Ponto de Experiencia, Ao Completar 5/5 de Experencia, Você ganha 1 Level.");
- SendClientMessage(playerid, 0xCDCD00AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(strcmp(params, "salario", true) == 0)
- {
- SendClientMessage(playerid, 0xCDCD00AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, -1, "* Assim que a Loteria for Sorteada ( De Uma em Uma 1 Hora ) o Salário de todos é Pago!");
- SendClientMessage(playerid, -1, "* Cada Profissão tem um Salário com seu Preço Justo.");
- SendClientMessage(playerid, -1, "* Caso Você esteja desempregado , Você só receberar o Seguro-Desemprego.");
- SendClientMessage(playerid, 0xCDCD00AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- return 1;
- }
- CMD:mudarsenha(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- new str[128];
- format(str, sizeof(str), "Nome de usuário: %s\n\nInsira uma senha:", pName(playerid));
- ShowPlayerDialog(playerid, 9459, DIALOG_STYLE_INPUT, "Conta", str, "Confirmar", "Cancelar");
- }
- return 1;
- }
- CMD:presos(playerid)
- {
- SendClientMessage(playerid, 0x98FB98AA, "* Presidiarios:");
- new string[90];
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(Preso[i] == 1)
- {
- format(string, sizeof(string), "%d: %s", i, pName(i));
- SendClientMessage(playerid, 0xFFFFFFAA, string);
- }
- }
- }
- return 1;
- }
- CMD:sairafk(playerid)
- {
- if(pAFK[playerid] == 1)
- {
- pAFK[playerid] = 0;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid,1);
- TextDrawHideForPlayer(playerid,AfkText);
- TextDrawHideForPlayer(playerid,AfkBackText);
- SendClientMessage(playerid, Verde, "* Você não está mas afk! Pode Voltar a Jogar Normalmente!");
- }
- else {
- SendClientMessage(playerid,Vermelho,"* Você não está Ausente!");
- return 1;
- }
- return 1;
- }
- CMD:profissao(playerid)
- {
- if(Profissao[playerid] == Desempregado)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~ Desempregado ~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "* Vai trabalhar seu vagabundo!");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão.");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~ Desempregado ~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == Caminhoneiro)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Caminhoneiro ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "* Você trabalha fazendo entregas..");
- SendClientMessage(playerid, 0xFFFFFFFF, "/carregar - Para carregar seu caminhão.");
- SendClientMessage(playerid, 0xFFFFFFFF, "/descarregar - Para descarregar seu caminhão.");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Caminhoneiro ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == MotoTaxi)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Moto Taxi ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "/tarifa [id] [preço] - Para carregar seu caminhão.");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Moto Taxi ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == Taxista)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Taxista ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "/tarifa [id] [preço] - Para carregar seu caminhão.");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Taxista ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == Maquinista)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Maquinista ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "* Você digire trens por los santos / las venturas / san fierro");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Maquinista ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == PolicialM)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Policia Militar ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "/prender [id] [motivo]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/trocarcela [id] [motivo]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/bafometro [id]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/multar [id] [motivo] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/aprenderarmas [id]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Policia Militar ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == PolicialC)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Policia Civil ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "/prender [id] [motivo]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/trocarcela [id] [motivo]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/bafometro [id]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/multar [id] [motivo] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/aprenderarmas [id]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Policia Civil ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == PolicialF)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Policia Federal ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "/prender [id] [motivo]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/trocarcela [id] [motivo]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/bafometro [id]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/multar [id] [motivo] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/aprenderarmas [id]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Policia Federal ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == VDrogas)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ V. de Drogas ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "/vmaconha [id] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/vcrack [id] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/vcoicaina [id] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ V. de Drogas ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == TrafArmas)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Traficante de Armas ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "/vak [id] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/vtec [id] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/vfaca [id] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Traficante de Armas ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == GuardaTransito)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Guarda de Transito ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "* Você cuida do transito de los santos.");
- SendClientMessage(playerid, 0xFFFFFFFF, "/multar [id] [motivo] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/trocarcela [id] [motivo]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/bafometro [id]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/aprenderarmas [id]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Guarda de Transito ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == Advogado)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Advogado ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "/soltar [id] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Advogado ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == VSorvete)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Vendedor de Sorvete ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "/vsorvete [id] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Vendedor de Sorvete ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == Paramedico)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Paramedico ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "/darplano [id]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/curar [id] [preço]");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Paramedico ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else if(Profissao[playerid] == Hacker)
- {
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hacker ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xFFFFFFFF, "/invadirbanco - Invade o Banco e Roubar Grana");
- SendClientMessage(playerid, 0xFFFFFFFF, "/dfirewall - Desativa o Firewall");
- SendClientMessage(playerid, 0xFFFFFFFF, "/hplayer - Hackeia a Conta Bancaria de um Jogador!");
- SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
- SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hacker ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- return 1;
- }
- CMD:p(playerid, params[])
- {
- new str[128], txt;
- if(sscanf(params, "s[128]", txt)) return SendClientMessage(playerid, -1, ":> /p [texto]");
- else
- {
- for(new P=0; P < MAX_PLAYERS; P++)
- {
- if(GetDistanceBetweenPlayers(playerid, P) < 25)
- {
- format(str, sizeof(str), "[Chat Proximo] %s diz: %s", pName(playerid), txt);
- SendClientMessage(P, Amarelo, str);
- }
- }
- }
- return 1;
- }
- CMD:cp(playerid, params[])
- {
- new string[128], txt;
- if(sscanf(params, "s[128]", txt)) return SendClientMessage(playerid, -1, ":> /cp [texto]");
- else
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(Profissao[i] == Profissao[playerid])
- {
- format(string, sizeof(string), "(Chat Profissão) %s diz: %s", pName(playerid), txt);
- SendClientMessage(i, GetPlayerColor(playerid), string);
- }
- }
- }
- }
- return 1;
- }
- CMD:transferir(playerid, params[])
- {
- new giveid, value, str[128], Nome[MAX_PLAYER_NAME];
- if(sscanf(params, "ui", giveid, value))
- return SendClientMessage(playerid, -1, "Use /transferir [ID/Nome] [Valor]");
- if (GetPlayerGranaEx(playerid) < value)
- return SendClientMessage(playerid, -1, "Voce não tem esse dinheiro!");
- GivePlayerGranaEx(playerid, -value);
- GivePlayerGranaEx(giveid, value);
- GetPlayerName(giveid, Nome, MAX_PLAYER_NAME);
- format(str,128,"($) Você transferiu %dR$ para o jogador %s.", value, Nome);
- SendClientMessage(playerid, Amarelo, str);
- GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
- format(str,128,"($) %s transferiu %dR$ para voce.", Nome, value);
- SendClientMessage(giveid, Verde, str);
- return true;
- }
- CMD:modoafk(playerid)
- {
- if(pAFK[playerid] == 0)
- {
- pAFK[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 1);
- TogglePlayerControllable(playerid,1);
- TextDrawHideForPlayer(playerid,AfkText);
- TextDrawHideForPlayer(playerid,AfkBackText);
- SendClientMessage(playerid, Verde, "* Você agora está no MODO AFK!!");
- }
- else {
- SendClientMessage(playerid,Vermelho,"* Você já está Ausente!");
- return 1;
- }
- return 1;
- }
- CMD:pm(playerid, params[])
- {
- new texto,Str[128],id;
- if(sscanf(params, "us",id,texto))
- {
- SendClientMessage(playerid,Vermelho,"Use: /pm [id] [texto]");
- }
- else {
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Este jogador não está conectado");
- format(Str, sizeof(Str), "Mesangem Privada de %s: %s",pName(playerid),texto);
- SendClientMessage(id,Amarelo,Str);
- GameTextForPlayer(playerid, "~g~mensagem ~n~ ~r~enviada", 3000, 1);
- }
- return 1;
- }
- CMD:trancar(playerid)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Vermelho, "(ERRO) Você não está em um veículo.");
- if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, Vermelho, "(ERRO) Você não pode trancar esse veículo, você está de passageiro!");
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(i == playerid) continue;
- SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 1);
- }
- SendClientMessage(playerid, 0x98F5FFAA, "(INFO) Veículo trancado com sucesso!");
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- return 1;
- }
- CMD:destrancar(playerid)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Vermelho, "(ERRO) Você não está em um veículo.");
- if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, Vermelho, "(ERRO) Você não pode destrancar esse veículo, você está de passageiro!");
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(i == playerid) continue;
- SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 0);
- }
- SendClientMessage(playerid, 0x98F5FFAA, "(INFO) Veículo destrancado com sucesso!");
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- return 1;
- }
- CMD:arrasaviado(playerid, params[])
- {
- SendRconCommand("exit");
- SendClientMessage(playerid, -1, " Parabens bixa você arrasou com tudo!!!! =)");
- return 1;
- }
- // Adminstration Systen
- CMD:banirnick(playerid, params[])
- {
- new
- id[24],
- string[100]
- ;
- if(pAdmin[playerid] < 2 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
- {
- if(sscanf(params, "s[24]", id)) return SendClientMessage(playerid, -1, "SERVER: /banirnick [nick]");
- format(vfile, sizeof(vfile), DIRETORIO, id);
- dini_IntSet("Nicksban.ini", id , 1);
- SendClientMessage(playerid, Verde, "* Nick banido!");
- format(string, sizeof(string), "* Você baniu o nick: %s", id);
- SendClientMessage(playerid, 0x7C7CBEAA, string);
- return 1;
- }
- }
- CMD:desbanirnick(playerid, params[])
- {
- new
- id[24],
- string[100]
- ;
- if(pAdmin[playerid] < 2 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
- {
- if(sscanf(params, "s[24]", id)) return SendClientMessage(playerid, -1, "SERVER: /desbanirnick [nick]");
- format(vfile, sizeof(vfile), DIRETORIO, id);
- dini_IntSet("Nicksban.ini", id , 0);
- SendClientMessage(playerid, Verde, "* Nick Desbanido!");
- format(string, sizeof(string), "* Você desbaniu o nick: %s", id);
- SendClientMessage(playerid, 0x7C7CBEAA, string);
- return 1;
- }
- }
- CMD:desbanirip(playerid,params[])
- {
- new IP[20], String[128];
- if(pAdmin[playerid] < 1) return SendClientMessage(playerid,Vermelho,"Você não tem permissão para fazer isso!");
- if(sscanf(params,"s",IP)) return SendClientMessage(playerid,Vermelho,"SERVER: /desbanirip [ip]");
- format(String, sizeof(String), "O IP %s foi Desbanido Com Sucesso!.", IP);
- SendClientMessageToAll(Verde, String);
- format(String, sizeof(String), "unbanip %s",IP);
- SendRconCommand(String);
- return 1;
- }
- CMD:liberarnome(playerid, params[])
- {
- format(vfile, sizeof(vfile), DIRETORIO, pName(playerid));
- if(pAdmin[playerid] < 3 && IsPlayerAdmin(playerid))
- {
- if(sscanf(params, "ud", params)) return SendClientMessage(playerid, -1, "Uso correto: /liberarnome [ID]");
- new str[128];
- new giveplayer[MAX_PLAYERS];
- new sendername[MAX_PLAYERS];
- new giveplayerid = strval(params);
- Autorizado[giveplayerid] = 1;
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GameTextForPlayer(giveplayerid, "~w~LIBERADO!", 3000, 0);
- format(str, sizeof(str), "* Adminstrador: %s liberou você para poder mudar de nome!", sendername);
- SendClientMessage(giveplayerid, 0xFFFFFFAA, str);
- format(str, sizeof(str), "* Você liberou o jogador %s para mudar de nome!", giveplayer);
- SendClientMessage(playerid, 0xFFFFFFAA, str);
- }
- else
- {
- SendClientMessage(playerid, Vermelho, "* Sem Permissão para isto.");
- }
- return 1;
- }
- CMD:setadmin(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
- {
- new leveladm,
- plid,
- string[128];
- if(sscanf(params, "ud", plid, leveladm))
- return SendClientMessage(playerid, Vermelho, "Uso correto: /setadmin [ID] [Level]");
- if(!IsPlayerConnected(plid))
- return SendClientMessage(playerid, -1, "Este jogador não está conectado");
- if(leveladm > 6) return SendClientMessage(playerid, -1, "O level máximo é 6!");
- if(IsPlayerConnected(plid))
- {
- if(leveladm >= 1)
- {
- pAdmin[plid] = leveladm;
- dini_IntSet(vfile, "LevelAdmin", leveladm);
- format(string, sizeof(string), "* %s promoveu você para adminstrador Level: %d!", pName(playerid), leveladm);
- SendClientMessage(plid, Laranja, string);
- }
- if(leveladm == 0)
- {
- pAdmin[plid] = 0;
- dini_IntSet(vfile, "LevelAdmin", 0);
- format(string, sizeof(string), "* %s Retirou você da adminstração do servidor!", pName(playerid));
- SendClientMessage(plid, Laranja, string);
- }
- }
- }
- return 1;
- }
- CMD:gasosa(playerid)
- {
- if(!pAdmin[playerid]) return SendClientMessage(playerid, Vermelho,"* Você não tem permissão.");
- {
- dini_IntSet(vfile, "Gasolina", 999);
- pGasolina[playerid] = 999;
- }
- return 1;
- }
- CMD:admins(playerid)
- {
- SendClientMessage(playerid,Amarelo, "» Adminstradores Conectados:");
- SendClientMessage(playerid,-1, "{00FF00}BOT {FFFAFA}> [ {00FF00}Ant - Noob {FFFAFA}]");
- new count = 0;
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(pAdmin[i])
- {
- new str[256];
- new pname[24];
- GetPlayerName(i, pname, 24);
- if(pAdmin[i] == 1)
- {
- format(str,sizeof(str),"{00FF00}%s {FFFAFA}> [ {00FF00}Colaborador {FFFAFA}]", pname,i);
- }
- if(pAdmin[i] == 2)
- {
- format(str,sizeof(str),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Moderador {FFFAFA}]", pname,i);
- }
- if(pAdmin[i] == 3)
- {
- format(str,sizeof(str),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Adminstrador {FFFAFA}]", pname,i);
- }
- if(pAdmin[i] == 4)
- {
- format(str,sizeof(str),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Adminstrador + {FFFAFA}]", pname,i);
- }
- if(pAdmin[i] == 5)
- {
- format(str,sizeof(str),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Adminstrador ++ {FFFAFA}]", pname,i);
- }
- if(pAdmin[i] == 6)
- {
- format(str,sizeof(str),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Dono / Scripter {FFFAFA}]", pname,i);
- }
- SendClientMessage(playerid, -1, str);
- count++;
- }
- }
- }
- if(count == 0)
- {
- SendClientMessage(playerid, Vermelho, "* Sem Adminstradores Online *");
- }
- return 1;
- }
- /* CMD:admins(playerid)
- {
- SendClientMessage(playerid,Verde, "{FFFAFA}-> {00FF00}Adminstradores Conectados {FFFAFA} <-");
- static bool: result;
- new string[128];
- for(new i; i < MAX_PLAYERS; ++i)
- {
- new pname[24];
- GetPlayerName(i,pname,24);
- if(IsPlayerConnected(i) && pAdmin[playerid] < 0)
- {
- if(pAdmin[playerid] == 1)
- {
- format(string,sizeof(string),"{00FF00}%s {FFFAFA}> [ {00FF00}Colaborador {FFFAFA}]", pname);
- }
- if(pAdmin[playerid] == 2)
- {
- format(string,sizeof(string),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Moderador {FFFAFA}]", pname);
- }
- if(pAdmin[playerid] == 3)
- {
- format(string,sizeof(string),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Adminstrador {FFFAFA}]", pname);
- }
- if(pAdmin[playerid] == 4)
- {
- format(string,sizeof(string),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Adminstrador + {FFFAFA}]", pname);
- }
- if(pAdmin[playerid] == 5)
- {
- format(string,sizeof(string),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Adminstrador ++ {FFFAFA}]", pname);
- }
- if(pAdmin[playerid] == 6)
- {
- format(string,sizeof(string),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Dono / Scripter {FFFAFA}]", pname);
- }
- SendClientMessage(playerid, -1, string);
- result = true;
- }
- }
- if(!result)
- return SendClientMessage(playerid, -1,"");
- return 1;
- }*/
- CMD:planos(playerid)
- {
- SendClientMessage(playerid, 0xFFFFFFAA, "~~~~~~~~~~~~~ Planos ~~~~~~~~~~~~~");
- SendClientMessage(playerid, 0xE066FFAA, "> Plano Básico: [R$350]");
- SendClientMessage(playerid, 0x43CD80AA, "> Plano Avançado: [R$700]");
- SendClientMessage(playerid, 0xCDAD00AA, "> Plano Profissional: [R$1400]");
- SendClientMessage(playerid, 0xFFFFFFAA, "~~~~~~~~~~~~~ Planos ~~~~~~~~~~~~~");
- return 1;
- }
- CMD:ajudaplano(playerid)
- {
- SendClientMessage(playerid, 0xFFFFFFAA, "~~~~~~~~~~~~~ Info Plano ~~~~~~~~~~~~~");
- SendClientMessage(playerid, -1, "P: Pra que serve seu plano de saúde? R: O Plano de Saúde Cobrirá sua Despezas com o Médico apos sua morte.");
- SendClientMessage(playerid, -1, "P: Quais são os Preços dos Planos? R: Use: /planos");
- SendClientMessage(playerid, 0xFFFFFFAA, "~~~~~~~~~~~~~ Info Plano ~~~~~~~~~~~~~");
- return 1;
- }
- /* CMD:mudarnome(playerid,params[])
- {
- if(Autorizado[playerid] == 1)
- {
- new banco[64], nova[64], IP[24], novabanco[64], senha[3][256], escolhido;
- if(sscanf(params, "ui", escolhido)) return SendClientMessage(playerid, Vermelho, "Uso correto: /setadmin [ID] [Level]");
- format(nova, 128, DIRETORIO, escolhido);
- if(dini_Exists(nova))
- {
- SendClientMessage(playerid, Vermelho, "(ERRO) Já existe uma conta criada com esse nome!");
- return 1;
- }
- format(vfile, sizeof(vfile), DIRETORIO, pName(playerid));
- format(banco, sizeof(banco), DBANCO, pName(playerid));
- senha[0] = dini_Get(vfile, "Senha");
- senha[1] = dini_Get(banco, "Senha");
- senha[2] = dini_Get(banco, "SaldoBancario");
- dini_Remove(vfile); dini_Remove(banco);
- SetPlayerName(playerid, escolhido);
- format(nova, sizeof(nova), DIRETORIO, escolhido);
- format(novabanco, sizeof(novabanco), DBANCO, params);
- dini_Create(nova); dini_Create(novabanco);
- GetPlayerIp(playerid, IP, sizeof(IP));
- dini_Set(nova, "Login", pName(playerid));
- dini_Set(nova, "IP", IP);
- dini_Set(nova, "Level", "0");
- dini_Set(nova, "ExpJogador", "0");
- dini_Set(nova, "LevelAdmin", "0");
- dini_Set(nova, "Dinheiro", "0");
- dini_Set(nova, "Procurado", "0");
- dini_Set(nova, "Skin", "0");
- dini_Set(nova, "VipL", "0");
- dini_Set(nova, "Avisos", "0");
- dini_Set(nova, "TContaBancaria", "0");
- dini_Set(nova, "HabTerrestre", "0");
- dini_Set(nova, "Pais", "Nenhum");
- dini_Set(nova, "HabAerea", "0");
- dini_Set(nova, "HabNautica", "0");
- dini_Set(nova, "Profissao", "0");
- dini_Set(nova,"Porte", "0");
- dini_IntSet(nova, "Skin", GetPlayerSkin(playerid));
- dini_Set(nova, "Senha", senha[0]);
- dini_Set(novabanco, "Senha", senha[1]);
- dini_Set(novabanco, "ContaBancaria", senha[2]);
- dini_IntSet(nova, "Procurado", GetPlayerWantedLevel(playerid));
- dini_IntSet(nova, "Level", pLevel[playerid]);
- dini_IntSet(nova, "ExpJogador", Experiencia[playerid]);
- dini_IntSet(nova, "Profissao", Profissao[playerid]);
- //SendClientMessage(playerid, COR_AMARELO, "(INFO) Aguarde, estamos salvando os dados da sua conta antiga e transferindo para nova!");
- Autorizado[playerid] = 0;
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000AA, "(ERRO) Você não está liberado para poder mudar de nome!");
- }
- return 1;
- }*/
- CMD:comprarbilhete(playerid,params[])
- {
- new string[128], NumeroToLoto; //NumeroValido = 1;
- if(sscanf(params, "s", NumeroLoto)) return SendClientMessage(playerid, Vermelho, "Uso correto: /comprarbilhete [numero]");
- if(1 < (NumeroToLoto) > 100) return SendClientMessage(playerid, Vermelho, "[ERRO] Número deve estar entre 0 e 100 - Custo do Bilhete: 400R$");
- else if(TaJogando[playerid] == 1)return SendClientMessage(playerid, Vermelho, "LOTERIA: Você já está jogando na Loteria!");
- else if(GetPlayerGranaEx(playerid) < 400) return SendClientMessage(playerid, Vermelho, "LOTERIA: Você não tem $400 para comprar o Número");
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(NumeroLoto[playerid] == NumeroLoto[i])
- {
- //NumeroValido = 0;
- }
- }
- //if(NumeroValido == 0) return SendClientMessage(playerid, Vermelho, "[ERRO] Esse número já foi escolhido!");
- format(string, sizeof(string), "LOTERIA: Você jogou na loteria com o numero: %i ", NumeroToLoto);
- SendClientMessage(playerid, Amarelo, string);
- GivePlayerGranaEx(playerid, -400);
- TaJogando[playerid] = 1;
- NumeroLoto[playerid] = NumeroToLoto;
- return 1;
- }
- CMD:meuplano(playerid)
- {
- new string[100];
- if(PlanoMedico[playerid] == 0)
- {
- SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
- SendClientMessage(playerid, -1, "* Você não possui um Plano de Saúde.");
- SendClientMessage(playerid, -1, "* Quer Contratar um Plano de Saúde? Vá até o Hospital Mas Proximo!");
- SendClientMessage(playerid, -1, "* Comandos Úteis: /planos - /ajudaplano");
- SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
- return 1;
- }
- if(PlanoMedico[playerid] == 1)
- {
- SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
- format(string,sizeof(string),"Plano Atual: %d", PlanoMedico[playerid]);
- SendClientMessage(playerid, -1, "* Quer cancelar seu plano? Vá Até o Hospital!");
- SendClientMessage(playerid, -1, "* O Pagamento do Plano será cobrado do Seu Salário!");
- SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
- return 1;
- }
- else if(PlanoMedico[playerid] == 2)
- {
- SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
- format(string,sizeof(string),"Plano Atual: %d", PlanoMedico[playerid]);
- SendClientMessage(playerid, -1, "* Quer cancelar seu plano? Vá Até o Hospital!");
- SendClientMessage(playerid, -1, "* O Pagamento do Plano será cobrado do Seu Salário!");
- SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
- return 1;
- }
- else if(PlanoMedico[playerid] == 3)
- {
- SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
- format(string,sizeof(string),"Plano Atual: %d", PlanoMedico[playerid]);
- SendClientMessage(playerid, -1, "* Quer cancelar seu plano? Vá Até o Hospital!");
- SendClientMessage(playerid, -1, "* O Pagamento do Plano será cobrado do Seu Salário!");
- SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
- return 1;
- }
- return 1;
- }
- CMD:ir(playerid,params[])
- {
- new string[128];
- new id,Float:X,Float:Y,Float:Z,vehid;
- if(pAdmin[playerid] < 2) return SendClientMessage(playerid,Vermelho,"* Você não tem permissão.");
- if(sscanf(params,"u",id)) return SendClientMessage(playerid,Verde,"* Use: /ir [id]");
- GetPlayerPos(id,X,Y,Z);
- SetPlayerPos(playerid,X+4,Y,Z);
- vehid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehid,X+4,Y,Z);
- PutPlayerInVehicle(playerid,vehid,0);
- format(string,sizeof(string),"- (AdmCmd) Você teleportou para %s",pName(id));
- SendClientMessage(playerid, Verde, string);
- return 1;
- }
- CMD:loteria(playerid)
- {
- LoteriaPublic();
- return 1;
- }
- CMD:salario(playerid)
- {
- PayDay();
- return 1;
- }
- /* CMD:a(playerid, params[])
- {
- if(pAdmin[playerid] < 2) return SendClientMessage(playerid,Vermelho,"* Você não tem permissão.");
- new texto;
- new Str[128];
- if(sscanf(params, "s",texto)) return SendClientMessage(playerid,-1,"Use: /a [texto]");
- format(Str, sizeof(Str),"Admin %s : %s",pName(playerid),texto);
- SendClientMessageToAll(0x00B0B0AA,Str);
- return 1;
- }
- */
- CMD:av(playerid, params[])
- {
- new string[128], txt;
- if(pAdmin[playerid] < 2) return SendClientMessage(playerid,Vermelho,"* Você não tem permissão.");
- if(sscanf(params, "s[128]", txt)) return SendClientMessage(playerid, Vermelho, ":> /av [texto]");
- format(string, sizeof(string), "* Admin %s : %s", pName(playerid), txt);
- SendClientMessageToAll(0x00B0B0AA,string);
- return 1;
- }
- CMD:aceitaradvogado(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(dini_Int(vfile, "EnvioAdvogado") == 1)
- {
- SendClientMessage(playerid,Amarelo, "* Você aceitou o convite para a entrevista!");
- dini_IntSet(vfile, "Preso", 0);
- Preso[playerid] = 0;
- SetPlayerHealth(playerid,100);
- SpawnPlayer(playerid);
- GivePlayerGranaEx(playerid, -350);
- }
- }
- return 1;
- }
- CMD:soltar(playerid, params[])
- {
- new string[128];
- if(Profissao[playerid] == Advogado || IsPlayerAdmin(playerid))
- {
- new plid;
- if(sscanf(params, "ui", plid)) return SendClientMessage(playerid, Vermelho, "Uso: /soltar [id] [preço]");
- if(!IsPlayerConnected(plid))
- {
- SendClientMessage(playerid, Vermelho, "(ERRO) O jogador não está online");
- return 1;
- }
- else {
- dini_IntSet(vfile, "EnvioAdvogado", 1);
- SendClientMessage(playerid, Verde, "* Convite Enviado!");
- format(string, sizeof(string), "* %s está se oferecendo para solta-lo da prisão. Para aceitar use: /aceitaradvogado - Caso não queira Use: /recusar", pName(playerid));
- SendClientMessage(plid, newadm, string);
- SendClientMessage(plid, newadm, "* O Custo pra ele te soltar custa: [ 350 R$ ]");
- return 1;
- }
- }
- else {
- SendClientMessage(playerid,Vermelho,"(ERRO) Você não é um Advogado");
- return 1;
- }
- }
- CMD:fianca(playerid)
- {
- new grana;
- grana = dini_Int(vfile, "SaldoBancario");
- if(Preso[playerid] == 1)
- {
- if(grana > 15000)
- {
- if(Preso[playerid]>= 2)
- {
- SetPlayerWantedLevel(playerid, 0);
- dini_IntSet(vfile, "Preso",0);
- dini_IntSet(vfile, "SaldoBancario", dini_Int(vfile, "SaldoBancario")-Fianca);
- Preso[playerid] = 0;
- SpawnPlayer(playerid);
- SetPlayerHealth(playerid,100);
- SendClientMessage(playerid, Verde,"* Você pagou a fiança e foi solto!.");
- }
- else {
- SendClientMessage(playerid, Vermelho,"(ERRO) Você tem que esperar 2 minutos para poder pagar a fiança!");
- }
- }
- else {
- SendClientMessage(playerid, Vermelho,"(ERRO) Você não possui dinheiro suficiente! (R$15000)");
- }
- }
- else {
- SendClientMessage(playerid, Vermelho,"(ERRO) Você não está preso!");
- }
- return 1;
- }
- CMD:dm(playerid)
- {
- new pname[MAX_PLAYER_NAME];
- new string[64];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- if(podedm == 0)
- {
- format(string, sizeof(string), "{00FF00}~> (AdmCmd) {FFFAFA}O Adminstrador %s {FFFAFA}({00FF00}%d{FFFAFA}) permitiu o DM.", pname, playerid);
- SendClientMessageToAll(newadm, string);
- podedm = 1;
- }
- else {
- if(podedm == 1)
- {
- format(string, sizeof(string), "{00FF00}~> (AdmCmd) {FFFAFA}O Adminstrador %s {FFFAFA}({00FF00}%d{FFFAFA}) proibiu o DM.", pname, playerid);
- SendClientMessageToAll(newadm, string);
- podedm = 0;
- }
- }
- return 1;
- }
- CMD:vidat(playerid)
- {
- new string[64];
- if(pAdmin[playerid] < 0)
- {
- format(string, sizeof(string), "{00FF00}~> (AdmCmd) {FFFAFA}O Adminstrador %s {FFFAFA}({00FF00}%d{FFFAFA}) Recuperou a vida de todos!", pName(playerid),playerid);
- SendClientMessageToAll(newadm, string);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- SetPlayerHealth(i,100);
- }
- }
- }
- return 1;
- }
- CMD:coletet(playerid)
- {
- new string[64];
- if(pAdmin[playerid] < 0)
- {
- format(string, sizeof(string), "{00FF00}~> (AdmCmd) {FFFAFA}O Adminstrador %s {FFFAFA}({00FF00}%d{FFFAFA}) Recuperou o colete de todos!", pName(playerid),playerid);
- SendClientMessageToAll(newadm, string);
- for ( new i = 0 ; i < MAX_PLAYERS ; i ++)
- {
- if(IsPlayerConnected(i))
- {
- SetPlayerArmour(i,100);
- }
- }
- }
- return 1;
- }
- CMD:gmx(playerid, params[])
- {
- if(pAdmin[playerid] < 4 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
- static szt[128];
- format(szt , 64,"(GMX) O Adminstrador %s Reiniciou o Servidor.",pName(playerid)); // Ta filé..
- SendClientMessageToAll(Verde, szt);
- SendRconCommand("gmx");
- return true;
- }
- CMD:dargrana(playerid, params[]) // Ok 100% Testado.
- {
- if(pAdmin[playerid] < 3 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
- static szt[128], plid, grana;
- if(sscanf(params,"ui",plid,grana)) return SendClientMessage(playerid, Vermelho, "(ERRO) /dargrana [id] [valor]");
- SendClientMessage(playerid, Verde, "* Comando Efetuado!");
- format(szt , 64,"Administrador %s te deu %dR$ de Grana",pName(playerid),grana);
- SendClientMessage(plid,Verde,szt);
- if(IsPlayerConnected(plid))
- {
- GivePlayerGranaEx(plid,grana);
- }
- return true;
- }
- /*CMD:setprof(playerid, params[])
- {
- new szt[128], plid, prof;
- if(IsPlayerConnected(plid))
- {
- if(pAdmin[playerid] < 2 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
- if(sscanf(params,"ui",plid,prof)) return SendClientMessage(playerid, Vermelho, "(ERRO) /setprof [id] [numero]");
- if(prof > 14 && prof < 0)
- {
- SendClientMessage(playerid, Vermelho, "(ERRO) Profissão Inexistente!");
- return 1;
- }
- SendClientMessage(playerid, Verde, "* Comando Efetuado!");
- format(szt , 64,"Administrador %s te setou na profissão número : %d",pName(playerid),prof);
- SendClientMessage(plid,Verde,szt);
- LogarProf(plid);
- dini_IntSet(vfile, "Profissao", prof);
- }
- return 1;
- }*/
- CMD:setprof(playerid, params[])
- {
- if(pAdmin[playerid] < 1 || IsPlayerAdmin(playerid))
- {
- new plid, profdonb, string[128], profissao[128];
- if(sscanf(params,"ui",plid,profdonb)) return SendClientMessage(playerid, Vermelho, "(ERRO) /setprof [id] [numero]");
- if(profdonb > 14 && profdonb < 0) return SendClientMessage(playerid, Vermelho,"(ERRO) Profissão Inexistente!");
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(plid, pname, MAX_PLAYER_NAME);
- if(IsPlayerConnected(plid))
- {
- if(profdonb == 0 || profdonb == 1 || profdonb == 2 || profdonb == 3 || profdonb == 4 || profdonb == 5 || profdonb == 6 || profdonb == 7 || profdonb == 8 || profdonb == 9 || profdonb == 10 ||
- profdonb == 11 || profdonb == 12 || profdonb == 13 || profdonb == 14)
- {
- Profissao[plid] = profdonb;
- if(profdonb == 1) {profissao = "Caminoneiro";}
- if(profdonb == 2) {profissao = "MotoTaxi";}
- if(profdonb == 3) {profissao = "Taxista";}
- if(profdonb == 4) {profissao = "Maquinista";}
- if(profdonb == 5) {profissao = "PolicialM";}
- if(profdonb == 6) {profissao = "PolicialC";}
- if(profdonb == 7) {profissao = "PolicialF";}
- if(profdonb == 8) {profissao = "VDrogas";}
- if(profdonb == 9) {profissao = "TrafArmas";}
- if(profdonb == 10) {profissao = "GuardaTransito";}
- if(profdonb == 11) {profissao = "Advogado";}
- if(profdonb == 12) {profissao = "VSorvete";}
- if(profdonb == 13) {profissao = "Paramedico";}
- if(profdonb == 14) {profissao = "Hacker";}
- format(string, sizeof(string), "* O Admistrador %s (%d) Alterou Sua Profissão Para : %s.", pName(playerid), playerid, profdonb);
- SendClientMessage(plid, newadm, string);
- format(string, sizeof(string), "* Você deu a %s (%d) a profissão: %s.", pname, plid, profdonb);
- SendClientMessage(playerid, Amarelo, string);
- dini_IntSet(vfile, "Profissao", profdonb);
- LogarProf(plid);
- SpawnPlayer(plid);
- return 1;
- }
- else {
- SendClientMessage(playerid, Vermelho, "* Jogador não conectado.");
- return 1;
- }
- }
- }
- return 1;
- }
- CMD:ajudaadm(playerid)
- {
- if(pAdmin[playerid] == 1)
- {
- SendClientMessage(playerid, Verde, "* /ir » /trazer » /calar » /descalar » /ban");
- }
- if(pAdmin[playerid] == 2)
- {
- SendClientMessage(playerid, Verde, "* /ir » /trazer » /calar » /descalar » /ban » /banirnick » /vidat » /coletet » /desbanirnick");
- }
- if(pAdmin[playerid] == 3)
- {
- SendClientMessage(playerid, Verde, "* /ir » /trazer » /calar » /descalar » /ban » /banirnick » /vidat » /coletet » /desbanirnick");
- }
- if(pAdmin[playerid] == 4)
- {
- SendClientMessage(playerid, Verde, "* /ir » /trazer » /calar » /descalar » /ban » /banirnick » /vidat » /coletet » /desbanirnick » /desbanir");
- }
- if(pAdmin[playerid] == 5)
- {
- SendClientMessage(playerid, Verde, "* /ir » /trazer » /calar » /descalar » /ban » /banirnick » /vidat » /coletet » /desbanirnick » /desbanir");
- }
- if(pAdmin[playerid] == 6)
- {
- SendClientMessage(playerid, Verde, "* /ir » /trazer » /calar » /descalar » /ban » /banirnick » /vidat » /coletet » /desbanirnick » /desbanir");
- }
- }
- CMD:abrirdp(playerid)
- {
- if(Profissao[playerid] == PolicialC || Profissao[playerid] == PolicialM || Profissao[playerid] == PolicialF || IsPlayerAdmin(playerid))
- {
- if(PortaoAberto == 0)
- {
- MoveObject(PortaoDP, 1540.68652344,-1616.23730469,15.15620422, 3.0); PortaoAberto = 1;
- SendClientMessage(playerid, 0x40C1FFAA, "(INFO) Você abriu o portão principal da DP!");
- }
- else {
- SendClientMessage(playerid, Vermelho, "(ERRO) O portão principal já está aberto!");
- }
- }
- else {
- SendClientMessage(playerid, Vermelho, "(ERRO) Você não tem permissão!");
- }
- return 1;
- }
- CMD:fechardp(playerid)
- {
- if(Profissao[playerid] == PolicialC || Profissao[playerid] == PolicialM || Profissao[playerid] == PolicialF || IsPlayerAdmin(playerid))
- {
- if(PortaoAberto == 1)
- {
- MoveObject(PortaoDP, 1540.68652344,-1627.59179688,15.15620422, 3.0); PortaoAberto = 0;
- SendClientMessage(playerid, 0x40C1FFAA, "(INFO) Você fechou o portão principal da DP!");
- }
- else {
- SendClientMessage(playerid, Vermelho, "(ERRO) O portão principal já está fechado!");
- }
- }
- else {
- SendClientMessage(playerid, Vermelho, "(ERRO) Você não tem permissão!");
- }
- return 1;
- }
- CMD:abrirdp2(playerid)
- {
- if(Profissao[playerid] == PolicialC || Profissao[playerid] == PolicialM || Profissao[playerid] == PolicialF || IsPlayerAdmin(playerid))
- {
- if(Portao2Aberto == 0)
- {
- MoveObject(PortaoDP2, 1598.13671875,-1638.26818848,15.20197678, 3.0); Portao2Aberto = 1;
- SendClientMessage(playerid, 0x40C1FFAA, "(INFO) Você abriu o segundo portão da DP!");
- }
- else {
- SendClientMessage(playerid, Vermelho, "(ERRO) O segundo portão já está aberto!");
- }
- }
- else {
- SendClientMessage(playerid, Vermelho, "(ERRO) Você não tem permissão!");
- }
- return 1;
- }
- CMD:fechardp2(playerid)
- {
- if(Profissao[playerid] == PolicialC || Profissao[playerid] == PolicialM || Profissao[playerid] == PolicialF || IsPlayerAdmin(playerid))
- {
- if(Portao2Aberto == 1)
- {
- MoveObject(PortaoDP2, 1589.98474121,-1638.26818848,15.21242142, 3.0); Portao2Aberto = 0;
- SendClientMessage(playerid, 0x40C1FFAA, "(INFO) Você fechou o segundo portão da DP!");
- }
- else {
- SendClientMessage(playerid, Vermelho, "(ERRO) O segundo portão já está fechado!");
- }
- }
- else {
- SendClientMessage(playerid, Vermelho, "(ERRO) Você não tem permissão!");
- }
- return 1;
- }
- CMD:subirdp(playerid)
- {
- if(Profissao[playerid] == PolicialC || Profissao[playerid] == PolicialM || Profissao[playerid] == PolicialF || IsPlayerAdmin(playerid))
- {
- if(ElevadorCima == 0)
- {
- MoveObject(ElevadorDP, 1561.68237305,-1641.39025879,27.30376816, 2.0); ElevadorCima = 1;
- SendClientMessage(playerid, 0x40C1FFAA, "(INFO) Você subiu o elevador da DP!");
- }
- else {
- SendClientMessage(playerid, Vermelho, "(ERRO) O elevador já está no segundo andar!");
- }
- }
- else {
- SendClientMessage(playerid, Vermelho, "(ERRO) Você não tem permissão!");
- }
- return 1;
- }
- CMD:descerdp(playerid)
- {
- if(Profissao[playerid] == PolicialC || Profissao[playerid] == PolicialM || Profissao[playerid] == PolicialF || IsPlayerAdmin(playerid))
- {
- if(ElevadorCima == 1)
- {
- MoveObject(ElevadorDP, 1561.68164062,-1641.38964844,12.56751347, 2.0); ElevadorCima = 0;
- SendClientMessage(playerid, 0x40C1FFAA, "(INFO) Você desceu o elevador da DP!");
- }
- else {
- SendClientMessage(playerid, Vermelho, "(ERRO) O elevador já está no primeiro andar!");
- }
- }
- else {
- SendClientMessage(playerid, Vermelho, "(ERRO) Você não tem permissão!");
- }
- return 1;
- }
- // Sistema de Carros c/ Dono
- CMD:precocarro(playerid, params[])
- {
- new preco, string[100];
- if(sscanf(params,"ui",preco)) return SendClientMessage(playerid, Vermelho, "* /precocarro [preço]");
- for(new c = 0; c < MAX_CARROS; c++)
- {
- format(string, sizeof(string), "/Carros/carro%d.ini", c);
- if(dini_Exists(string))
- {
- if(GetPlayerVehicleID(playerid) == dini_Int(string, "Id"))
- {
- if(pAdmin[playerid] > 4)
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- dini_IntSet(string, "Preco", preco);
- }
- else {
- SendClientMessage(playerid, Vermelho, "* Você não tem permissão.");
- }
- }
- }
- }
- return 1;
- }
- CMD:liberarcarro(playerid, params[])
- {
- new preco, string[100];
- if(sscanf(params,"ui",preco)) return SendClientMessage(playerid, Vermelho, "* /liberarcarro [id]");
- format(string, sizeof(string), "/Carros/carro%d.ini", preco);
- if(dini_Exists(string))
- {
- if(pAdmin[playerid] > 4)
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- dini_IntSet(string, "cDono", 0);
- dini_Set(string, "Dono", "Nenhum");
- format(string, sizeof(string), "* O Adminstrador %s Liberou o Carro Número: %d", pname,preco);
- SendClientMessageToAll(newadm, string);
- return 1;
- }
- else {
- SendClientMessage(playerid, Vermelho, "* Você não tem permissão.");
- }
- }
- return 1;
- }
- CMD:ircarro(playerid, params[])
- {
- new id, string[100];
- if(sscanf(params,"ui",id)) return SendClientMessage(playerid, Vermelho, "* /ircarro [id]");
- format(string, sizeof(string), "/Carros/carro%d.ini", id);
- if(dini_Exists(string))
- {
- new Float:X, Float:Y, Float:Z;
- GetVehiclePos(dini_Int(string, "Id"), X, Y, Z);
- if(pAdmin[playerid] > 4)
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- SetPlayerPos(playerid, X, Y, Z);
- }
- else {
- SendClientMessage(playerid, Vermelho, "* Você não tem permissão.");
- }
- }
- return 1;
- }
- CMD:carv(playerid, params[])
- {
- new carid, Float:ang, preco, cor1, cor2, string[100];
- //if(sscanf(params,"uidd", carid , preco , cor1 , cor2)) return SendClientMessage(playerid, Vermelho, "*: /carv [id] [preço] [cor1] [cor2]");
- if(sscanf(params, "iiii", carid, preco, cor1, cor2))
- return SendClientMessage(playerid, Vermelho, "*: /carv [id] [preço] [cor1] [cor2]");
- if(pAdmin[playerid] > 5 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
- if(IsPlayerAdmin(playerid)|| pAdmin[playerid] > 5) {
- if(carid < 400 || carid > 611)
- return SendClientMessage(playerid, Vermelho, "ERRO: O número do veículo deve ser de 400 à 611.");
- if(IsPlayerInAnyVehicle(playerid))
- {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
- format(string, sizeof(string), "/Carros/carro%d.ini", proximocarro);
- if(!dini_Exists(string))
- {
- dini_Create(string);
- dini_IntSet(string, "Modelo", carid);
- dini_FloatSet(string, "CordX", Float:X);
- dini_FloatSet(string, "CordY", Float:Y);
- dini_FloatSet(string, "CordZ", Float:Z);
- dini_FloatSet(string, "Angulo", Float:ang);
- dini_IntSet(string, "Cor1", cor1);
- dini_IntSet(string, "Cor2", cor2);
- dini_IntSet(string,"Alarme", 0);
- dini_IntSet(string, "cDono", 0);
- dini_Set(string, "Dono", "Ninguem");
- dini_IntSet(string,"cDono2", 0);
- dini_Set(string,"Dono2","Ninguem");
- dini_Set(string, "Nome", "Nenhum");
- dini_Set(string,"Placa","Sem Dono");
- dini_IntSet(string, "Preco", preco);
- }
- SetTimerEx("CriarVeiculo2",5000,false,"dffffdd",carid,X,Y,Z,ang,cor1,cor2);
- format(string, sizeof(string), "* Veiculo criado com sucesso!");
- SendClientMessage(playerid, Verde, string);
- return 1;
- }
- else {
- SendClientMessage(playerid, Vermelho, "* Você não está em um veiculo!");
- }
- }
- else {
- SendClientMessage(playerid, Vermelho, "* Veiculo inválido.");
- return 1;
- }
- return 1;
- }
- CMD:comprarcarro(playerid)
- {
- new string[100];
- new VehicleID;
- VehicleID = GetPlayerVehicleID(playerid);
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- for(new carro = 0; carro < MAX_CARROS; carro++)
- {
- format(string, sizeof(string), "/Carros/carro%d.ini", carro);
- if(strcmp(dini_Get(string, "Dono"), pname, true) == 1)
- {
- SendClientMessage(playerid, Vermelho, "* Você já tem um veiculo e não pode comprar outro.");
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) == 0 && VehicleID == dini_Int(string, "Id"))
- {
- if(GetPlayerGranaEx(playerid) >= dini_Int(string, "Preco")) {
- new aname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
- dini_IntSet(string, "cDono", 1);
- dini_Set(string, "Dono", aname);
- SendClientMessage(playerid, -1, "* Veiculo comprado com sucesso!");
- SendClientMessage(playerid, -1, "* Para ver as funções de seu veiculo, Use: '/meucarro'.");
- GivePlayerGranaEx(playerid, -dini_Int(string, "Preco"));
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- else {
- SendClientMessage(playerid, Vermelho, "* Você não tem dinheiro suficiente!");
- return 1;
- }
- }
- }
- return 1;
- }
- CMD:meucarro(playerid)
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- new resultados;
- new string[100], ala[11];
- for(new carro = 0; carro < MAX_CARROS; carro++)
- {
- format(string, sizeof(string), "/Carros/carro%d.ini", carro);
- if(dini_Exists(string))
- {
- if(strcmp(dini_Get(string, "Dono"), pname, true) == 0) {
- format(string, sizeof(string), "Carro Número: [ %d ]", carro);
- ShowPlayerDialog(playerid, 4501, DIALOG_STYLE_LIST, string, "Salvar Posição\nAlterar cor 1\nAlterar cor 2\nRespawnar Veiculo\nNome do veiculo\nAlterar Placa\nAtivar / Desativar Alarme\nAtivar 2º Dono do Carro\nDefinir 2º Dono Do Carro\nVender Veiculo", "OK", "Cancelar");
- resultados = 0;
- if(dini_Int(string,"Alarme")==1) format(ala, sizeof(ala),"Desativar");
- if(dini_Int(string,"Alarme")==0) format(ala, sizeof(ala),"Ativar");
- }
- else {
- resultados = 1;
- }
- }
- }
- if(resultados == 1)
- {
- SendClientMessage(playerid, 0xFFFFFFFF, "Você não esta em um carro!");
- }
- return 1;
- }
- CMD:modelocarro(playerid, params[])
- {
- new md, string[100];
- if(sscanf(params,"s",md)) return SendClientMessage(playerid, Vermelho, "* /modelocarro [modeloid]");
- for(new c = 0; c < MAX_CARROS; c++) {
- format(string, sizeof(string), "/Carros/carro%d.ini", c);
- if(dini_Exists(string))
- {
- if(GetPlayerVehicleID(playerid) == dini_Int(string, "Id")) {
- if(pAdmin[playerid] > 4)
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- dini_IntSet(string, "Modelo", md);
- SendClientMessage(playerid, Vermelho, "* Agora use: /respawncarv.");
- }
- else {
- SendClientMessage(playerid, Vermelho, "* Você não tem permissão.");
- }
- }
- else {
- }
- }
- }
- return 1;
- }
- CMD:respawncarv(playerid, params[])
- {
- new string[100];
- for(new c = 0; c < MAX_CARROS; c++)
- {
- format(string, sizeof(string), "/Carros/carro%d.ini", c);
- if(dini_Exists(string))
- {
- if(GetPlayerVehicleID(playerid) == dini_Int(string, "Id"))
- {
- if(pAdmin[playerid] > 4)
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- new carroid;
- DestroyVehicle(dini_Int(string, "Id"));
- carroid = AddStaticVehicle(dini_Int(string, "Modelo"), dini_Float(string, "CordX"), dini_Float(string, "CordY"), dini_Float(string, "CordZ"), dini_Float(string, "Angulo"), dini_Int(string, "Cor1"), dini_Int(string, "Cor2"));
- dini_IntSet(string, "Id", carroid);
- SendClientMessage(playerid, Vermelho, "* Carros do ' /carv ' respawnados..");
- }
- else {
- SendClientMessage(playerid, Vermelho, "* Você não tem permissão.");
- }
- }
- }
- }
- return 1;
- }
- CMD:car(playerid)
- {
- new Float:X, Float:Y, Float:Z, Float: angulo;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, angulo);
- CreateVehicle(411, X, Y, Z-1, angulo, -1, -1, 120000);
- return 1;
- }
- CMD:cv(playerid, params[])
- {
- new plid, string[100];
- if(sscanf(params,"i", plid))
- return SendClientMessage(playerid, Vermelho, "* Use: /Cv [ID do veiculo]");
- if(pAdmin[playerid] > 1 || IsPlayerAdmin(playerid))
- {
- new Float:X,Float:Y,Float:Z,Float:Angle;
- if(IsPlayerConnected(playerid))
- {
- if(plid >= 400 && plid <= 611)
- {
- GetPlayerPos(playerid,X,Y,Z);
- GetPlayerFacingAngle(playerid,Angle);
- new carro = CreateVehicle(plid, X, Y, Z, Angle, -1, -1, 120000);
- PutPlayerInVehicle(playerid,carro,0);
- if(GetPlayerInterior(playerid))
- LinkVehicleToInterior(carro,GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(carro,GetPlayerVirtualWorld(playerid));
- format(string, sizeof(string), "* Veiculo Modelo: '%d' criado com sucesso.", plid);
- SendClientMessage(playerid, newadm, string);
- return 1;
- }
- else {
- SendClientMessage(playerid, Vermelho, "* ID inválido, digite um ID válido. ID's permitidos = 400 á 611.");
- return 1;
- }
- }
- }
- return 1;
- }
- // Fim
- CMD:abastecer(playerid)
- {
- if(AreaPosto[playerid] == 1)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid, 0xFFFFFFFF, "Você não esta em um carro");
- ShowPlayerDialog(playerid,DIALOG_GAS,DIALOG_STYLE_INPUT,"Posto Brasil Games","** Digite a quantia de litros a colocar em seu Veículo. **\n O Preço da Gasolina é 2R$ Por Litro\nAtt: Posto Brasil Games","Ok","Fechar");
- return 1;
- }
- if(!AreaPosto[playerid])
- return SendClientMessage(playerid, 0xFFFFFFFF, "Você não está em um Posto!");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement