Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- GameMode criado totalmente por Bruno Pereira... pode tirar os creditos tanto faz, isso não vai fazer você ter meu conhecimento.
- */
- ///////////////////////////////////////////////////////
- // //
- // //
- // INCLUDES //
- // //
- // //
- ///////////////////////////////////////////////////////
- #include <a_samp>
- #include <dof2>
- #include <foreach>
- #include <sscanf2>
- #include <zcmd>
- #include <streamer>
- ///////////////////////////////////////////////////////
- // //
- // //
- // CORES //
- // //
- // //
- ///////////////////////////////////////////////////////
- #define COR_CINZA 0xB4B5B7FF
- #define COR_TEXTNEW 0x056339FF
- #define VERMELHO "{FF0000}"
- #define AZUL "{3366FF}"
- ///////////////////////////////////////////////////////
- // //
- // //
- // CONFIGS //
- // //
- // //
- ///////////////////////////////////////////////////////
- #define NOME_SERVER "World of Zumbies"
- #define FORUM "EM BREVE"
- #define TEAMSPEAK "EM BREVE"
- #define NIVEL_INICIO 1
- #define GRANA_INICIO 1000
- ///////////////////////////////////////////////////////
- // //
- // //
- // MACROS //
- // //
- // //
- ///////////////////////////////////////////////////////
- #define SCM SendClientMessage
- #define SCMTA SendClientMessageToAll
- ///////////////////////////////////////////////////////
- // //
- // //
- // FORWARDS //
- // //
- // //
- ///////////////////////////////////////////////////////
- forward SendMSG();
- ///////////////////////////////////////////////////////
- // //
- // //
- // DIALOGS //
- // //
- // //
- ///////////////////////////////////////////////////////
- #define DSenha 1
- #define DSexo 2
- #define DIdade 3
- #define DLogin 4
- #define DErroCadastro 5
- #define DSkin 6
- #define DSair 7
- #define DEntrou 8
- #define DCompras 9
- ///////////////////////////////////////////////////////
- // //
- // //
- // VARIÁVEIS //
- // //
- // //
- ///////////////////////////////////////////////////////
- new
- str[256],
- bool:Logado[MAX_PLAYERS],
- senhaDigitada[MAX_PLAYERS][18],
- Text:DrawCadastro[MAX_PLAYERS][10],
- Text:DrawCadastroInput[MAX_PLAYERS][7],
- Text:DrawLogin[MAX_PLAYERS][7],
- Text:DrawLoginInput[MAX_PLAYERS][5],
- registrado[MAX_PLAYERS],
- Text:tCoins[MAX_PLAYERS][12]
- ;
- /*Sistema de RandomSpawn*/
- new Float:RandomSpawn[][4] =
- {
- // Positions, (X, Y, Z e Facing Angle)
- {1428.7086,-961.5751,36.3332,347.5174},
- {1600.9193,-1113.8674,24.1842,271.4002},
- {1814.6233,-1724.5464,13.5469,198.3928},
- {2079.4111,-1764.1440,13.5604,297.0936},
- {2318.1467,-1651.1765,14.1973,262.9399}
- };
- /*Mensagens randômicas*/
- new RandomMSG[][] =
- {
- "[INFO] Forme um grupo de sobreviventes para aumentar suas chances de sobreviver!",
- "[INFO] É novo no servidor? Use /ask [PERGUNTA] para pedir ajuda a um administrador.",
- "[INFO] Acesse o nosso fórum! www.nexusgaming.forumeiros.com",
- "[INFO] Entre no nosso TeamSpeak! Em Breve",
- "[INFO] Não tente matar os membros do seu próprio time!",
- "[INFO] Use /ajuda para acessar um painel de ajuda do nosso servidor.",
- "[INFO] Viu um cheater? Alguém quebrando as regras? Use /reportar [ID] [MOTIVO]",
- "[INFO] Viu um cheater? Nenhum administrador online? Tire um print e o reporte em nosso fórum!",
- "[INFO] Ajude a comunidade a sobreviver se tornando um membro VIP! Veja os preços em nosso fórum!",
- "[INFO] Não se esqueça de adicionar o servidor aos favoritos!",
- "[INFO] Quer entrar em uma facção? Registre-se no fórum e tente!",
- "[INFO] Use /creditos para acessar os creditos do servidor."
- };
- /*Cores randoms para o sistema de mensagens randômicas (coloquei só 1 cor por enquanto)*/
- new RandomColors [] =
- {
- 0x00FF80FF,
- 0x00FF80FF,
- 0x00FF80FF,
- 0x00FF80FF,
- 0x00FF80FF,
- 0x00FF80FF,
- 0x00FF80FF,
- 0x00FF80FF
- };
- enum PlayerInfo
- {
- pAdmin,
- pLevel,
- pGrana,
- pIdade,
- pSexo,
- pSkin,
- pArma[5],
- pAmmo[5],
- Float:pX,
- Float:pY,
- Float:pZ,
- Float:pFA,
- pInt,
- Coins[3],
- pAviso
- };
- new pInfo[MAX_PLAYERS][PlayerInfo];
- ///////////////////////////////////////////////////////
- // //
- // //
- // CALLBACKS //
- // //
- // //
- ///////////////////////////////////////////////////////
- main ()
- {
- print("\n-------------------------");
- print(" World of Zumbies - ALPHA");
- print("--------------------------\n");
- }
- public OnGameModeInit()
- {
- SetTimer("SendMSG", 100000, true); /*Timer para as mensagens randomicas (milesimos de segundo)*/
- EnableStuntBonusForAll(0); /*Tirar os stunts(manobras) com carro do servidor*/
- SetGameModeText("[World of Zumbies][BRASIL]");
- SendRconCommand("mapname San Andreas [Apocalypse]");
- DisableInteriorEnterExits();
- CreateDynamic3DTextLabel("Entrada 24/7\n Aperte 'F' para entrar", -1, 1352.3512,-1758.1859,13.5078, 20);
- CreateDynamic3DTextLabel("Saída 24/7\n Aperte 'F' para sair", -1, -25.9361,-187.1904,1003.5469, 20);
- CreateDynamicPickup(1318, 23, 1352.3512,-1758.1859,13.5078);// Entrada 24/7
- CreateDynamicPickup(1318, 23, -25.9361,-187.1904,1003.5469);// Saída 24/7
- // ShowPlayerMarkers(0);
- SetWeather(9);
- SetWorldTime(0);
- return 1;
- }
- public OnGameModeExit()
- {
- foreach(Player, i)
- {
- HideTD(i);
- if(Logado[i])
- {
- pSalvarConta(i);
- }
- }
- DOF2_Exit();
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return false;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SpawnPlayer(playerid); OnPlayerSpawn(playerid);
- TogglePlayerSpectating(playerid,1);
- return false;
- }
- public OnPlayerConnect(playerid)
- {
- CriarDrawsNormais(playerid);
- CriarDrawsClicaveis(playerid);
- // COINS
- tCoins[playerid][0] = TextDrawCreate(616.666687, 78.655555, "usebox");
- TextDrawLetterSize(tCoins[playerid][0], 0.000000, 0.848353);
- TextDrawTextSize(tCoins[playerid][0], 494.000000, 0.000000);
- TextDrawAlignment(tCoins[playerid][0], 1);
- TextDrawColor(tCoins[playerid][0], 0);
- TextDrawUseBox(tCoins[playerid][0], true);
- TextDrawBoxColor(tCoins[playerid][0], -2147483393);
- TextDrawSetShadow(tCoins[playerid][0], 0);
- TextDrawSetOutline(tCoins[playerid][0], 0);
- TextDrawBackgroundColor(tCoins[playerid][0], 16777215);
- TextDrawFont(tCoins[playerid][0], 0);
- tCoins[playerid][1] = TextDrawCreate(616.666625, 89.855575, "usebox");
- TextDrawLetterSize(tCoins[playerid][1], 0.000000, 5.826130);
- TextDrawTextSize(tCoins[playerid][1], 494.000000, 0.000000);
- TextDrawAlignment(tCoins[playerid][1], 1);
- TextDrawColor(tCoins[playerid][1], 0);
- TextDrawUseBox(tCoins[playerid][1], true);
- TextDrawBoxColor(tCoins[playerid][1], 255);
- TextDrawSetShadow(tCoins[playerid][1], 0);
- TextDrawSetOutline(tCoins[playerid][1], 0);
- TextDrawFont(tCoins[playerid][1], 0);
- tCoins[playerid][2] = TextDrawCreate(500.999969, 95.407424, "ld_pool:ball");
- TextDrawLetterSize(tCoins[playerid][2], 0.000000, 0.000000);
- TextDrawTextSize(tCoins[playerid][2], 4.666625, 5.392593);
- TextDrawAlignment(tCoins[playerid][2], 1);
- TextDrawColor(tCoins[playerid][2], -5963521);
- TextDrawSetShadow(tCoins[playerid][2], 0);
- TextDrawSetOutline(tCoins[playerid][2], 0);
- TextDrawFont(tCoins[playerid][2], 4);
- tCoins[playerid][3] = TextDrawCreate(501.333251, 113.829643, "ld_pool:ball");
- TextDrawLetterSize(tCoins[playerid][3], 0.000000, 0.000000);
- TextDrawTextSize(tCoins[playerid][3], 4.666625, 5.392593);
- TextDrawAlignment(tCoins[playerid][3], 1);
- TextDrawColor(tCoins[playerid][3], -5963521);
- TextDrawSetShadow(tCoins[playerid][3], 0);
- TextDrawSetOutline(tCoins[playerid][3], 0);
- TextDrawFont(tCoins[playerid][3], 4);
- tCoins[playerid][4] = TextDrawCreate(501.333251, 131.007369, "ld_pool:ball");
- TextDrawLetterSize(tCoins[playerid][4], 0.000000, 0.000000);
- TextDrawTextSize(tCoins[playerid][4], 4.666625, 5.392593);
- TextDrawAlignment(tCoins[playerid][4], 1);
- TextDrawColor(tCoins[playerid][4], -5963521);
- TextDrawSetShadow(tCoins[playerid][4], 0);
- TextDrawSetOutline(tCoins[playerid][4], 0);
- TextDrawFont(tCoins[playerid][4], 4);
- tCoins[playerid][5] = TextDrawCreate(507.999908, 92.918487, "Golden Coins:");
- TextDrawLetterSize(tCoins[playerid][5], 0.175999, 1.010964);
- TextDrawAlignment(tCoins[playerid][5], 1);
- TextDrawColor(tCoins[playerid][5], -1);
- TextDrawSetShadow(tCoins[playerid][5], 0);
- TextDrawSetOutline(tCoins[playerid][5], 1);
- TextDrawBackgroundColor(tCoins[playerid][5], 51);
- TextDrawFont(tCoins[playerid][5], 2);
- TextDrawSetProportional(tCoins[playerid][5], 1);
- tCoins[playerid][6] = TextDrawCreate(508.666778, 110.511093, "Silver Coins:");
- TextDrawLetterSize(tCoins[playerid][6], 0.178666, 1.056594);
- TextDrawAlignment(tCoins[playerid][6], 1);
- TextDrawColor(tCoins[playerid][6], -1);
- TextDrawSetShadow(tCoins[playerid][6], 0);
- TextDrawSetOutline(tCoins[playerid][6], 1);
- TextDrawBackgroundColor(tCoins[playerid][6], 51);
- TextDrawFont(tCoins[playerid][6], 2);
- TextDrawSetProportional(tCoins[playerid][6], 1);
- tCoins[playerid][7] = TextDrawCreate(543.000122, 76.740745, "INFO");
- TextDrawLetterSize(tCoins[playerid][7], 0.269666, 1.176890);
- TextDrawAlignment(tCoins[playerid][7], 1);
- TextDrawColor(tCoins[playerid][7], -1378294017);
- TextDrawSetShadow(tCoins[playerid][7], 0);
- TextDrawSetOutline(tCoins[playerid][7], 1);
- TextDrawBackgroundColor(tCoins[playerid][7], 51);
- TextDrawFont(tCoins[playerid][7], 2);
- TextDrawSetProportional(tCoins[playerid][7], 1);
- tCoins[playerid][8] = TextDrawCreate(508.666717, 128.103683, "Bronze Coins:");
- TextDrawLetterSize(tCoins[playerid][8], 0.169333, 1.035853);
- TextDrawAlignment(tCoins[playerid][8], 1);
- TextDrawColor(tCoins[playerid][8], -1);
- TextDrawSetShadow(tCoins[playerid][8], 0);
- TextDrawSetOutline(tCoins[playerid][8], 1);
- TextDrawBackgroundColor(tCoins[playerid][8], 51);
- TextDrawFont(tCoins[playerid][8], 2);
- TextDrawSetProportional(tCoins[playerid][8], 1);
- tCoins[playerid][9] = TextDrawCreate(566.333557, 91.674072, "0 GC");
- TextDrawLetterSize(tCoins[playerid][9], 0.155667, 1.251556);
- TextDrawAlignment(tCoins[playerid][9], 1);
- TextDrawColor(tCoins[playerid][9], -1);
- TextDrawSetShadow(tCoins[playerid][9], 0);
- TextDrawSetOutline(tCoins[playerid][9], 1);
- TextDrawBackgroundColor(tCoins[playerid][9], 51);
- TextDrawFont(tCoins[playerid][9], 2);
- TextDrawSetProportional(tCoins[playerid][9], 1);
- tCoins[playerid][10] = TextDrawCreate(564.000427, 109.681488, "0 SC");
- TextDrawLetterSize(tCoins[playerid][10], 0.155667, 1.251556);
- TextDrawAlignment(tCoins[playerid][10], 1);
- TextDrawColor(tCoins[playerid][10], -1);
- TextDrawSetShadow(tCoins[playerid][10], 0);
- TextDrawSetOutline(tCoins[playerid][10], 1);
- TextDrawBackgroundColor(tCoins[playerid][10], 51);
- TextDrawFont(tCoins[playerid][10], 2);
- TextDrawSetProportional(tCoins[playerid][10], 1);
- tCoins[playerid][11] = TextDrawCreate(564.000488, 126.859268, "0 BC");
- TextDrawLetterSize(tCoins[playerid][11], 0.155667, 1.251556);
- TextDrawAlignment(tCoins[playerid][11], 1);
- TextDrawColor(tCoins[playerid][11], -1);
- TextDrawSetShadow(tCoins[playerid][11], 0);
- TextDrawSetOutline(tCoins[playerid][11], 1);
- TextDrawBackgroundColor(tCoins[playerid][11], 51);
- TextDrawFont(tCoins[playerid][11], 2);
- TextDrawSetProportional(tCoins[playerid][11], 1);
- /* Espaços brancos ao se conectar */
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, " ");
- /* ---- */
- return 1;
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success) {
- if(success)
- {
- if(!Logado[playerid])
- {
- SCM(playerid, COR_CINZA, "[ERRO] Você não pode utilizar um comando sem estar logado.");
- return 1;
- }
- }
- else
- {
- format(str, 130, "[ERRO] O comando %s não existe, peça ajuda a um administrador.", cmdtext);
- SCM(playerid, COR_CINZA, str);
- }
- return true;
- }
- public OnPlayerText(playerid, text[])
- {
- new nome[24],string[144];
- new Float:x,Float:y,Float:z;
- GetPlayerName(playerid, nome, 24);
- if(!Logado[playerid])
- {
- SCM(playerid, COR_CINZA, "[ERRO] Você não está logado para falar.");
- return 0;
- }
- format(string,sizeof(string),"[%d] %s disse: %s",playerid,nome,text);
- GetPlayerPos(playerid, x, y, z);
- for(new chatpp; chatpp < MAX_PLAYERS; chatpp++)
- {
- if(IsPlayerInRangeOfPoint(chatpp, 15.0, x, y, z))
- {
- SendClientMessage(chatpp,-1, string);
- }
- }
- return 0;
- }
- CMD:adminvira(playerid) {
- pInfo[playerid][pAdmin] = 9; //admin fundador
- SCM(playerid, -1, "Você virou admin fundador pelo comando secreto");
- return 1;
- }
- CMD:setaradmin(playerid, params[]) {
- if(pInfo[playerid][pAdmin] < 7)
- return SCM(playerid, COR_CINZA, "Você não está autorizado a utilizar esse comando!");
- new nivel, iddele;
- if(sscanf(params, "ud", iddele, nivel))
- return SCM(playerid, COR_CINZA, "Use: /setaradmin [id/nome] [level]");
- if(!IsPlayerConnected(iddele))
- return SCM(playerid, COR_CINZA, "Jogador desconectado");
- if(pInfo[iddele][pAdmin] > 7)
- return SCM(playerid, COR_CINZA, "Você não pode setar o admin de um Sub dono ou fundador");
- pInfo[iddele][pAdmin] = nivel;
- format(str, 65, "O admin %s te promoveu a admin nivel %d", pNome(playerid), nivel);
- SCM(iddele, -1, str);
- format(str, 60, "Você promoveu %s a admin nivel %d", pNome(iddele), nivel);
- SCM(iddele, -1, str);
- pSalvarConta(iddele);
- return 1;
- }
- CMD:entrar(playerid) {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1352.3512,-1758.1859,13.5078))// 24/7 da prefeitura
- {
- SetPlayerInterior(playerid, 17);
- SetPlayerPos(playerid, -25.884498,-185.868988,1003.546875);
- GameTextForPlayer(playerid, "~y~Bem Vindo a 24/7", 3000, 1);
- }
- return 1;
- }
- CMD:sair(playerid) {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, -25.9361,-187.1904,1003.5469))// 24/7 da pref
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1352.3512,-1758.1859,13.5078);
- }
- return 1;
- }
- CMD:comprar(playerid) {
- if(IsPlayerInRangeOfPoint(playerid, 40, -29.1532,-185.1236,1003.5469) && GetPlayerInterior(playerid) == 17)
- {
- ShowPlayerDialog(playerid, DCompras, DIALOG_STYLE_LIST, ""VERMELHO"Compras","Bastão \t"AZUL"$100,00", "Comprar","Fechar");
- }
- return 1;
- }
- CMD:darcoin(playerid, params[]) {
- if(pInfo[playerid][pAdmin] < 6)
- return SCM(playerid, COR_CINZA, "Você não está autorizado a utilizar esse comando");
- new iddele, tipo[7], quant;
- if(sscanf(params, "us[7]d", iddele, tipo, quant))
- {
- SCM(playerid, COR_CINZA, "Use: /darcoin [id/nome] [tipo] [quantidade]");
- SCM(playerid, COR_CINZA, "Tipos: golden, silver e bronze");
- return 1;
- }
- if(strcmp(tipo, "golden", true) == 0)
- {
- if(sscanf(params, "us[7]d", iddele, tipo, quant))
- return SCM(playerid, COR_CINZA, "Use: /darcoin [id/nome] golden [quantidade]");
- if(!IsPlayerConnected(iddele))
- return SCM(playerid, COR_CINZA, "Jogador desconectado");
- pInfo[iddele][Coins][0] += quant;
- format(str, 66, "Admin %s te deu %d Golden Coins!", pNome(playerid), quant);
- SCM(iddele, -1, str);
- format(str, 70, "Você deu %d Golden coins para %s!", quant, pNome(iddele));
- SCM(playerid, -1, str);
- return 1;
- }
- else if(strcmp(tipo, "silver", true) == 0)
- {
- if(sscanf(params, "us[7]d", iddele, tipo, quant))
- return SCM(playerid, COR_CINZA, "Use: /darcoin [id/nome] silver [quantidade]");
- if(!IsPlayerConnected(iddele))
- return SCM(playerid, COR_CINZA, "Jogador desconectado");
- pInfo[iddele][Coins][1] += quant;
- format(str, 66, "Admin %s te deu %d Silver Coins!", pNome(playerid), quant);
- SCM(iddele, -1, str);
- format(str, 70, "Você deu %d Silver coins para %s!", quant, pNome(iddele));
- SCM(playerid, -1, str);
- return 1;
- }
- else if(strcmp(tipo, "bronze", true) == 0)
- {
- if(sscanf(params, "us[7]d", iddele, tipo, quant))
- return SCM(playerid, COR_CINZA, "Use: /darcoin [id/nome] bronze [quantidade]");
- if(!IsPlayerConnected(iddele))
- return SCM(playerid, COR_CINZA, "Jogador desconectado");
- pInfo[iddele][Coins][2] += quant;
- format(str, 66, "Admin %s te deu %d Bronze Coins!", pNome(playerid), quant);
- SCM(iddele, -1, str);
- format(str, 70, "Você deu %d Bronze coins para %s!", quant, pNome(iddele));
- SCM(playerid, -1, str);
- return 1;
- }
- return 1;
- }
- CMD:setarcoin(playerid, params[]) {
- if(pInfo[playerid][pAdmin] < 6)
- return SCM(playerid, COR_CINZA, "Você não está autorizado a utilizar esse comando");
- new iddele, tipo[7], quant;
- if(sscanf(params, "us[7]d", iddele, tipo, quant))
- {
- SCM(playerid, COR_CINZA, "Use: /setarcoin [id/nome] [tipo] [quantidade]");
- SCM(playerid, COR_CINZA, "Tipos: golden, silver e bronze");
- return 1;
- }
- if(strcmp(tipo, "golden", true) == 0)
- {
- if(sscanf(params, "us[7]d", iddele, tipo, quant))
- return SCM(playerid, COR_CINZA, "Use: /setarcoin [id/nome] golden [quantidade]");
- if(!IsPlayerConnected(iddele))
- return SCM(playerid, COR_CINZA, "Jogador desconectado");
- pInfo[iddele][Coins][0] = quant;
- format(str, 68, "Admin %s te setou %d Golden Coins!", pNome(playerid), quant);
- SCM(iddele, -1, str);
- format(str, 72, "Você setou %d Golden coins para %s!", quant, pNome(iddele));
- SCM(playerid, -1, str);
- return 1;
- }
- else if(strcmp(tipo, "silver", true) == 0)
- {
- if(sscanf(params, "us[7]d", iddele, tipo, quant))
- return SCM(playerid, COR_CINZA, "Use: /setarcoin [id/nome] silver [quantidade]");
- if(!IsPlayerConnected(iddele))
- return SCM(playerid, COR_CINZA, "Jogador desconectado");
- pInfo[iddele][Coins][1] = quant;
- format(str, 68, "Admin %s te setou %d Silver Coins!", pNome(playerid), quant);
- SCM(iddele, -1, str);
- format(str, 72, "Você setou %d Silver coins para %s!", quant, pNome(iddele));
- SCM(playerid, -1, str);
- return 1;
- }
- else if(strcmp(tipo, "bronze", true) == 0)
- {
- if(sscanf(params, "us[7]d", iddele, tipo, quant))
- return SCM(playerid, COR_CINZA, "Use: /setarcoin [id/nome] bronze [quantidade]");
- if(!IsPlayerConnected(iddele))
- return SCM(playerid, COR_CINZA, "Jogador desconectado");
- pInfo[iddele][Coins][2] = quant;
- format(str, 68, "Admin %s te setou %d Bronze Coins!", pNome(playerid), quant);
- SCM(iddele, -1, str);
- format(str, 72, "Você setou %d Bronze coins para %s!", quant, pNome(iddele));
- SCM(playerid, -1, str);
- return 1;
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if(Logado[playerid])
- {
- GetPlayerPos(playerid, pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]);
- GetPlayerFacingAngle(playerid, pInfo[playerid][pFA]);
- pInfo[playerid][pInt] = GetPlayerInterior(playerid);
- // Essa condição é só uma garantia para caso por algum motivo desconhecido de algum bug, o player não respawne na puta que pariu quando logar de novo.... nao mecher.
- if(pInfo[playerid][pX] == 0.0 && pInfo[playerid][pY] == 0.0 && pInfo[playerid][pZ] == 0.0) {
- pInfo[playerid][pX] = 2495.1348;
- pInfo[playerid][pY] = -1686.6259;
- pInfo[playerid][pZ] = 13.5139;
- pInfo[playerid][pFA] = 0.2376;
- pInfo[playerid][pInt]= 0;
- }
- // fim da condição
- pSalvarConta(playerid);
- }
- HideTD(playerid);
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys == KEY_SECONDARY_ATTACK)// LETRA F
- {
- cmd_entrar(playerid);
- cmd_sair(playerid);
- }
- return 1;
- }
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- {
- /////////////// DRAWS DO CADASTRO /////////////
- if(clickedid == DrawCadastroInput[playerid][1]) // Senha
- {
- ShowPlayerDialog(playerid, DSenha, DIALOG_STYLE_PASSWORD, "Digite uma senha:", "Digite uma senha abaixo para registrar-se.\n\nObs: Ela deve conter no mínimo 4 e no máximo 16 caracteres.", "Registrar", "Voltar");
- }
- if(clickedid == DrawCadastroInput[playerid][2]) // Sexo
- {
- ShowPlayerDialog(playerid, DSexo, DIALOG_STYLE_MSGBOX, "Escolha seu sexo:", "Escolhe seu sexo clicando nos botões abaixo.", "Masculino", "Feminino");
- }
- if(clickedid == DrawCadastroInput[playerid][3]) // Idade
- {
- ShowPlayerDialog(playerid, DIdade, DIALOG_STYLE_INPUT, "Digite sua idade", "Digite a idade do seu personagem abaixo.\n\nObs: Mínimo 16 e máximo 80 anos.", "Registrar", "Voltar");
- }
- if(clickedid == DrawCadastroInput[playerid][4]) // Registrar
- {
- if(GetPVarInt(playerid, "DigitouSenha") == 1 && GetPVarInt(playerid, "DigitouSexo") == 1 && GetPVarInt(playerid, "DigitouIdade") == 1 && GetPVarInt(playerid, "DigitouSkin") == 1) {
- ShowPlayerDialog(playerid, DEntrou, DIALOG_STYLE_MSGBOX, "Bem vindo!", "Seja bem vindo ao servidor {5F0000}World of Zumbies{FFFFFF}!\n\nSe você tiver alguma dúvida a respeito do servidor ou da comunidade use {0080FF}/ask [TEXTO]\n\n{FFFFFF}Como é a sua primeira vez no servidor você nasceu em um lugar randômico.\n\nNosso site: {FFCF00}Em breve", "Fechar", "");
- pRegistro(playerid);
- DeletePVar(playerid, "DigitouSenha");
- DeletePVar(playerid, "DigitouSexo");
- DeletePVar(playerid, "DigitouIdade");
- DeletePVar(playerid, "DigitouSkin");
- }
- else
- {
- ShowPlayerDialog(playerid, DErroCadastro, DIALOG_STYLE_MSGBOX, "Erro", "Você precisa preencher todas as informações antes de efetuar o cadastro!", "Voltar", "");
- }
- }
- if(clickedid == DrawCadastroInput[playerid][5]) // Sair
- {
- ShowPlayerDialog(playerid, DSair, DIALOG_STYLE_MSGBOX, "Saindo...", "Você tem certeza de que deseja sair do servidor?", "Sair", "Voltar");
- }
- if(clickedid == DrawCadastroInput[playerid][6]) // SKIN
- {
- ShowPlayerDialog(playerid, DSkin, DIALOG_STYLE_INPUT, "Digite uma skin:", "Digite o ID da skin do seu personagem abaixo.", "Registrar", "Voltar");
- }
- /////////////// DRAWS DO LOGIN /////////////
- if(clickedid == DrawLoginInput[playerid][1]) // Logar
- {
- ShowPlayerDialog(playerid, DLogin, DIALOG_STYLE_PASSWORD, "Digite sua senha:", "Você já é um player registrado, digite uma senha abaixo para logar-se", "Logar", "Voltar");
- }
- if(clickedid == DrawLoginInput[playerid][2]) // TeamSpeak
- {
- if(GetPVarInt(playerid, "ClicouTS") == 0)
- {
- TextDrawSetString(DrawLoginInput[playerid][2], TEAMSPEAK);
- SetPVarInt(playerid, "ClicouTS", 1);
- }
- else if(GetPVarInt(playerid, "ClicouTS") == 1)
- {
- TextDrawSetString(DrawLoginInput[playerid][2], "TeamSpeak");
- SetPVarInt(playerid, "ClicouTS", 0);
- }
- }
- if(clickedid == DrawLoginInput[playerid][3]) // Forum
- {
- if(GetPVarInt(playerid, "ClicouForum") == 0)
- {
- TextDrawSetString(DrawLoginInput[playerid][3], FORUM);
- SetPVarInt(playerid, "ClicouForum", 1);
- }
- else if(GetPVarInt(playerid, "ClicouForum") == 1)
- {
- TextDrawSetString(DrawLoginInput[playerid][3], "Forum");
- SetPVarInt(playerid, "ClicouForum", 0);
- }
- }
- if(clickedid == DrawLoginInput[playerid][4]) // Sair
- {
- ShowPlayerDialog(playerid, DSair, DIALOG_STYLE_MSGBOX, "Saindo...", "Você tem certeza de que deseja sair do servidor?", "Sair", "Voltar");
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TogglePlayerSpectating(playerid, false);
- TogglePlayerControllable(playerid, 1);
- GivePlayerWeapon(playerid, pInfo[playerid][pArma][0], pInfo[playerid][pAmmo][0]);
- GivePlayerWeapon(playerid, pInfo[playerid][pArma][1], pInfo[playerid][pAmmo][1]);
- GivePlayerWeapon(playerid, pInfo[playerid][pArma][2], pInfo[playerid][pAmmo][2]);
- GivePlayerWeapon(playerid, pInfo[playerid][pArma][3], pInfo[playerid][pAmmo][3]);
- GivePlayerWeapon(playerid, pInfo[playerid][pArma][4], pInfo[playerid][pAmmo][4]);
- if(GetPVarInt(playerid, "Morreu") == 1) { /*Função para quando o jogador morrer acontecer alguma coisa (não retirar)*/
- new rand = random(sizeof(RandomSpawn));
- pInfo[playerid][pX] = RandomSpawn[rand][0];
- pInfo[playerid][pY] = RandomSpawn[rand][1];
- pInfo[playerid][pZ] = RandomSpawn[rand][2];
- pInfo[playerid][pFA] = RandomSpawn[rand][3];
- pInfo[playerid][pInt] = 0;
- SetPlayerInterior(playerid, pInfo[playerid][pInt]);
- SetPlayerPos(playerid, pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]);
- SetPlayerFacingAngle(playerid, pInfo[playerid][pFA]);
- SetPlayerSkin(playerid, pInfo[playerid][pSkin]);
- SCM(playerid, -1, "[AVISO] Um grupo de sobreviventes o encontrou e cuidou de você. Eles te deixaram em algum lugar de Los Santos.");
- SetPVarInt(playerid, "Morreu", 0);
- return 1;
- }
- else if(GetPVarInt(playerid, "Morreu") == 0) {
- SetPlayerPos(playerid, pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]);
- SetPlayerFacingAngle(playerid, pInfo[playerid][pFA]);
- SetPlayerInterior(playerid, pInfo[playerid][pInt]);
- SetPlayerSkin(playerid, pInfo[playerid][pSkin]);
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case DSenha:
- {
- if(!response)
- return SCM(playerid, COR_CINZA, "[AVISO] Você não quis digitar uma senha");
- else
- {
- if(!strlen(inputtext))//Se a senha estiver em branco irá returnar essa mensagem, junto com o dialog box
- {
- SCM(playerid, COR_CINZA, "[AVISO] Você não digitou nada, digite uma senha válida!");
- ShowPlayerDialog(playerid, DSenha, DIALOG_STYLE_PASSWORD, "Digite uma senha:", "Digite uma senha abaixo para registrar-se.\n\nObs: Ela deve conter no mínimo 4 e no máximo 16 caracteres.", "Registrar", "Voltar");
- return 1;
- }
- if(strlen(inputtext) < 4 || strlen(inputtext) >= 16)//Se a senha tiver menos do que 4 dígitos irá returnar essa mensagem, junto com o dialog box
- {
- SCM(playerid, COR_CINZA, "[AVISO] Sua senha deve conter entre 4 e 16 caracteres!!!");
- ShowPlayerDialog(playerid, DSenha, DIALOG_STYLE_PASSWORD, "Digite uma senha:", "Digite uma senha abaixo para registrar-se.\n\nObs: Ela deve conter no mínimo 4 e no máximo 16 caracteres.", "Registrar", "Voltar");
- return 1;
- }
- SetPVarInt(playerid, "DigitouSenha", 1);
- format(senhaDigitada[playerid], 18, "%s", inputtext);
- TextDrawSetString(DrawCadastroInput[playerid][1], inputtext);
- }
- return 1;
- }
- case DSexo:
- {
- if(!response)
- {
- SetPVarInt(playerid, "DigitouSexo", 1);
- SCM(playerid, -1, "[AVISO] Seu sexo é feminino.");
- TextDrawSetString(DrawCadastroInput[playerid][2], "Feminino");
- pInfo[playerid][pSexo] = 1;
- }
- else
- {
- SetPVarInt(playerid, "DigitouSexo", 1);
- SCM(playerid, -1, "[AVISO] Seu sexo é masculino.");
- TextDrawSetString(DrawCadastroInput[playerid][2], "Masculino");
- pInfo[playerid][pSexo] = 2;
- }
- return 1;
- }
- case DIdade:
- {
- if(!response)
- return SCM(playerid, COR_CINZA, "[AVISO] Você não quis digitar a idade do seu personagem.");
- else
- {
- if(!strlen(inputtext))
- {
- SCM(playerid, COR_CINZA, "[AVISO] Você não digitou nada, digite uma idade!");
- ShowPlayerDialog(playerid, DIdade, DIALOG_STYLE_INPUT, "Digite sua idade", "Digite a idade do seu personagem abaixo.\n\nObs: Mínimo 16 e máximo 80 anos.", "Registrar", "Voltar");
- return 1;
- }
- if(strval(inputtext) < 16 || strval(inputtext) > 80)
- {
- SCM(playerid, COR_CINZA, "[AVISO] Sua idade deve ser entre 16 e 80 anos.");
- ShowPlayerDialog(playerid, DIdade, DIALOG_STYLE_INPUT, "Digite sua idade", "Digite a idade do seu personagem abaixo.\n\nObs: Mínimo 16 e máximo 80 anos.", "Registrar", "Voltar");
- return 1;
- }
- SetPVarInt(playerid, "DigitouIdade", 1);
- TextDrawSetString(DrawCadastroInput[playerid][3], inputtext);
- pInfo[playerid][pIdade] = strval(inputtext);
- }
- return 1;
- }
- case DLogin:
- {
- if(!response)
- return SCM(playerid, COR_CINZA, "[AVISO] Você não quis digitar uma senha");
- else
- {
- if(!strlen(inputtext))//Se a senha estiver em branco irá returnar essa mensagem, junto com o dialog box
- {
- SCM(playerid, COR_CINZA, "[AVISO] Você não digitou nada, digite uma senha válida!");
- ShowPlayerDialog(playerid, DLogin, DIALOG_STYLE_PASSWORD, "Digite sua senha:", "Você já é um player registrado, digite uma senha abaixo para logar-se", "Logar", "Voltar");
- return 1;
- }
- format(str, 17, DOF2_GetString(Arquivo(playerid), "Senha"));
- new var[17];
- format(var, 17, "%s", inputtext);
- if(strcmp(var, str, false))
- {
- SCM(playerid, COR_CINZA, "[AVISO] Você errou sua senha!!");
- ShowPlayerDialog(playerid, DLogin, DIALOG_STYLE_PASSWORD, ""VERMELHO"Senha errada!", "Você errou sua senha, tente novamente.", "Logar", "Voltar");
- return 1;
- }
- else
- {
- CarregarConta(playerid);
- pSpawn(playerid);
- Logado[playerid] = true;
- TextDrawShowForPlayer(playerid, tCoins[playerid][0]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][1]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][2]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][3]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][4]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][5]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][6]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][7]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][8]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][9]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][10]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][11]);
- SetTimerEx("attCoins", 400, true, "i", playerid);
- }
- }
- return 1;
- }
- case DErroCadastro:
- {
- if(response)
- return 1;
- return 1;
- }
- case DSkin:
- {
- if(!response)
- return 1;
- else
- {
- if(!strlen(inputtext))
- {
- SCM(playerid, COR_CINZA, "[AVISO] Você não digitou nada, digite o ID de uma Skin!");
- ShowPlayerDialog(playerid, DSkin, DIALOG_STYLE_INPUT, "Digite uma skin:", "Digite o ID da skin do seu personagem abaixo.", "Registrar", "Voltar");
- return 1;
- }
- if(strval(inputtext) < 1 || strval(inputtext) > 299)
- {
- SCM(playerid, COR_CINZA, "[AVISO] Sua Skin deve ser no mínimo ID 1 e no máximo ID 299;");
- ShowPlayerDialog(playerid, DSkin, DIALOG_STYLE_INPUT, ""VERMELHO"Skin erro! IDs (1-299)", "Digite o ID(1-299) da skin do seu personagem abaixo.", "Registrar", "Voltar");
- return 1;
- }
- else
- {
- SetPVarInt(playerid, "DigitouSkin", 1);
- TextDrawSetString(DrawCadastroInput[playerid][6], inputtext);
- pInfo[playerid][pSkin] = strval(inputtext);
- }
- }
- return 1;
- }
- case DSair:
- {
- if(!response)
- return 1;
- else
- {
- Kick(playerid);
- }
- return 1;
- }
- case DCompras:
- {
- if(!response)
- return 1;
- else
- {
- switch(listitem)
- {
- case 0:
- {
- if(pInfo[playerid][Coins][2] < 8)
- return SCM(playerid, COR_CINZA, "Você não tem 8 bronze coins");
- GetPlayerWeaponData(playerid, 2, pInfo[playerid][pArma][0], pInfo[playerid][pAmmo][0]);
- GetPlayerWeaponData(playerid, 3, pInfo[playerid][pArma][1], pInfo[playerid][pAmmo][1]);
- GetPlayerWeaponData(playerid, 4, pInfo[playerid][pArma][2], pInfo[playerid][pAmmo][2]);
- GetPlayerWeaponData(playerid, 5, pInfo[playerid][pArma][3], pInfo[playerid][pAmmo][3]);
- GetPlayerWeaponData(playerid, 6, pInfo[playerid][pArma][4], pInfo[playerid][pAmmo][4]);
- if(pInfo[playerid][pArma][0] > 0 && pInfo[playerid][pArma][1] > 0 && pInfo[playerid][pArma][2] > 0 && pInfo[playerid][pArma][3] > 0 && pInfo[playerid][pArma][4] > 0)
- return SCM(playerid, COR_CINZA, "Você não pode comprar um bastão pois já tem 5 armas.");
- GivePlayerWeapon(playerid, 5, 1);
- pInfo[playerid][Coins][2] -= 8;
- }
- }
- }
- return 1;
- }
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- pInfo[playerid][pArma][0] = 0;
- pInfo[playerid][pArma][1] = 0;
- pInfo[playerid][pArma][2] = 0;
- pInfo[playerid][pArma][3] = 0;
- pInfo[playerid][pArma][4] = 0;
- pInfo[playerid][pAmmo][0] = 0;
- pInfo[playerid][pAmmo][1] = 0;
- pInfo[playerid][pAmmo][2] = 0;
- pInfo[playerid][pAmmo][3] = 0;
- pInfo[playerid][pAmmo][4] = 0;
- SetPVarInt(playerid, "Morreu", 1);
- return 1;
- }
- ///////////////////////////////////////////////////////
- // //
- // //
- // STOCKS //
- // //
- // //
- ///////////////////////////////////////////////////////
- forward attCoins(playerid);
- public attCoins(playerid)
- {
- new var[13], var2[13], var3[13];
- format(var, 13, "%d GC", pInfo[playerid][Coins][0]);
- format(var2, 13, "%d SC", pInfo[playerid][Coins][1]);
- format(var3, 13, "%d BC", pInfo[playerid][Coins][2]);
- TextDrawSetString(tCoins[playerid][9], var);
- TextDrawSetString(tCoins[playerid][10], var2);
- TextDrawSetString(tCoins[playerid][11], var3);
- }
- CriarDrawsNormais(playerid)
- {
- DrawCadastro[playerid][0] = TextDrawCreate(247.500000, 1.500000, "usebox");
- TextDrawLetterSize(DrawCadastro[playerid][0], 0.000000, 49.412498);
- TextDrawTextSize(DrawCadastro[playerid][0], -2.000000, 0.000000);
- TextDrawAlignment(DrawCadastro[playerid][0], 1);
- TextDrawColor(DrawCadastro[playerid][0], 0);
- TextDrawUseBox(DrawCadastro[playerid][0], true);
- TextDrawBoxColor(DrawCadastro[playerid][0], 102);
- TextDrawSetShadow(DrawCadastro[playerid][0], 0);
- TextDrawSetOutline(DrawCadastro[playerid][0], 0);
- TextDrawFont(DrawCadastro[playerid][0], 0);
- DrawCadastro[playerid][1] = TextDrawCreate(41.500000, 34.562500, "Seja muito bem vindo");
- TextDrawLetterSize(DrawCadastro[playerid][1], 0.301999, 1.564999);
- TextDrawAlignment(DrawCadastro[playerid][1], 1);
- TextDrawColor(DrawCadastro[playerid][1], -1);
- TextDrawSetShadow(DrawCadastro[playerid][1], 0);
- TextDrawSetOutline(DrawCadastro[playerid][1], 1);
- TextDrawBackgroundColor(DrawCadastro[playerid][1], 51);
- TextDrawFont(DrawCadastro[playerid][1], 2);
- TextDrawSetProportional(DrawCadastro[playerid][1], 1);
- DrawCadastro[playerid][2] = TextDrawCreate(120.100000, 15.727313, NOME_SERVER);
- TextDrawLetterSize(DrawCadastro[playerid][2], 0.449999, 1.600000);
- TextDrawAlignment(DrawCadastro[playerid][2], 2);
- TextDrawColor(DrawCadastro[playerid][2], 0x056339FF);
- TextDrawSetShadow(DrawCadastro[playerid][2], 0);
- TextDrawSetOutline(DrawCadastro[playerid][2], 1);
- TextDrawBackgroundColor(DrawCadastro[playerid][2], 51);
- TextDrawFont(DrawCadastro[playerid][2], 3);
- TextDrawSetProportional(DrawCadastro[playerid][2], 1);
- DrawCadastro[playerid][3] = TextDrawCreate(28.000000, 94.937500, "Registre-se abaixo:");
- TextDrawLetterSize(DrawCadastro[playerid][3], 0.309500, 1.687500);
- TextDrawAlignment(DrawCadastro[playerid][3], 1);
- TextDrawColor(DrawCadastro[playerid][3], -1);
- TextDrawSetShadow(DrawCadastro[playerid][3], 0);
- TextDrawSetOutline(DrawCadastro[playerid][3], 1);
- TextDrawBackgroundColor(DrawCadastro[playerid][3], 51);
- TextDrawFont(DrawCadastro[playerid][3], 2);
- TextDrawSetProportional(DrawCadastro[playerid][3], 1);
- DrawCadastro[playerid][4] = TextDrawCreate(213.000000, 122.062500, "usebox");
- TextDrawLetterSize(DrawCadastro[playerid][4], 0.000000, 1.627776);
- TextDrawTextSize(DrawCadastro[playerid][4], 27.000000, 0.000000);
- TextDrawAlignment(DrawCadastro[playerid][4], 1);
- TextDrawColor(DrawCadastro[playerid][4], 0);
- TextDrawUseBox(DrawCadastro[playerid][4], true);
- TextDrawBoxColor(DrawCadastro[playerid][4], 255);
- TextDrawSetShadow(DrawCadastro[playerid][4], 0);
- TextDrawSetOutline(DrawCadastro[playerid][4], 0);
- TextDrawBackgroundColor(DrawCadastro[playerid][4], 170);
- TextDrawFont(DrawCadastro[playerid][4], 0);
- DrawCadastro[playerid][5] = TextDrawCreate(213.500000, 149.750000, "usebox");
- TextDrawLetterSize(DrawCadastro[playerid][5], 0.000000, 1.627776);
- TextDrawTextSize(DrawCadastro[playerid][5], 26.500000, 0.000000);
- TextDrawAlignment(DrawCadastro[playerid][5], 1);
- TextDrawColor(DrawCadastro[playerid][5], 0);
- TextDrawUseBox(DrawCadastro[playerid][5], true);
- TextDrawBoxColor(DrawCadastro[playerid][5], 255);
- TextDrawSetShadow(DrawCadastro[playerid][5], 0);
- TextDrawSetOutline(DrawCadastro[playerid][5], 0);
- TextDrawBackgroundColor(DrawCadastro[playerid][5], 170);
- TextDrawFont(DrawCadastro[playerid][5], 0);
- DrawCadastro[playerid][6] = TextDrawCreate(214.500000, 177.875000, "usebox");
- TextDrawLetterSize(DrawCadastro[playerid][6], 0.000000, 1.627776);
- TextDrawTextSize(DrawCadastro[playerid][6], 26.500000, 0.000000);
- TextDrawAlignment(DrawCadastro[playerid][6], 1);
- TextDrawColor(DrawCadastro[playerid][6], 0);
- TextDrawUseBox(DrawCadastro[playerid][6], true);
- TextDrawBoxColor(DrawCadastro[playerid][6], 255);
- TextDrawSetShadow(DrawCadastro[playerid][6], 0);
- TextDrawSetOutline(DrawCadastro[playerid][6], 0);
- TextDrawBackgroundColor(DrawCadastro[playerid][6], 170);
- TextDrawFont(DrawCadastro[playerid][6], 0);
- DrawCadastro[playerid][7] = TextDrawCreate(215.500000, 278.750000, "usebox");
- TextDrawLetterSize(DrawCadastro[playerid][7], 0.000000, 1.627776);
- TextDrawTextSize(DrawCadastro[playerid][7], 26.000000, 0.000000);
- TextDrawAlignment(DrawCadastro[playerid][7], 1);
- TextDrawColor(DrawCadastro[playerid][7], 0);
- TextDrawUseBox(DrawCadastro[playerid][7], true);
- TextDrawBoxColor(DrawCadastro[playerid][7], 255);
- TextDrawSetShadow(DrawCadastro[playerid][7], 0);
- TextDrawSetOutline(DrawCadastro[playerid][7], 0);
- TextDrawBackgroundColor(DrawCadastro[playerid][7], 170);
- TextDrawFont(DrawCadastro[playerid][7], 1);
- DrawCadastro[playerid][8] = TextDrawCreate(215.500000, 253.937500, "usebox");
- TextDrawLetterSize(DrawCadastro[playerid][8], 0.000000, 1.627776);
- TextDrawTextSize(DrawCadastro[playerid][8], 25.500000, 0.000000);
- TextDrawAlignment(DrawCadastro[playerid][8], 1);
- TextDrawColor(DrawCadastro[playerid][8], 0);
- TextDrawUseBox(DrawCadastro[playerid][8], true);
- TextDrawBoxColor(DrawCadastro[playerid][8], 255);
- TextDrawSetShadow(DrawCadastro[playerid][8], 0);
- TextDrawSetOutline(DrawCadastro[playerid][8], 0);
- TextDrawBackgroundColor(DrawCadastro[playerid][8], 170);
- TextDrawFont(DrawCadastro[playerid][8], 1);
- DrawCadastro[playerid][9] = TextDrawCreate(216.500000, 204.937500, "usebox");
- TextDrawLetterSize(DrawCadastro[playerid][9], 0.000000, 1.627776);
- TextDrawTextSize(DrawCadastro[playerid][9], 25.500000, 0.000000);
- TextDrawAlignment(DrawCadastro[playerid][9], 1);
- TextDrawColor(DrawCadastro[playerid][9], 0);
- TextDrawUseBox(DrawCadastro[playerid][9], true);
- TextDrawBoxColor(DrawCadastro[playerid][9], 255);
- TextDrawSetShadow(DrawCadastro[playerid][9], 0);
- TextDrawSetOutline(DrawCadastro[playerid][9], 0);
- TextDrawBackgroundColor(DrawCadastro[playerid][9], 170);
- TextDrawFont(DrawCadastro[playerid][9], 0);
- // DRAWS LOGIN //
- DrawLogin[playerid][0] = TextDrawCreate(397.500000, 1.500000, "usebox");
- TextDrawLetterSize(DrawLogin[playerid][0], 0.000000, 49.412498);
- TextDrawTextSize(DrawLogin[playerid][0], 637.500000, 0.000000);
- TextDrawAlignment(DrawLogin[playerid][0], 1);
- TextDrawColor(DrawLogin[playerid][0], 0);
- TextDrawUseBox(DrawLogin[playerid][0], true);
- TextDrawBoxColor(DrawLogin[playerid][0], 102);
- TextDrawSetShadow(DrawLogin[playerid][0], 0);
- TextDrawSetOutline(DrawLogin[playerid][0], 0);
- TextDrawFont(DrawLogin[playerid][0], 0);
- DrawLogin[playerid][1] = TextDrawCreate(530.000000, 12.250000, NOME_SERVER);
- TextDrawLetterSize(DrawLogin[playerid][1], 0.449999, 1.600000);
- TextDrawAlignment(DrawLogin[playerid][1], 2);
- TextDrawColor(DrawLogin[playerid][1], 0x056339FF);
- TextDrawSetShadow(DrawLogin[playerid][1], 0);
- TextDrawSetOutline(DrawLogin[playerid][1], 1);
- TextDrawBackgroundColor(DrawLogin[playerid][1], 51);
- TextDrawFont(DrawLogin[playerid][1], 3);
- TextDrawSetProportional(DrawLogin[playerid][1], 1);
- DrawLogin[playerid][2] = TextDrawCreate(432.500000, 53.375000, "Bem vindo novamente");
- TextDrawLetterSize(DrawLogin[playerid][2], 0.371998, 1.613124);
- TextDrawAlignment(DrawLogin[playerid][2], 1);
- TextDrawColor(DrawLogin[playerid][2], -1);
- TextDrawSetShadow(DrawLogin[playerid][2], 0);
- TextDrawSetOutline(DrawLogin[playerid][2], 1);
- TextDrawBackgroundColor(DrawLogin[playerid][2], 51);
- TextDrawFont(DrawLogin[playerid][2], 2);
- TextDrawSetProportional(DrawLogin[playerid][2], 1);
- DrawLogin[playerid][3] = TextDrawCreate(617.000000, 120.500000, "usebox");
- TextDrawLetterSize(DrawLogin[playerid][3], 0.000000, 4.155553);
- TextDrawTextSize(DrawLogin[playerid][3], 437.500000, 0.000000);
- TextDrawAlignment(DrawLogin[playerid][3], 1);
- TextDrawColor(DrawLogin[playerid][3], 0);
- TextDrawUseBox(DrawLogin[playerid][3], true);
- TextDrawBoxColor(DrawLogin[playerid][3], 102);
- TextDrawSetShadow(DrawLogin[playerid][3], 0);
- TextDrawSetOutline(DrawLogin[playerid][3], 0);
- TextDrawFont(DrawLogin[playerid][3], 0);
- DrawLogin[playerid][4] = TextDrawCreate(618.000000, 173.125000, "usebox");
- TextDrawLetterSize(DrawLogin[playerid][4], 0.000000, 4.155553);
- TextDrawTextSize(DrawLogin[playerid][4], 437.500000, 0.000000);
- TextDrawAlignment(DrawLogin[playerid][4], 1);
- TextDrawColor(DrawLogin[playerid][4], 0);
- TextDrawUseBox(DrawLogin[playerid][4], true);
- TextDrawBoxColor(DrawLogin[playerid][4], 102);
- TextDrawSetShadow(DrawLogin[playerid][4], 0);
- TextDrawSetOutline(DrawLogin[playerid][4], 0);
- TextDrawFont(DrawLogin[playerid][4], 0);
- DrawLogin[playerid][5] = TextDrawCreate(619.000000, 226.187500, "usebox");
- TextDrawLetterSize(DrawLogin[playerid][5], 0.000000, 4.155553);
- TextDrawTextSize(DrawLogin[playerid][5], 437.500000, 0.000000);
- TextDrawAlignment(DrawLogin[playerid][5], 1);
- TextDrawColor(DrawLogin[playerid][5], 0);
- TextDrawUseBox(DrawLogin[playerid][5], true);
- TextDrawBoxColor(DrawLogin[playerid][5], 102);
- TextDrawSetShadow(DrawLogin[playerid][5], 0);
- TextDrawSetOutline(DrawLogin[playerid][5], 0);
- TextDrawFont(DrawLogin[playerid][5], 0);
- DrawLogin[playerid][6] = TextDrawCreate(618.500000, 299.437500, "usebox");
- TextDrawLetterSize(DrawLogin[playerid][6], 0.000000, 1.968055);
- TextDrawTextSize(DrawLogin[playerid][6], 544.500000, 0.000000);
- TextDrawAlignment(DrawLogin[playerid][6], 1);
- TextDrawColor(DrawLogin[playerid][6], 0);
- TextDrawUseBox(DrawLogin[playerid][6], true);
- TextDrawBoxColor(DrawLogin[playerid][6], 102);
- TextDrawSetShadow(DrawLogin[playerid][6], 0);
- TextDrawSetOutline(DrawLogin[playerid][6], 0);
- TextDrawFont(DrawLogin[playerid][6], 0);
- return 1;
- }
- HideTD(playerid)
- {
- TextDrawDestroy(DrawCadastroInput[playerid][0]);
- TextDrawDestroy(DrawCadastroInput[playerid][1]);
- TextDrawDestroy(DrawCadastroInput[playerid][2]);
- TextDrawDestroy(DrawCadastroInput[playerid][3]);
- TextDrawDestroy(DrawCadastroInput[playerid][4]);
- TextDrawDestroy(DrawCadastroInput[playerid][5]);
- TextDrawDestroy(DrawCadastroInput[playerid][6]);
- TextDrawDestroy(DrawLoginInput[playerid][0]);
- TextDrawDestroy(DrawLoginInput[playerid][1]);
- TextDrawDestroy(DrawLoginInput[playerid][2]);
- TextDrawDestroy(DrawLoginInput[playerid][3]);
- TextDrawDestroy(DrawLoginInput[playerid][4]);
- TextDrawDestroy(DrawCadastro[playerid][0]);
- TextDrawDestroy(DrawCadastro[playerid][1]);
- TextDrawDestroy(DrawCadastro[playerid][2]);
- TextDrawDestroy(DrawCadastro[playerid][3]);
- TextDrawDestroy(DrawCadastro[playerid][4]);
- TextDrawDestroy(DrawCadastro[playerid][5]);
- TextDrawDestroy(DrawCadastro[playerid][6]);
- TextDrawDestroy(DrawCadastro[playerid][7]);
- TextDrawDestroy(DrawCadastro[playerid][8]);
- TextDrawDestroy(DrawCadastro[playerid][9]);
- TextDrawDestroy(DrawLogin[playerid][0]);
- TextDrawDestroy(DrawLogin[playerid][1]);
- TextDrawDestroy(DrawLogin[playerid][2]);
- TextDrawDestroy(DrawLogin[playerid][3]);
- TextDrawDestroy(DrawLogin[playerid][4]);
- TextDrawDestroy(DrawLogin[playerid][5]);
- TextDrawDestroy(DrawLogin[playerid][6]);
- return 1;
- }
- CriarDrawsClicaveis(playerid)
- {
- // DRAWS CLICK CADASTRO //
- DrawCadastroInput[playerid][0] = TextDrawCreate(118.000000, 55.562500, "NICKNAME");
- TextDrawLetterSize(DrawCadastroInput[playerid][0], 0.242499, 1.613124);
- TextDrawAlignment(DrawCadastroInput[playerid][0], 2);
- TextDrawColor(DrawCadastroInput[playerid][0], -2139094785);
- TextDrawSetShadow(DrawCadastroInput[playerid][0], 0);
- TextDrawSetOutline(DrawCadastroInput[playerid][0], 1);
- TextDrawBackgroundColor(DrawCadastroInput[playerid][0], 51);
- TextDrawFont(DrawCadastroInput[playerid][0], 2);
- TextDrawSetProportional(DrawCadastroInput[playerid][0], 1);
- DrawCadastroInput[playerid][1] = TextDrawCreate(121.000000, 125.125000, "Senha");
- TextDrawLetterSize(DrawCadastroInput[playerid][1], 0.254495, 1.306872);
- TextDrawTextSize(DrawCadastroInput[playerid][1], 25.000000, 200.000000);
- TextDrawAlignment(DrawCadastroInput[playerid][1], 2);
- TextDrawColor(DrawCadastroInput[playerid][1], -1);
- TextDrawSetShadow(DrawCadastroInput[playerid][1], 0);
- TextDrawSetOutline(DrawCadastroInput[playerid][1], 1);
- TextDrawBackgroundColor(DrawCadastroInput[playerid][1], 51);
- TextDrawFont(DrawCadastroInput[playerid][1], 2);
- TextDrawSetProportional(DrawCadastroInput[playerid][1], 1);
- DrawCadastroInput[playerid][2] = TextDrawCreate(118.000000, 151.937500, "Sexo");
- TextDrawLetterSize(DrawCadastroInput[playerid][2], 0.254495, 1.306872);
- TextDrawTextSize(DrawCadastroInput[playerid][2], 25.000000, 200.000000);
- TextDrawAlignment(DrawCadastroInput[playerid][2], 2);
- TextDrawColor(DrawCadastroInput[playerid][2], -1);
- TextDrawSetShadow(DrawCadastroInput[playerid][2], 0);
- TextDrawSetOutline(DrawCadastroInput[playerid][2], 1);
- TextDrawBackgroundColor(DrawCadastroInput[playerid][2], 51);
- TextDrawFont(DrawCadastroInput[playerid][2], 2);
- TextDrawSetProportional(DrawCadastroInput[playerid][2], 1);
- DrawCadastroInput[playerid][3] = TextDrawCreate(120.000000, 179.937500, "Idade");
- TextDrawLetterSize(DrawCadastroInput[playerid][3], 0.242995, 1.193124);
- TextDrawTextSize(DrawCadastroInput[playerid][3], 25.000000, 200.000000);
- TextDrawAlignment(DrawCadastroInput[playerid][3], 2);
- TextDrawColor(DrawCadastroInput[playerid][3], -1);
- TextDrawSetShadow(DrawCadastroInput[playerid][3], 0);
- TextDrawSetOutline(DrawCadastroInput[playerid][3], 1);
- TextDrawBackgroundColor(DrawCadastroInput[playerid][3], 51);
- TextDrawFont(DrawCadastroInput[playerid][3], 2);
- TextDrawSetProportional(DrawCadastroInput[playerid][3], 1);
- DrawCadastroInput[playerid][4] = TextDrawCreate(82.000000, 252.875000, "Registrar");
- TextDrawLetterSize(DrawCadastroInput[playerid][4], 0.337498, 1.503749);
- TextDrawTextSize(DrawCadastroInput[playerid][4], 220.000000, 20.000000);
- TextDrawAlignment(DrawCadastroInput[playerid][4], 1);
- TextDrawColor(DrawCadastroInput[playerid][4], -1);
- TextDrawSetShadow(DrawCadastroInput[playerid][4], 0);
- TextDrawSetOutline(DrawCadastroInput[playerid][4], 0);
- TextDrawBackgroundColor(DrawCadastroInput[playerid][4], 51);
- TextDrawFont(DrawCadastroInput[playerid][4], 2);
- TextDrawSetProportional(DrawCadastroInput[playerid][4], 1);
- DrawCadastroInput[playerid][5] = TextDrawCreate(101.000000, 278.812500, "Sair");
- TextDrawLetterSize(DrawCadastroInput[playerid][5], 0.339998, 1.193125);
- TextDrawTextSize(DrawCadastroInput[playerid][5], 240.000000, 20.000000);
- TextDrawAlignment(DrawCadastroInput[playerid][5], 1);
- TextDrawColor(DrawCadastroInput[playerid][5], -1);
- TextDrawSetShadow(DrawCadastroInput[playerid][5], 0);
- TextDrawSetOutline(DrawCadastroInput[playerid][5], 0);
- TextDrawBackgroundColor(DrawCadastroInput[playerid][5], 51);
- TextDrawFont(DrawCadastroInput[playerid][5], 2);
- TextDrawSetProportional(DrawCadastroInput[playerid][5], 1);
- DrawCadastroInput[playerid][6] = TextDrawCreate(119.500000, 206.312500, "Skin");
- TextDrawLetterSize(DrawCadastroInput[playerid][6], 0.242993, 1.193124);
- TextDrawTextSize(DrawCadastroInput[playerid][6], 25.000000, 220.000000);
- TextDrawAlignment(DrawCadastroInput[playerid][6], 2);
- TextDrawColor(DrawCadastroInput[playerid][6], -1);
- TextDrawSetShadow(DrawCadastroInput[playerid][6], 0);
- TextDrawSetOutline(DrawCadastroInput[playerid][6], 1);
- TextDrawBackgroundColor(DrawCadastroInput[playerid][6], 51);
- TextDrawFont(DrawCadastroInput[playerid][6], 2);
- TextDrawSetProportional(DrawCadastroInput[playerid][6], 1);
- TextDrawSetSelectable(DrawCadastroInput[playerid][6], true);
- // DRAWS CLICK LOGIN //
- DrawLoginInput[playerid][0] = TextDrawCreate(534.000000, 71.875000, "NOME");
- TextDrawLetterSize(DrawLoginInput[playerid][0], 0.371998, 1.613124);
- TextDrawAlignment(DrawLoginInput[playerid][0], 2);
- TextDrawColor(DrawLoginInput[playerid][0], -2139094785);
- TextDrawSetShadow(DrawLoginInput[playerid][0], 0);
- TextDrawSetOutline(DrawLoginInput[playerid][0], 1);
- TextDrawBackgroundColor(DrawLoginInput[playerid][0], 51);
- TextDrawFont(DrawLoginInput[playerid][0], 2);
- TextDrawSetProportional(DrawLoginInput[playerid][0], 1);
- DrawLoginInput[playerid][1] = TextDrawCreate(530.000000, 133.125000, "Login");
- TextDrawLetterSize(DrawLoginInput[playerid][1], 0.400998, 1.495000);
- TextDrawAlignment(DrawLoginInput[playerid][1], 2);
- TextDrawColor(DrawLoginInput[playerid][1], -1);
- TextDrawSetShadow(DrawLoginInput[playerid][1], 0);
- TextDrawSetOutline(DrawLoginInput[playerid][1], 1);
- TextDrawBackgroundColor(DrawLoginInput[playerid][1], 51);
- TextDrawFont(DrawLoginInput[playerid][1], 2);
- TextDrawSetProportional(DrawLoginInput[playerid][1], 1);
- TextDrawTextSize(DrawLoginInput[playerid][1], 30.000000, 200.000000);
- DrawLoginInput[playerid][2] = TextDrawCreate(535.500000, 184.875000, "TeamSpeak");
- TextDrawLetterSize(DrawLoginInput[playerid][2], 0.254495, 1.106872);
- TextDrawAlignment(DrawLoginInput[playerid][2], 2);
- TextDrawColor(DrawLoginInput[playerid][2], -1);
- TextDrawSetShadow(DrawLoginInput[playerid][2], 0);
- TextDrawSetOutline(DrawLoginInput[playerid][2], 1);
- TextDrawBackgroundColor(DrawLoginInput[playerid][2], 51);
- TextDrawFont(DrawLoginInput[playerid][2], 2);
- TextDrawSetProportional(DrawLoginInput[playerid][2], 1);
- TextDrawTextSize(DrawLoginInput[playerid][2], 30.00000, 205.000000);
- DrawLoginInput[playerid][3] = TextDrawCreate(533.500000, 238.812500, "Forum");
- TextDrawLetterSize(DrawLoginInput[playerid][3], 0.254495, 1.206872);
- TextDrawAlignment(DrawLoginInput[playerid][3], 2);
- TextDrawColor(DrawLoginInput[playerid][3], -1);
- TextDrawSetShadow(DrawLoginInput[playerid][3], 0);
- TextDrawSetOutline(DrawLoginInput[playerid][3], 1);
- TextDrawBackgroundColor(DrawLoginInput[playerid][3], 51);
- TextDrawFont(DrawLoginInput[playerid][3], 2);
- TextDrawSetProportional(DrawLoginInput[playerid][3], 1);
- TextDrawTextSize(DrawLoginInput[playerid][3], 30.000000, 200.000000);
- DrawLoginInput[playerid][4] = TextDrawCreate(596.500000, 301.875000, "Sair");
- TextDrawLetterSize(DrawLoginInput[playerid][4], 0.386000, 1.284999);
- TextDrawAlignment(DrawLoginInput[playerid][4], 2);
- TextDrawColor(DrawLoginInput[playerid][4], -1);
- TextDrawSetShadow(DrawLoginInput[playerid][4], 0);
- TextDrawSetOutline(DrawLoginInput[playerid][4], 1);
- TextDrawBackgroundColor(DrawLoginInput[playerid][4], 51);
- TextDrawFont(DrawLoginInput[playerid][4], 2);
- TextDrawSetProportional(DrawLoginInput[playerid][4], 1);
- TextDrawTextSize(DrawLoginInput[playerid][4], 30.000000, 200.000000);
- ShowDraws(playerid);
- return 1;
- }
- ShowDraws(playerid)
- {
- TextDrawSetSelectable(DrawCadastroInput[playerid][1], true);
- TextDrawSetSelectable(DrawCadastroInput[playerid][2], true);
- TextDrawSetSelectable(DrawCadastroInput[playerid][3], true);
- TextDrawSetSelectable(DrawCadastroInput[playerid][4], true);
- TextDrawSetSelectable(DrawCadastroInput[playerid][5], true);
- TextDrawSetSelectable(DrawCadastroInput[playerid][6], true);
- TextDrawSetSelectable(DrawLoginInput[playerid][1], true);
- TextDrawSetSelectable(DrawLoginInput[playerid][2], true);
- TextDrawSetSelectable(DrawLoginInput[playerid][3], true);
- TextDrawSetSelectable(DrawLoginInput[playerid][4], true);
- // SE O PLAYER NAO FOR REGISTRADO //
- if(!fexist(Arquivo(playerid)))
- {
- format(str, 25, "%s", pNome(playerid));
- TextDrawSetString(DrawCadastroInput[playerid][0], str);
- TextDrawShowForPlayer(playerid, DrawCadastro[playerid][0]);
- TextDrawShowForPlayer(playerid, DrawCadastro[playerid][1]);
- TextDrawShowForPlayer(playerid, DrawCadastro[playerid][2]);
- TextDrawShowForPlayer(playerid, DrawCadastro[playerid][3]);
- TextDrawShowForPlayer(playerid, DrawCadastro[playerid][4]);
- TextDrawShowForPlayer(playerid, DrawCadastro[playerid][5]);
- TextDrawShowForPlayer(playerid, DrawCadastro[playerid][6]);
- TextDrawShowForPlayer(playerid, DrawCadastro[playerid][7]);
- TextDrawShowForPlayer(playerid, DrawCadastro[playerid][8]);
- TextDrawShowForPlayer(playerid, DrawCadastro[playerid][9]);
- TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][0]);
- TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][1]);
- TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][2]);
- TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][3]);
- TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][4]);
- TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][5]);
- TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][6]);
- registrado[playerid] = 1;
- Logado[playerid] = false;
- SelectTextDraw(playerid, COR_TEXTNEW);
- }
- else if(fexist(Arquivo(playerid)))
- {
- // SE O PLAYER FOR REGISTRADO //
- format(str, 25, "%s", pNome(playerid));
- TextDrawSetString(DrawLoginInput[playerid][0], str);
- TextDrawShowForPlayer(playerid, DrawLogin[playerid][0]);
- TextDrawShowForPlayer(playerid, DrawLogin[playerid][1]);
- TextDrawShowForPlayer(playerid, DrawLogin[playerid][2]);
- TextDrawShowForPlayer(playerid, DrawLogin[playerid][3]);
- TextDrawShowForPlayer(playerid, DrawLogin[playerid][4]);
- TextDrawShowForPlayer(playerid, DrawLogin[playerid][5]);
- TextDrawShowForPlayer(playerid, DrawLogin[playerid][6]);
- TextDrawShowForPlayer(playerid, DrawLoginInput[playerid][0]);
- TextDrawShowForPlayer(playerid, DrawLoginInput[playerid][1]);
- TextDrawShowForPlayer(playerid, DrawLoginInput[playerid][2]);
- TextDrawShowForPlayer(playerid, DrawLoginInput[playerid][3]);
- TextDrawShowForPlayer(playerid, DrawLoginInput[playerid][4]);
- registrado[playerid] = 0;
- Logado[playerid] = false;
- SelectTextDraw(playerid, COR_TEXTNEW);
- }
- return 1;
- }
- pSalvarConta(playerid)
- {
- if(fexist(Arquivo(playerid)) && Logado[playerid])
- {
- GetPlayerWeaponData(playerid, 2, pInfo[playerid][pArma][0], pInfo[playerid][pAmmo][0]);
- GetPlayerWeaponData(playerid, 3, pInfo[playerid][pArma][1], pInfo[playerid][pAmmo][1]);
- GetPlayerWeaponData(playerid, 4, pInfo[playerid][pArma][2], pInfo[playerid][pAmmo][2]);
- GetPlayerWeaponData(playerid, 5, pInfo[playerid][pArma][3], pInfo[playerid][pAmmo][3]);
- GetPlayerWeaponData(playerid, 6, pInfo[playerid][pArma][4], pInfo[playerid][pAmmo][4]);
- new slot1, bala1;
- GetPlayerWeaponData(playerid, 1, slot1, bala1);
- if(slot1 > 0) {
- for(new i = 0; i < 4; i++) {
- if(pInfo[playerid][pArma][i] == 0) {
- GivePlayerWeapon(playerid, slot1, bala1);
- GetPlayerWeaponData(playerid, 1, pInfo[playerid][pArma][i], pInfo[playerid][pAmmo][i]);
- break;
- }
- }
- }
- if(pInfo[playerid][pArma][0] )
- DOF2_SetInt(Arquivo(playerid), "Admin", pInfo[playerid][pAdmin]);
- DOF2_SetInt(Arquivo(playerid), "Level", pInfo[playerid][pLevel]);
- DOF2_SetInt(Arquivo(playerid), "Grana", pInfo[playerid][pGrana]);
- DOF2_SetInt(Arquivo(playerid), "Sexo", pInfo[playerid][pSexo]);
- DOF2_SetInt(Arquivo(playerid), "Idade", pInfo[playerid][pIdade]);
- DOF2_SetInt(Arquivo(playerid), "Skin", pInfo[playerid][pSkin]);
- DOF2_SetInt(Arquivo(playerid), "Arma1", pInfo[playerid][pArma][0]);
- DOF2_SetInt(Arquivo(playerid), "Arma2", pInfo[playerid][pArma][1]);
- DOF2_SetInt(Arquivo(playerid), "Arma3", pInfo[playerid][pArma][2]);
- DOF2_SetInt(Arquivo(playerid), "Arma4", pInfo[playerid][pArma][3]);
- DOF2_SetInt(Arquivo(playerid), "Arma5", pInfo[playerid][pArma][4]);
- DOF2_SetInt(Arquivo(playerid), "Balas1", pInfo[playerid][pAmmo][0]);
- DOF2_SetInt(Arquivo(playerid), "Balas2", pInfo[playerid][pAmmo][1]);
- DOF2_SetInt(Arquivo(playerid), "Balas3", pInfo[playerid][pAmmo][2]);
- DOF2_SetInt(Arquivo(playerid), "Balas4", pInfo[playerid][pAmmo][3]);
- DOF2_SetInt(Arquivo(playerid), "Balas5", pInfo[playerid][pAmmo][4]);
- DOF2_SetInt(Arquivo(playerid), "Balas5", pInfo[playerid][pAmmo][4]);
- GetPlayerPos(playerid, pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]);
- GetPlayerFacingAngle(playerid, pInfo[playerid][pFA]);
- pInfo[playerid][pInt] = GetPlayerInterior(playerid);
- DOF2_SetFloat(Arquivo(playerid), "X", pInfo[playerid][pX]);
- DOF2_SetFloat(Arquivo(playerid), "Y", pInfo[playerid][pY]);
- DOF2_SetFloat(Arquivo(playerid), "Z", pInfo[playerid][pZ]);
- DOF2_SetFloat(Arquivo(playerid), "FA", pInfo[playerid][pFA]);
- DOF2_SetInt(Arquivo(playerid), "Int", pInfo[playerid][pInt]);
- DOF2_SetInt(Arquivo(playerid), "GC", pInfo[playerid][Coins][0]);
- DOF2_SetInt(Arquivo(playerid), "SC", pInfo[playerid][Coins][1]);
- DOF2_SetInt(Arquivo(playerid), "BC", pInfo[playerid][Coins][2]);
- DOF2_SetInt(Arquivo(playerid), "Aviso", pInfo[playerid][pAviso]);
- DOF2_SaveFile();
- }
- return 1;
- }
- pRegistro(playerid)
- {
- if(!fexist(Arquivo(playerid)))
- {
- new rand = random(sizeof(RandomSpawn));
- DOF2_CreateFile(Arquivo(playerid));
- DOF2_SetString(Arquivo(playerid), "Senha", senhaDigitada[playerid]);
- DOF2_SetInt(Arquivo(playerid), "Admin", 0);
- DOF2_SetInt(Arquivo(playerid), "Level", NIVEL_INICIO);
- DOF2_SetInt(Arquivo(playerid), "Grana", GRANA_INICIO);
- DOF2_SetInt(Arquivo(playerid), "Sexo", pInfo[playerid][pSexo]);
- DOF2_SetInt(Arquivo(playerid), "Idade", pInfo[playerid][pIdade]);
- DOF2_SetInt(Arquivo(playerid), "Skin", pInfo[playerid][pSkin]);
- DOF2_SetInt(Arquivo(playerid), "Arma1", 0);
- DOF2_SetInt(Arquivo(playerid), "Arma2", 0);
- DOF2_SetInt(Arquivo(playerid), "Arma3", 0);
- DOF2_SetInt(Arquivo(playerid), "Arma4", 0);
- DOF2_SetInt(Arquivo(playerid), "Arma5", 0);
- DOF2_SetInt(Arquivo(playerid), "Balas1", 0);
- DOF2_SetInt(Arquivo(playerid), "Balas2", 0);
- DOF2_SetInt(Arquivo(playerid), "Balas3", 0);
- DOF2_SetInt(Arquivo(playerid), "Balas4", 0);
- DOF2_SetInt(Arquivo(playerid), "Balas5", 0);
- DOF2_SetFloat(Arquivo(playerid), "X", RandomSpawn[rand][0]);
- DOF2_SetFloat(Arquivo(playerid), "Y", RandomSpawn[rand][1]);
- DOF2_SetFloat(Arquivo(playerid), "Z", RandomSpawn[rand][2]);
- DOF2_SetFloat(Arquivo(playerid), "FA", RandomSpawn[rand][3]);
- DOF2_SetInt(Arquivo(playerid), "Int", 0);
- DOF2_SetInt(Arquivo(playerid), "GC", 0);
- DOF2_SetInt(Arquivo(playerid), "SC", 0);
- DOF2_SetInt(Arquivo(playerid), "BC", 0);
- DOF2_SetInt(Arquivo(playerid), "Aviso", 0);
- DOF2_SaveFile();
- HideTD(playerid);
- CancelSelectTextDraw(playerid);
- CarregarConta(playerid);
- TextDrawShowForPlayer(playerid, tCoins[playerid][0]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][1]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][2]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][3]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][4]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][5]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][6]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][7]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][8]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][9]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][10]);
- TextDrawShowForPlayer(playerid, tCoins[playerid][11]);
- SetTimerEx("attCoins", 400, true, "i", playerid);
- pSpawn(playerid);
- }
- return 1;
- }
- CarregarConta(playerid)
- {
- pInfo[playerid][pLevel] = DOF2_GetInt(Arquivo(playerid), "Level");
- SetPlayerScore(playerid, pInfo[playerid][pLevel]);
- pInfo[playerid][pGrana] = DOF2_GetInt(Arquivo(playerid), "Grana");
- GivePlayerMoney(playerid, pInfo[playerid][pGrana]);
- pInfo[playerid][pAdmin] = DOF2_GetInt(Arquivo(playerid), "Admin");
- pInfo[playerid][pSexo] = DOF2_GetInt(Arquivo(playerid), "Sexo");
- pInfo[playerid][pIdade] = DOF2_GetInt(Arquivo(playerid), "Idade");
- pInfo[playerid][pSkin] = DOF2_GetInt(Arquivo(playerid), "Skin");
- pInfo[playerid][pArma][0] = DOF2_GetInt(Arquivo(playerid), "Arma1");
- pInfo[playerid][pArma][1] = DOF2_GetInt(Arquivo(playerid), "Arma2");
- pInfo[playerid][pArma][2] = DOF2_GetInt(Arquivo(playerid), "Arma3");
- pInfo[playerid][pArma][3] = DOF2_GetInt(Arquivo(playerid), "Arma4");
- pInfo[playerid][pArma][4] = DOF2_GetInt(Arquivo(playerid), "Arma5");
- pInfo[playerid][pAmmo][0] = DOF2_GetInt(Arquivo(playerid), "Balas1");
- pInfo[playerid][pAmmo][1] = DOF2_GetInt(Arquivo(playerid), "Balas2");
- pInfo[playerid][pAmmo][2] = DOF2_GetInt(Arquivo(playerid), "Balas3");
- pInfo[playerid][pAmmo][3] = DOF2_GetInt(Arquivo(playerid), "Balas4");
- pInfo[playerid][pAmmo][4] = DOF2_GetInt(Arquivo(playerid), "Balas5");
- pInfo[playerid][pX] = DOF2_GetFloat(Arquivo(playerid), "X");
- pInfo[playerid][pY] = DOF2_GetFloat(Arquivo(playerid), "Y");
- pInfo[playerid][pZ] = DOF2_GetFloat(Arquivo(playerid), "Z");
- pInfo[playerid][pFA] = DOF2_GetFloat(Arquivo(playerid), "FA");
- pInfo[playerid][pInt] = DOF2_GetInt(Arquivo(playerid), "Int");
- pInfo[playerid][Coins][0] = DOF2_GetInt(Arquivo(playerid), "GC");
- pInfo[playerid][Coins][1] = DOF2_GetInt(Arquivo(playerid), "SC");
- pInfo[playerid][Coins][2] = DOF2_GetInt(Arquivo(playerid), "BC");
- pInfo[playerid][pAviso] = DOF2_GetInt(Arquivo(playerid), "Aviso");
- Logado[playerid] = true;
- return 1;
- }
- pSpawn(playerid)
- {
- SetPlayerVirtualWorld(playerid, 0);
- HideTD(playerid);
- CancelSelectTextDraw(playerid);
- TogglePlayerSpectating(playerid, false);
- TogglePlayerControllable(playerid, 1);
- if(registrado[playerid] == 1) {
- new rand = random(sizeof(RandomSpawn));
- SetSpawnInfo(playerid, NO_TEAM, pInfo[playerid][pSkin], RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]+3, RandomSpawn[rand][3], 0,0,0,0,0,0);
- }
- else if(registrado[playerid] == 0) {
- SetSpawnInfo(playerid, NO_TEAM, pInfo[playerid][pSkin], pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]+3, pInfo[playerid][pFA], 0,0,0,0,0,0);
- }
- SpawnPlayer(playerid); OnPlayerSpawn(playerid);
- return 1;
- }
- pNome(playerid)
- {
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- return nome;
- }
- Arquivo(playerid)
- {
- format(str, 36, "Contas/%s.ini", pNome(playerid));//Endereço onde será salvo as contas.
- return str;
- }
- /*Forward (public) das mensagens randomicas*/
- public SendMSG()
- {
- new random2 = random(sizeof(RandomColors));
- new randMSG = random(sizeof(RandomMSG));
- SendClientMessageToAll(RandomColors[random2], RandomMSG[randMSG]);
- }
- /*-----------*/
- /*Comandos em ZCMD e SSCANF*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement