Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Sistema de Registro Whoo |||
- Criado: 12/12/2014
- Creditos: Whoo
- */
- #include <a_samp>
- #include <dof2>
- #define COR_AVISO 0xBEBEBEFF
- #define COR_ADMIN 0x436EEEFF
- #define COR_SUCESSO 0xCAE1FFFF
- enum
- {
- DIALOG_REGISTRO,
- DIALOG_LOGIN
- }
- enum player_info
- {
- nome[MAX_PLAYER_NAME],
- senha[17],
- Administrador,
- Level,
- Skin,
- Matou,
- Morreu,
- Dinheiro,
- bool: Logado,
- ERRO
- };
- new playerInfo[MAX_PLAYERS][player_info];
- new
- Text: Registro[12],
- Text: Dicas[15],
- Text: Info[15],
- PlayerText: PlayerRegistro[playerid][MAX_PLAYERS][6]
- ;
- public OnFilterScriptInit()
- {
- print("-----------------------------------------------\n");
- print(" Sistema de Registro Whoo Carregado com Sucesso\n");
- print("-----------------------------------------------\n");
- Dicas[0] = TextDrawCreate(460.000000, 130.000000, " ");
- TextDrawBackgroundColor(Dicas[0], 255);
- TextDrawFont(Dicas[0], 1);
- TextDrawLetterSize(Dicas[0], 0.480000, 7.000000);
- TextDrawColor(Dicas[0], -1);
- TextDrawSetOutline(Dicas[0], 0);
- TextDrawSetProportional(Dicas[0], 1);
- TextDrawSetShadow(Dicas[0], 1);
- TextDrawUseBox(Dicas[0], 1);
- TextDrawBoxColor(Dicas[0], 40);
- TextDrawTextSize(Dicas[0], 186.000000, 0.000000);
- Dicas[1] = TextDrawCreate(460.000000, 130.000000, " ");
- TextDrawBackgroundColor(Dicas[1], 255);
- TextDrawFont(Dicas[1], 1);
- TextDrawLetterSize(Dicas[1], 0.480000, 0.599999);
- TextDrawColor(Dicas[1], -1);
- TextDrawSetOutline(Dicas[1], 0);
- TextDrawSetProportional(Dicas[1], 1);
- TextDrawSetShadow(Dicas[1], 1);
- TextDrawUseBox(Dicas[1], 1);
- TextDrawBoxColor(Dicas[1], -12566384);
- TextDrawTextSize(Dicas[1], 186.000000, 0.000000);
- Dicas[2] = TextDrawCreate(460.000000, 303.000000, " ");
- TextDrawBackgroundColor(Dicas[2], 255);
- TextDrawFont(Dicas[2], 1);
- TextDrawLetterSize(Dicas[2], 0.480000, 0.599999);
- TextDrawColor(Dicas[2], -1);
- TextDrawSetOutline(Dicas[2], 0);
- TextDrawSetProportional(Dicas[2], 1);
- TextDrawSetShadow(Dicas[2], 1);
- TextDrawUseBox(Dicas[2], 1);
- TextDrawBoxColor(Dicas[2], -12566384);
- TextDrawTextSize(Dicas[2], 186.000000, 0.000000);
- Dicas[3] = TextDrawCreate(432.000000, 133.000000, "~<~");
- TextDrawBackgroundColor(Dicas[3], 255);
- TextDrawFont(Dicas[3], 1);
- TextDrawLetterSize(Dicas[3], 0.500000, 1.000000);
- TextDrawColor(Dicas[3], -1);
- TextDrawSetOutline(Dicas[3], 0);
- TextDrawSetProportional(Dicas[3], 1);
- TextDrawSetShadow(Dicas[3], 1);
- Dicas[4] = TextDrawCreate(203.000000, 133.000000, "~>~");
- TextDrawBackgroundColor(Dicas[4], 255);
- TextDrawFont(Dicas[4], 1);
- TextDrawLetterSize(Dicas[4], 0.500000, 1.000000);
- TextDrawColor(Dicas[4], -1);
- TextDrawSetOutline(Dicas[4], 0);
- TextDrawSetProportional(Dicas[4], 1);
- TextDrawSetShadow(Dicas[4], 1);
- Dicas[5] = TextDrawCreate(254.000000, 133.000000, "Nome do Servidor");
- TextDrawBackgroundColor(Dicas[5], 255);
- TextDrawFont(Dicas[5], 2);
- TextDrawLetterSize(Dicas[5], 0.329999, 1.100000);
- TextDrawColor(Dicas[5], -1);
- TextDrawSetOutline(Dicas[5], 1);
- TextDrawSetProportional(Dicas[5], 1);
- Dicas[6] = TextDrawCreate(269.000000, 160.000000, " ");
- TextDrawBackgroundColor(Dicas[6], 255);
- TextDrawFont(Dicas[6], 1);
- TextDrawLetterSize(Dicas[6], 0.470000, 0.399999);
- TextDrawColor(Dicas[6], -1);
- TextDrawSetOutline(Dicas[6], 0);
- TextDrawSetProportional(Dicas[6], 1);
- TextDrawSetShadow(Dicas[6], 1);
- TextDrawUseBox(Dicas[6], 1);
- TextDrawBoxColor(Dicas[6], 140);
- TextDrawTextSize(Dicas[6], 186.000000, 0.000000);
- Dicas[7] = TextDrawCreate(212.000000, 159.000000, "Dicas");
- TextDrawBackgroundColor(Dicas[7], 255);
- TextDrawFont(Dicas[7], 2);
- TextDrawLetterSize(Dicas[7], 0.230000, 1.300000);
- TextDrawColor(Dicas[7], -1);
- TextDrawSetOutline(Dicas[7], 1);
- TextDrawSetProportional(Dicas[7], 1);
- Dicas[8] = TextDrawCreate(228.000000, 181.000000, "Aqui ficara as Dicas do servidor");
- TextDrawBackgroundColor(Dicas[8], 255);
- TextDrawFont(Dicas[8], 2);
- TextDrawLetterSize(Dicas[8], 0.230000, 1.300000);
- TextDrawColor(Dicas[8], -1);
- TextDrawSetOutline(Dicas[8], 1);
- TextDrawSetProportional(Dicas[8], 1);
- Dicas[9] = TextDrawCreate(247.000000, 204.000000, "Dica 1: nao use Drogas :)");
- TextDrawBackgroundColor(Dicas[9], 255);
- TextDrawFont(Dicas[9], 2);
- TextDrawLetterSize(Dicas[9], 0.230000, 1.300000);
- TextDrawColor(Dicas[9], -1);
- TextDrawSetOutline(Dicas[9], 1);
- TextDrawSetProportional(Dicas[9], 1);
- Dicas[10] = TextDrawCreate(228.000000, 229.000000, "Dica 2: se for usar chama eu :)");
- TextDrawBackgroundColor(Dicas[10], 255);
- TextDrawFont(Dicas[10], 2);
- TextDrawLetterSize(Dicas[10], 0.230000, 1.300000);
- TextDrawColor(Dicas[10], -1);
- TextDrawSetOutline(Dicas[10], 1);
- TextDrawSetProportional(Dicas[10], 1);
- Dicas[11] = TextDrawCreate(243.000000, 254.000000, "Dica 3: nao contrair Ebola");
- TextDrawBackgroundColor(Dicas[11], 255);
- TextDrawFont(Dicas[11], 2);
- TextDrawLetterSize(Dicas[11], 0.230000, 1.300000);
- TextDrawColor(Dicas[11], -1);
- TextDrawSetOutline(Dicas[11], 1);
- TextDrawSetProportional(Dicas[11], 1);
- Dicas[12] = TextDrawCreate(212.000000, 281.000000, "dica 4: nao tente trapassear e assim vai..");
- TextDrawBackgroundColor(Dicas[12], 255);
- TextDrawFont(Dicas[12], 2);
- TextDrawLetterSize(Dicas[12], 0.230000, 1.300000);
- TextDrawColor(Dicas[12], -1);
- TextDrawSetOutline(Dicas[12], 1);
- TextDrawSetProportional(Dicas[12], 1);
- Dicas[13] = TextDrawCreate(276.000000, 306.000000, "~>~ Whoo 2015 ~<~");
- TextDrawBackgroundColor(Dicas[13], 255);
- TextDrawFont(Dicas[13], 2);
- TextDrawLetterSize(Dicas[13], 0.240000, 1.100000);
- TextDrawColor(Dicas[13], -1);
- TextDrawSetOutline(Dicas[13], 1);
- TextDrawSetProportional(Dicas[13], 1);
- Dicas[14] = TextDrawCreate(460.000000, 160.000000, " ");
- TextDrawBackgroundColor(Dicas[14], 255);
- TextDrawFont(Dicas[14], 1);
- TextDrawLetterSize(Dicas[14], 0.470000, 0.399999);
- TextDrawColor(Dicas[14], -1);
- TextDrawSetOutline(Dicas[14], 0);
- TextDrawSetProportional(Dicas[14], 1);
- TextDrawSetShadow(Dicas[14], 1);
- TextDrawUseBox(Dicas[14], 1);
- TextDrawBoxColor(Dicas[14], 140);
- TextDrawTextSize(Dicas[14], 382.000000, 0.000000);
- /* INFO */
- Info[0] = TextDrawCreate(460.000000, 130.000000, " ");
- TextDrawBackgroundColor(Info[0], 255);
- TextDrawFont(Info[0], 1);
- TextDrawLetterSize(Info[0], 0.480000, 7.000000);
- TextDrawColor(Info[0], -1);
- TextDrawSetOutline(Info[0], 0);
- TextDrawSetProportional(Info[0], 1);
- TextDrawSetShadow(Info[0], 1);
- TextDrawUseBox(Info[0], 1);
- TextDrawBoxColor(Info[0], 40);
- TextDrawTextSize(Info[0], 186.000000, 0.000000);
- Info[1] = TextDrawCreate(460.000000, 130.000000, " ");
- TextDrawBackgroundColor(Info[1], 255);
- TextDrawFont(Info[1], 1);
- TextDrawLetterSize(Info[1], 0.480000, 0.599999);
- TextDrawColor(Info[1], -1);
- TextDrawSetOutline(Info[1], 0);
- TextDrawSetProportional(Info[1], 1);
- TextDrawSetShadow(Info[1], 1);
- TextDrawUseBox(Info[1], 1);
- TextDrawBoxColor(Info[1], -12566384);
- TextDrawTextSize(Info[1], 186.000000, 0.000000);
- Info[2] = TextDrawCreate(460.000000, 303.000000, " ");
- TextDrawBackgroundColor(Info[2], 255);
- TextDrawFont(Info[2], 1);
- TextDrawLetterSize(Info[2], 0.480000, 0.599999);
- TextDrawColor(Info[2], -1);
- TextDrawSetOutline(Info[2], 0);
- TextDrawSetProportional(Info[2], 1);
- TextDrawSetShadow(Info[2], 1);
- TextDrawUseBox(Info[2], 1);
- TextDrawBoxColor(Info[2], -12566384);
- TextDrawTextSize(Info[2], 186.000000, 0.000000);
- Info[3] = TextDrawCreate(432.000000, 133.000000, "~<~");
- TextDrawBackgroundColor(Info[3], 255);
- TextDrawFont(Info[3], 1);
- TextDrawLetterSize(Info[3], 0.500000, 1.000000);
- TextDrawColor(Info[3], -1);
- TextDrawSetOutline(Info[3], 0);
- TextDrawSetProportional(Info[3], 1);
- TextDrawSetShadow(Info[3], 1);
- Info[4] = TextDrawCreate(203.000000, 133.000000, "~>~");
- TextDrawBackgroundColor(Info[4], 255);
- TextDrawFont(Info[4], 1);
- TextDrawLetterSize(Info[4], 0.500000, 1.000000);
- TextDrawColor(Info[4], -1);
- TextDrawSetOutline(Info[4], 0);
- TextDrawSetProportional(Info[4], 1);
- TextDrawSetShadow(Info[4], 1);
- Info[5] = TextDrawCreate(254.000000, 133.000000, "Nome do Servidor");
- TextDrawBackgroundColor(Info[5], 255);
- TextDrawFont(Info[5], 2);
- TextDrawLetterSize(Info[5], 0.329999, 1.100000);
- TextDrawColor(Info[5], -1);
- TextDrawSetOutline(Info[5], 1);
- TextDrawSetProportional(Info[5], 1);
- Info[6] = TextDrawCreate(269.000000, 160.000000, " ");
- TextDrawBackgroundColor(Info[6], 255);
- TextDrawFont(Info[6], 1);
- TextDrawLetterSize(Info[6], 0.470000, 0.399999);
- TextDrawColor(Info[6], -1);
- TextDrawSetOutline(Info[6], 0);
- TextDrawSetProportional(Info[6], 1);
- TextDrawSetShadow(Info[6], 1);
- TextDrawUseBox(Info[6], 1);
- TextDrawBoxColor(Info[6], 140);
- TextDrawTextSize(Info[6], 186.000000, 0.000000);
- Info[7] = TextDrawCreate(195.000000, 159.000000, "informacoes");
- TextDrawBackgroundColor(Info[7], 255);
- TextDrawFont(Info[7], 2);
- TextDrawLetterSize(Info[7], 0.230000, 1.300000);
- TextDrawColor(Info[7], -1);
- TextDrawSetOutline(Info[7], 1);
- TextDrawSetProportional(Info[7], 1);
- Info[8] = TextDrawCreate(195.000000, 181.000000, "Criador: Nome do Criador");
- TextDrawBackgroundColor(Info[8], 255);
- TextDrawFont(Info[8], 2);
- TextDrawLetterSize(Info[8], 0.230000, 1.300000);
- TextDrawColor(Info[8], -1);
- TextDrawSetOutline(Info[8], 1);
- TextDrawSetProportional(Info[8], 1);
- Info[9] = TextDrawCreate(195.000000, 207.000000, "Dono: Nome do Dono");
- TextDrawBackgroundColor(Info[9], 255);
- TextDrawFont(Info[9], 2);
- TextDrawLetterSize(Info[9], 0.230000, 1.300000);
- TextDrawColor(Info[9], -1);
- TextDrawSetOutline(Info[9], 1);
- TextDrawSetProportional(Info[9], 1);
- Info[10] = TextDrawCreate(195.000000, 231.000000, "Equipe: Nome da Equipe");
- TextDrawBackgroundColor(Info[10], 255);
- TextDrawFont(Info[10], 2);
- TextDrawLetterSize(Info[10], 0.230000, 1.300000);
- TextDrawColor(Info[10], -1);
- TextDrawSetOutline(Info[10], 1);
- TextDrawSetProportional(Info[10], 1);
- Info[11] = TextDrawCreate(195.000000, 256.000000, "Site: www.sa-mp.com");
- TextDrawBackgroundColor(Info[11], 255);
- TextDrawFont(Info[11], 2);
- TextDrawLetterSize(Info[11], 0.230000, 1.300000);
- TextDrawColor(Info[11], -1);
- TextDrawSetOutline(Info[11], 1);
- TextDrawSetProportional(Info[11], 1);
- Info[12] = TextDrawCreate(195.000000, 280.000000, "Forum: www.forum.sa-mp.com");
- TextDrawBackgroundColor(Info[12], 255);
- TextDrawFont(Info[12], 2);
- TextDrawLetterSize(Info[12], 0.230000, 1.300000);
- TextDrawColor(Info[12], -1);
- TextDrawSetOutline(Info[12], 1);
- TextDrawSetProportional(Info[12], 1);
- Info[13] = TextDrawCreate(276.000000, 306.000000, "~>~ Whoo 2015 ~<~");
- TextDrawBackgroundColor(Info[13], 255);
- TextDrawFont(Info[13], 2);
- TextDrawLetterSize(Info[13], 0.240000, 1.100000);
- TextDrawColor(Info[13], -1);
- TextDrawSetOutline(Info[13], 1);
- TextDrawSetProportional(Info[13], 1);
- Info[14] = TextDrawCreate(460.000000, 160.000000, " ");
- TextDrawBackgroundColor(Info[14], 255);
- TextDrawFont(Info[14], 1);
- TextDrawLetterSize(Info[14], 0.470000, 0.399999);
- TextDrawColor(Info[14], -1);
- TextDrawSetOutline(Info[14], 0);
- TextDrawSetProportional(Info[14], 1);
- TextDrawSetShadow(Info[14], 1);
- TextDrawUseBox(Info[14], 1);
- TextDrawBoxColor(Info[14], 140);
- TextDrawTextSize(Info[14], 382.000000, 0.000000);
- /* REGISTRO */
- Registro[0] = TextDrawCreate(661.000000, -32.000000, " ");
- TextDrawBackgroundColor(Registro[0], 255);
- TextDrawFont(Registro[0], 1);
- TextDrawLetterSize(Registro[0], 0.500000, 1.000000);
- TextDrawColor(Registro[0], -1);
- TextDrawSetOutline(Registro[0], 0);
- TextDrawSetProportional(Registro[0], 1);
- TextDrawSetShadow(Registro[0], 1);
- TextDrawUseBox(Registro[0], 1);
- TextDrawBoxColor(Registro[0], 70);
- TextDrawTextSize(Registro[0], -20.000000, 0.000000);
- Registro[1] = TextDrawCreate(661.000000, 378.000000, " ");
- TextDrawBackgroundColor(Registro[1], 255);
- TextDrawFont(Registro[1], 1);
- TextDrawLetterSize(Registro[1], 0.500000, 1.000000);
- TextDrawColor(Registro[1], -1);
- TextDrawSetOutline(Registro[1], 0);
- TextDrawSetProportional(Registro[1], 1);
- TextDrawSetShadow(Registro[1], 1);
- TextDrawUseBox(Registro[1], 1);
- TextDrawBoxColor(Registro[1], 70);
- TextDrawTextSize(Registro[1], -20.000000, 0.000000);
- Registro[2] = TextDrawCreate(661.000000, 378.000000, " ");
- TextDrawBackgroundColor(Registro[2], 255);
- TextDrawFont(Registro[2], 1);
- TextDrawLetterSize(Registro[2], 0.500000, -0.000000);
- TextDrawColor(Registro[2], -1);
- TextDrawSetOutline(Registro[2], 0);
- TextDrawSetProportional(Registro[2], 1);
- TextDrawSetShadow(Registro[2], 1);
- TextDrawUseBox(Registro[2], 1);
- TextDrawBoxColor(Registro[2], -12566273);
- TextDrawTextSize(Registro[2], -20.000000, 0.000000);
- Registro[3] = TextDrawCreate(661.000000, 67.000000, " ");
- TextDrawBackgroundColor(Registro[3], 255);
- TextDrawFont(Registro[3], 1);
- TextDrawLetterSize(Registro[3], 0.500000, -0.000000);
- TextDrawColor(Registro[3], -1);
- TextDrawSetOutline(Registro[3], 0);
- TextDrawSetProportional(Registro[3], 1);
- TextDrawSetShadow(Registro[3], 1);
- TextDrawUseBox(Registro[3], 1);
- TextDrawBoxColor(Registro[3], -12566273);
- TextDrawTextSize(Registro[3], -20.000000, 0.000000);
- Registro[4] = TextDrawCreate(404.000000, 147.000000, " ");
- TextDrawBackgroundColor(Registro[4], 255);
- TextDrawFont(Registro[4], 1);
- TextDrawLetterSize(Registro[4], 0.509999, 6.400000);
- TextDrawColor(Registro[4], -1);
- TextDrawSetOutline(Registro[4], 0);
- TextDrawSetProportional(Registro[4], 1);
- TextDrawSetShadow(Registro[4], 1);
- TextDrawUseBox(Registro[4], 1);
- TextDrawBoxColor(Registro[4], 30);
- TextDrawTextSize(Registro[4], 235.000000, 0.000000);
- Registro[5] = TextDrawCreate(393.000000, 159.000000, " ");
- TextDrawBackgroundColor(Registro[5], 255);
- TextDrawFont(Registro[5], 1);
- TextDrawLetterSize(Registro[5], 0.509999, 0.700000);
- TextDrawColor(Registro[5], -1);
- TextDrawSetOutline(Registro[5], 0);
- TextDrawSetProportional(Registro[5], 1);
- TextDrawSetShadow(Registro[5], 1);
- TextDrawUseBox(Registro[5], 1);
- TextDrawBoxColor(Registro[5], 90);
- TextDrawTextSize(Registro[5], 245.000000, 0.000000);
- Registro[6] = TextDrawCreate(393.000000, 190.000000, " ");
- TextDrawBackgroundColor(Registro[6], 255);
- TextDrawFont(Registro[6], 1);
- TextDrawLetterSize(Registro[6], 0.509999, 0.700000);
- TextDrawColor(Registro[6], -1);
- TextDrawSetOutline(Registro[6], 0);
- TextDrawSetProportional(Registro[6], 1);
- TextDrawSetShadow(Registro[6], 1);
- TextDrawUseBox(Registro[6], 1);
- TextDrawBoxColor(Registro[6], 90);
- TextDrawTextSize(Registro[6], 245.000000, 0.000000);
- Registro[7] = TextDrawCreate(393.000000, 222.000000, " ");
- TextDrawBackgroundColor(Registro[7], 255);
- TextDrawFont(Registro[7], 1);
- TextDrawLetterSize(Registro[7], 0.509999, 0.700000);
- TextDrawColor(Registro[7], -1);
- TextDrawSetOutline(Registro[7], 0);
- TextDrawSetProportional(Registro[7], 1);
- TextDrawSetShadow(Registro[7], 1);
- TextDrawUseBox(Registro[7], 1);
- TextDrawBoxColor(Registro[7], 90);
- TextDrawTextSize(Registro[7], 245.000000, 0.000000);
- Registro[8] = TextDrawCreate(393.000000, 255.000000, " ");
- TextDrawBackgroundColor(Registro[8], 255);
- TextDrawFont(Registro[8], 1);
- TextDrawLetterSize(Registro[8], 0.509999, 0.700000);
- TextDrawColor(Registro[8], -1);
- TextDrawSetOutline(Registro[8], 0);
- TextDrawSetProportional(Registro[8], 1);
- TextDrawSetShadow(Registro[8], 1);
- TextDrawUseBox(Registro[8], 1);
- TextDrawBoxColor(Registro[8], 90);
- TextDrawTextSize(Registro[8], 245.000000, 0.000000);
- Registro[9] = TextDrawCreate(393.000000, 288.000000, " ");
- TextDrawBackgroundColor(Registro[9], 255);
- TextDrawFont(Registro[9], 1);
- TextDrawLetterSize(Registro[9], 0.509999, 0.700000);
- TextDrawColor(Registro[9], -1);
- TextDrawSetOutline(Registro[9], 0);
- TextDrawSetProportional(Registro[9], 1);
- TextDrawSetShadow(Registro[9], 1);
- TextDrawUseBox(Registro[9], 1);
- TextDrawBoxColor(Registro[9], 90);
- TextDrawTextSize(Registro[9], 245.000000, 0.000000);
- Registro[10] = TextDrawCreate(393.000000, 125.000000, " ");
- TextDrawBackgroundColor(Registro[10], 255);
- TextDrawFont(Registro[10], 1);
- TextDrawLetterSize(Registro[10], 0.509999, 0.700000);
- TextDrawColor(Registro[10], -1);
- TextDrawSetOutline(Registro[10], 0);
- TextDrawSetProportional(Registro[10], 1);
- TextDrawSetShadow(Registro[10], 1);
- TextDrawUseBox(Registro[10], 1);
- TextDrawBoxColor(Registro[10], -12566388);
- TextDrawTextSize(Registro[10], 245.000000, 0.000000);
- Registro[11] = TextDrawCreate(279.000000, 128.000000, "Bem Vindo");
- TextDrawBackgroundColor(Registro[11], 255);
- TextDrawFont(Registro[11], 2);
- TextDrawLetterSize(Registro[11], 0.340000, 1.400000);
- TextDrawColor(Registro[11], -1);
- TextDrawSetOutline(Registro[11], 1);
- TextDrawSetProportional(Registro[11], 1);
- return 1;
- }
- CarregarTextPlayer(playerid)
- {
- PlayerRegistro[playerid][playerid][0] = CreatePlayerTextDraw(playerid, 279.000000, 161.000000, "Registrar");
- PlayerTextDrawBackgroundColor(playerid, PlayerRegistro[playerid][0], 255);
- PlayerTextDrawFont(playerid, PlayerRegistro[playerid][0], 2);
- PlayerTextDrawLetterSize(playerid, PlayerRegistro[playerid][0], 0.340000, 1.400000);
- PlayerTextDrawTextSize(playerid, PlayerRegistro[playerid][0], 360.0, 10.0);
- PlayerTextDrawColor(playerid, PlayerRegistro[playerid][0], -1);
- PlayerTextDrawSetOutline(playerid, PlayerRegistro[playerid][0], 1);
- PlayerTextDrawSetProportional(playerid, PlayerRegistro[playerid][0], 1);
- PlayerRegistro[playerid][1] = CreatePlayerTextDraw(playerid, 292.000000, 192.000000, "Logar");
- PlayerTextDrawBackgroundColor(playerid, PlayerRegistro[playerid][1], 255);
- PlayerTextDrawFont(playerid, PlayerRegistro[playerid][1], 2);
- PlayerTextDrawLetterSize(playerid, PlayerRegistro[playerid][1], 0.340000, 1.400000);
- PlayerTextDrawTextSize(playerid, PlayerRegistro[playerid][1], 340.0, 10.0);
- PlayerTextDrawColor(playerid, PlayerRegistro[playerid][1], -1);
- PlayerTextDrawSetOutline(playerid, PlayerRegistro[playerid][1], 1);
- PlayerTextDrawSetProportional(playerid, PlayerRegistro[playerid][1], 1);
- PlayerRegistro[playerid][2] = CreatePlayerTextDraw(playerid, 298.000000, 224.000000, "Info");
- PlayerTextDrawBackgroundColor(playerid, PlayerRegistro[playerid][2], 255);
- PlayerTextDrawFont(playerid, PlayerRegistro[playerid][2], 2);
- PlayerTextDrawLetterSize(playerid, PlayerRegistro[playerid][2], 0.340000, 1.400000);
- PlayerTextDrawTextSize(playerid, PlayerRegistro[playerid][2], 340.0, 10.0);
- PlayerTextDrawColor(playerid, PlayerRegistro[playerid][2], -1);
- PlayerTextDrawSetOutline(playerid, PlayerRegistro[playerid][2], 1);
- PlayerTextDrawSetProportional(playerid, PlayerRegistro[playerid][2], 1);
- PlayerRegistro[playerid][3] = CreatePlayerTextDraw(playerid, 295.000000, 257.000000, "Dicas");
- PlayerTextDrawBackgroundColor(playerid, PlayerRegistro[playerid][3], 255);
- PlayerTextDrawFont(playerid, PlayerRegistro[playerid][3], 2);
- PlayerTextDrawLetterSize(playerid, PlayerRegistro[playerid][3], 0.340000, 1.400000);
- PlayerTextDrawTextSize(playerid, PlayerRegistro[playerid][3], 340.0, 10.0);
- PlayerTextDrawColor(playerid, PlayerRegistro[playerid][3], -1);
- PlayerTextDrawSetOutline(playerid, PlayerRegistro[playerid][3], 1);
- PlayerTextDrawSetProportional(playerid, PlayerRegistro[playerid][3], 1);
- PlayerRegistro[playerid][4] = CreatePlayerTextDraw(playerid, 301.000000, 290.000000, "Sair");
- PlayerTextDrawBackgroundColor(playerid, PlayerRegistro[playerid][4], 255);
- PlayerTextDrawFont(playerid, PlayerRegistro[playerid][4], 2);
- PlayerTextDrawLetterSize(playerid, PlayerRegistro[playerid][4], 0.340000, 1.400000);
- PlayerTextDrawTextSize(playerid, PlayerRegistro[playerid][4], 340.0, 10.0);
- PlayerTextDrawColor(playerid, PlayerRegistro[playerid][4], -1);
- PlayerTextDrawSetOutline(playerid, PlayerRegistro[playerid][4], 1);
- PlayerTextDrawSetProportional(playerid, PlayerRegistro[playerid][4], 1);
- PlayerRegistro[playerid][5] = CreatePlayerTextDraw(playerid, 394.000000, 159.000000, "Concluir");
- PlayerTextDrawBackgroundColor(playerid, PlayerRegistro[playerid][5], 255);
- PlayerTextDrawFont(playerid, PlayerRegistro[playerid][5], 2);
- PlayerTextDrawLetterSize(playerid, PlayerRegistro[playerid][5], 0.250000, 1.300000);
- PlayerTextDrawColor(playerid, PlayerRegistro[playerid][5], -1);
- PlayerTextDrawTextSize(playerid, PlayerRegistro[playerid][5], 430.0, 10.0);
- PlayerTextDrawSetOutline(playerid, PlayerRegistro[playerid][5], 1);
- PlayerTextDrawSetProportional(playerid, PlayerRegistro[playerid][5], 1);
- for(new a; a < sizeof(PlayerRegistro[playerid]); ++a) PlayerTextDrawSetSelectable(playerid, PlayerText:PlayerRegistro[playerid][a], true);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- CarregarTextPlayer(playerid);
- SelectTextDraw(playerid,0x35F344F);
- for(new i = 0; i < sizeof(Registro); i++) TextDrawShowForPlayer(playerid, Registro[i]);
- for(new i = 0; i < sizeof(PlayerRegistro[playerid]) - 1; i++) PlayerTextDrawShow(playerid, PlayerText: PlayerRegistro[playerid][i]);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- SalvarPlayer(playerid);
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(!playerInfo[playerid][Logado]) return 0;
- return 0;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- TogglePlayerSpectating(playerid, 1);
- InterpolateCameraPos(playerid, -2397.553710, 1436.038452, 140.798019, -2876.055175, 1382.189697, 159.150161, 17000);
- InterpolateCameraLookAt(playerid, -2401.776855, 1438.431640, 139.599197, -2872.188964, 1384.818359, 157.377395, 17000);
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new cmdString[200];
- switch (dialogid)
- {
- case DIALOG_REGISTRO:
- {
- if(response)
- {
- if(strlen(inputtext) < 5 || strlen(inputtext) > 16 || !strlen(inputtext))
- {
- SendClientMessage(playerid, COR_AVISO, "• Digite uma Senha com no Minimo 5 caracteres ou no Maximo 16");
- format(cmdString, sizeof(cmdString),"{F8F8FF}Bem Vindo(a) Ao Servidor {EE3B3B}%s{F8F8FF}\n\nVocê não tem uma Conta registrada\n\nDigite uma senha para Registrar\n\nStatus: {EE3B3B}N/A Registrado{F8F8FF}\n\nIP: {EE3B3B}%s", Nome(playerid), IP(playerid));
- return ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "~ REGISTRANDO ~", cmdString, "Registrar", "Cancelar");
- }
- DOF2_CreateFile(GetArquivo(playerid));
- DOF2_SetString(GetArquivo(playerid), "Nome", Nome(playerid));
- DOF2_SetString(GetArquivo(playerid), "Senha", inputtext);
- DOF2_SetInt(GetArquivo(playerid), "Administrador", 0);
- DOF2_SetInt(GetArquivo(playerid), "Level", 0);
- DOF2_SetInt(GetArquivo(playerid), "Skin", 19);
- DOF2_SetInt(GetArquivo(playerid), "Matou", 0);
- DOF2_SetInt(GetArquivo(playerid), "Morreu", 0);
- DOF2_SetInt(GetArquivo(playerid), "Dinheiro", 1000);
- DOF2_SaveFile();
- SendClientMessage(playerid, COR_SUCESSO, "• Registrado Com Sucesso Digite sua Senha para Logar.");
- format(cmdString, sizeof(cmdString),"{F8F8FF}Bem Vindo(a) Ao Servidor {EE3B3B}%s{F8F8FF}\n\nVocê ja tem uma Conta registrada\n\nDigite sua Senha para Logar\n\nStatus: {EE3B3B}Registrado{F8F8FF}\n\nIP: {EE3B3B}%s", Nome(playerid), IP(playerid));
- return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "~ LOGANDO ~", cmdString, "Logar", "Cancelar");
- }
- else
- {
- SelectTextDraw(playerid,0x35F344F);
- for(new i = 0; i < sizeof(Registro); i++) TextDrawShowForPlayer(playerid, Registro[i]);
- for(new i = 0; i < sizeof(PlayerRegistro[playerid]) - 1; i++) PlayerTextDrawShow(playerid, PlayerText: PlayerRegistro[playerid][i]);
- }
- }
- case DIALOG_LOGIN:
- {
- if(response)
- {
- if(!strlen(inputtext))
- {
- SendClientMessage(playerid, COR_AVISO, "• Você precisa digitar Sua Senha para Logar.");
- format(cmdString, sizeof(cmdString),"{F8F8FF}Bem Vindo(a) Ao Servidor {EE3B3B}%s{F8F8FF}\n\nVocê ja tem uma Conta registrada\n\nDigite sua Senha para Logar\n\nStatus: {EE3B3B}Registrado{F8F8FF}\n\nIP: {EE3B3B}%s", Nome(playerid), IP(playerid));
- return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "~ LOGANDO ~", cmdString, "Logar", "Cancelar");
- }
- if(strcmp(inputtext, DOF2_GetString(GetArquivo(playerid), "Senha"), false) == 0)
- {
- return CarregarPlayer(playerid);
- }
- else
- {
- SendClientMessage(playerid, COR_AVISO, "• Atenção você digitou sua senha Errado, Digite-a Novamente.");
- format(cmdString, sizeof(cmdString),"{F8F8FF}Bem Vindo(a) Ao Servidor {EE3B3B}%s{F8F8FF}\n\nVocê ja tem uma Conta registrada\n\nDigite sua Senha para Logar\n\nStatus: {EE3B3B}Registrado{F8F8FF}\n\nIP: {EE3B3B}%s", Nome(playerid), IP(playerid));
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "~ LOGANDO ~", cmdString, "Logar", "Cancelar");
- playerInfo[playerid][ERRO]++;
- if(playerInfo[playerid][ERRO] == 3)
- {
- format(cmdString, sizeof(cmdString),"• O Jogador(a) %s foi Kickado do Servidor | Motivo: Limite de Erro |", Nome(playerid), IP(playerid));
- SendClientMessageToAll(COR_ADMIN, cmdString);
- return Kick(playerid);
- }
- }
- }
- else
- {
- SelectTextDraw(playerid,0x35F344F);
- for(new i = 0; i < sizeof(Registro); i++) TextDrawShowForPlayer(playerid, Registro[i]);
- for(new i = 0; i < sizeof(PlayerRegistro[playerid]) - 1; i++) PlayerTextDrawShow(playerid, PlayerText: PlayerRegistro[playerid][i]);
- }
- }
- }
- return 1;
- }
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- {
- if(clickedid == Text: INVALID_TEXT_DRAW && playerInfo[playerid][Logado] == false)
- {
- SelectTextDraw(playerid,0x35F344F);
- }
- return 1;
- }
- public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
- {
- new cmdString[200];
- if(playertextid == PlayerRegistro[playerid][0])
- {
- if(DOF2_FileExists(GetArquivo(playerid)))
- return SendClientMessage(playerid, COR_AVISO, "• Você ja tem uma Conta, Clique em Logar para Logar.");
- for(new i = 4; i < sizeof(Registro); i++) { TextDrawHideForPlayer(playerid, Registro[i]); }
- for(new i; i < sizeof(PlayerRegistro[playerid]); i++) { PlayerTextDrawHide(playerid, PlayerRegistro[playerid][i]); }
- format(cmdString, sizeof(cmdString),"{F8F8FF}Bem Vindo(a) Ao Servidor {EE3B3B}%s{F8F8FF}\n\nVocê não tem uma Conta registrada\n\nDigite uma senha para Registrar\n\nStatus: {EE3B3B}N/A Registrado{F8F8FF}\n\nIP: {EE3B3B}%s", Nome(playerid), IP(playerid));
- ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "~ REGISTRANDO ~", cmdString, "Registrar", "Cancelar");
- }
- if(playertextid == PlayerRegistro[playerid][1])
- {
- if(DOF2_FileExists(GetArquivo(playerid)))
- {
- for(new i = 4; i < sizeof(Registro); i++) { TextDrawHideForPlayer(playerid, Registro[i]); }
- for(new i; i < sizeof(PlayerRegistro[playerid]); i++) { PlayerTextDrawHide(playerid, PlayerRegistro[playerid][i]); }
- format(cmdString, sizeof(cmdString),"{F8F8FF}Bem Vindo(a) Ao Servidor {EE3B3B}%s{F8F8FF}\n\nVocê ja tem uma Conta registrada\n\nDigite sua Senha para Logar\n\nStatus: {EE3B3B}Registrado{F8F8FF}\n\nIP: {EE3B3B}%s", Nome(playerid), IP(playerid));
- return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "~ LOGANDO ~", cmdString, "Logar", "Cancelar");
- }
- return SendClientMessage(playerid, COR_AVISO, "• Você não tem uma Conta, Clique em Registrar para Registrar.");
- }
- if(playertextid == PlayerRegistro[playerid][2])
- {
- for(new i = 4; i < sizeof(Registro); i++) { TextDrawHideForPlayer(playerid, Registro[i]); }
- for(new i; i < sizeof(PlayerRegistro[playerid]); i++) { PlayerTextDrawHide(playerid, PlayerRegistro[playerid][i]); }
- for(new i = 0; i < sizeof(Info); i++) { TextDrawShowForPlayer(playerid, Info[i]); }
- PlayerTextDrawShow(playerid, PlayerRegistro[playerid][5]);
- }
- if(playertextid == PlayerRegistro[playerid][3])
- {
- for(new i = 4; i < sizeof(Registro); i++) { TextDrawHideForPlayer(playerid, Registro[i]); }
- for(new i; i < sizeof(PlayerRegistro[playerid]); i++) { PlayerTextDrawHide(playerid, PlayerRegistro[playerid][i]); }
- for(new i = 0; i < sizeof(Dicas); i++) { TextDrawShowForPlayer(playerid, Dicas[i]); }
- PlayerTextDrawShow(playerid, PlayerRegistro[playerid][5]);
- }
- if(playertextid == PlayerRegistro[playerid][4])
- {
- format(cmdString, sizeof(cmdString), "O Jogador %s Resolveu sair do Servidor", Nome(playerid));
- SendClientMessageToAll(COR_ADMIN, cmdString);
- GameTextForPlayer(playerid, "~", 1000, 6);
- }
- if(playertextid == PlayerRegistro[playerid][5])
- {
- for(new i; i < sizeof(Registro); i++) { TextDrawShowForPlayer(playerid, Registro[i]); }
- for(new i; i < sizeof(PlayerRegistro[playerid]) - 1; i++) { PlayerTextDrawShow(playerid, PlayerRegistro[playerid][i]); }
- for(new i = 0; i < sizeof(Info); i++) { TextDrawHideForPlayer(playerid, Info[i]); }
- for(new i = 0; i < sizeof(Dicas); i++) { TextDrawHideForPlayer(playerid, Dicas[i]); }
- PlayerTextDrawHide(playerid, PlayerRegistro[playerid][5]);
- }
- return 1;
- }
- stock SalvarPlayer(playerid)
- {
- if(DOF2_FileExists(GetArquivo(playerid)))
- {
- playerInfo[playerid][Level] = GetPlayerScore(playerid);
- DOF2_SetInt(GetArquivo(playerid), "Administrador", playerInfo[playerid][Administrador]);
- DOF2_SetInt(GetArquivo(playerid), "Level", playerInfo[playerid][Level]);
- DOF2_SetInt(GetArquivo(playerid), "Skin", playerInfo[playerid][Skin]);
- DOF2_SetInt(GetArquivo(playerid), "Matou", playerInfo[playerid][Matou]);
- DOF2_SetInt(GetArquivo(playerid), "Morreu", playerInfo[playerid][Morreu]);
- DOF2_SetInt(GetArquivo(playerid), "Dinheiro", GetPlayerMoney(playerid));
- DOF2_SaveFile();
- }
- return 1;
- }
- stock CarregarPlayer(playerid)
- {
- if(DOF2_FileExists(GetArquivo(playerid)))
- {
- playerInfo[playerid][Administrador] = DOF2_GetInt(GetArquivo(playerid), "Administrador");
- playerInfo[playerid][Level] = DOF2_GetInt(GetArquivo(playerid), "Level");
- playerInfo[playerid][Skin] = DOF2_GetInt(GetArquivo(playerid), "Skin");
- playerInfo[playerid][Matou] = DOF2_GetInt(GetArquivo(playerid), "Matou");
- playerInfo[playerid][Morreu] = DOF2_GetInt(GetArquivo(playerid), "Morreu");
- playerInfo[playerid][Dinheiro] = DOF2_GetInt(GetArquivo(playerid), "Dinheiro");
- for(new i = 0; i < sizeof(Registro); i++) { TextDrawHideForPlayer(playerid, Registro[i]);}
- for(new i = 0; i < sizeof(PlayerRegistro[playerid]); i++) { PlayerTextDrawHide(playerid, PlayerRegistro[playerid][i]);}
- playerInfo[playerid][Logado] = true;
- TogglePlayerSpectating(playerid, 0);
- CancelSelectTextDraw(playerid);
- SpawnPlayer(playerid);
- GivePlayerMoney(playerid, playerInfo[playerid][Dinheiro]);
- SetPlayerSkin(playerid, playerInfo[playerid][Skin]);
- }
- return 1;
- }
- stock IP(playerid)
- {
- static pIP[26];
- GetPlayerIp(playerid, pIP, sizeof(pIP));
- return pIP;
- }
- stock Nome(playerid)
- {
- static ANome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, ANome, sizeof(ANome));
- return ANome;
- }
- stock GetArquivo(playerid)
- {
- static arquivo[50];
- format(arquivo, sizeof(arquivo), "Contas/%s.ini", Nome(playerid));
- return arquivo;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement