Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- GameMode Criado por : Fábio Stralioti
- SCRIPTER FÓRUM GTA TORCIDAS !
- ******** ************ ********* **** *************
- ******** ************ ********* **** *************
- **** **** **** **** ** **** ***** *****
- **** **** **** **** ** **** ***** *****
- ******** ************ ********* **** ***** *****
- ******** ************ ********* **** ***** *****
- **** **** **** **** ** **** ***** *****
- **** **** **** ********* **** *************
- **** **** **** ********* **** *************
- reupload, perdi a senha da outra conta do pastebin e estou postando tudo nesta rsrsrs
- */
- #include <a_samp>
- #include <zcmd>
- #include <sscanf>
- #include <dof2>
- #pragma tabsize 0
- #define DIALOG_LOGAR 1
- #define DIALOG_REGISTRO 2
- #define DIALOG_COMANDOS 3
- enum pInfo
- {
- pSenha
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new Text:Textdraw0;
- new Text:Textdraw1;
- new Text:Textdraw2;
- new Erro[MAX_PLAYERS];
- forward hora(playerid);
- main()
- {
- print("\n----------------------------------");
- print("GameMode Treino de Tiro");
- print("Feito Por : Fábio Stralioti");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- SetGameModeText("TT1.0");
- LimitGlobalChatRadius(30);
- DisableInteriorEnterExits();
- UsePlayerPedAnims();
- AddPlayerClass(286,-1616.6968,682.5148,-5.2422,276.9759,0,0,0,0,0,0);
- AddStaticVehicle(597,-1616.6212,691.5457,-5.4738,3.5239,79,1);
- AddStaticVehicle(523,-1598.7529,674.3570,6.7329,181.7815,79,1);
- AddStaticVehicle(597,-1613.0400,692.7591,-5.4734,356.2501,79,1);
- AddStaticVehicle(597,-1608.2551,692.5764,-5.4741,0.6081,79,1);
- AddStaticVehicle(523,-1594.4698,673.2628,6.7541,174.1257,79,1);
- AddStaticVehicle(523,-1586.4838,672.9091,6.7579,174.1916,79,1);
- Textdraw0 = TextDrawCreate(526.000000, 369.000000, "Treino Tiro");
- TextDrawBackgroundColor(Textdraw0, 255);
- TextDrawFont(Textdraw0, 3);
- TextDrawLetterSize(Textdraw0, 0.490000, 2.899999);
- TextDrawColor(Textdraw0, -16776961);
- TextDrawSetOutline(Textdraw0, 0);
- TextDrawSetProportional(Textdraw0, 1);
- TextDrawSetShadow(Textdraw0, 1);
- Textdraw1 = TextDrawCreate(539.000000, 12.000000, "00/00/00");
- TextDrawBackgroundColor(Textdraw1, 255);
- TextDrawFont(Textdraw1, 1);
- TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
- TextDrawColor(Textdraw1, -16776961);
- TextDrawSetOutline(Textdraw1, 0);
- TextDrawSetProportional(Textdraw1, 1);
- TextDrawSetShadow(Textdraw1, 1);
- Textdraw2 = TextDrawCreate(542.000000, 32.000000, "00:00:00");
- TextDrawBackgroundColor(Textdraw2, 255);
- TextDrawFont(Textdraw2, 1);
- TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
- TextDrawColor(Textdraw2, -16776961);
- TextDrawSetOutline(Textdraw2, 0);
- TextDrawSetProportional(Textdraw2, 1);
- TextDrawSetShadow(Textdraw2, 1);
- SetTimer("hora",1000,1);
- return 1;
- }
- public OnGameModeExit()
- {
- DOF2_Exit();
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, -1,"GameMode treino de tiro feito por : Fábio Stralioti");
- new name[MAX_PLAYER_NAME];
- new arquivo[40];
- GetPlayerName(playerid, name, 32);
- format(arquivo, 40, "Jogadores/%s.ini", name);
- if(DOF2_FileExists(arquivo))
- {
- ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "GameMode Treino de Tiro - Login", "Status da conta : Registrada\n digite sua senha para logar!\nSe errar 5 vezes sua conta será banida!", "Logar", "Cancelar");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "GameMode Treino de Tiro - Registro", "Status da conta : Não Registrada\n digite uma senha para se registrar!", "Registrar", "Cancelar");
- }
- TextDrawShowForPlayer(playerid, Textdraw0);
- TextDrawShowForPlayer(playerid, Textdraw1);
- TextDrawShowForPlayer(playerid, Textdraw2);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new arquivo[40], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, 32);
- format(arquivo, 40, "Jogadores/%s.ini", name);
- if(DOF2_FileExists(arquivo))
- {
- DOF2_SetInt(arquivo, "Senha", PlayerInfo[playerid][pSenha]);
- DOF2_SaveFile();
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new arquivo[40], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, 32);
- format(arquivo, 40, "Jogadores/%s.ini", name);
- if(dialogid == DIALOG_REGISTRO)
- {
- if(!strval(inputtext))
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "Treino de Tiro - Registro", "Status da conta : Não Registrada\n digite uma senha para se registrar!", "Registrar", "Cancelar");
- SendClientMessage(playerid, -1, "Erro, Digite apenas números para se registrar.");
- return 1;
- }
- if(!response)
- {
- Kick(playerid);
- return 1;
- }
- else
- {
- PlayerInfo[playerid][pSenha] = strval(inputtext);
- DOF2_CreateFile(arquivo);
- DOF2_SetInt(arquivo, "Senha", PlayerInfo[playerid][pSenha]);
- DOF2_SaveFile();
- SendClientMessage(playerid, -1, "Sua Conta foi Registrada, Agora digite sua senha novamente para logar!");
- ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Treino de Tiro - Login", "Status da conta : Registrada\n digite sua senha para logar!\nSe errar 5 vezes sua conta será banida!", "Logar", "Cancelar");
- }
- }
- if(dialogid == DIALOG_LOGAR)
- {
- if(!strval(inputtext))
- {
- SendClientMessage(playerid, -1, "Erro, Digite apenas números para se logar.");
- ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Treino de Tiro - Login", "Status da conta : Registrada\n digite sua senha para logar!\nSe errar 5 vezes sua conta será banida!", "Logar", "Cancelar");
- return 1;
- }
- if(!response)
- {
- Kick(playerid);
- return 1;
- }
- else
- {
- PlayerInfo[playerid][pSenha] = DOF2_GetInt(arquivo, "Senha");
- if(strval(inputtext) == PlayerInfo[playerid][pSenha])
- {
- SpawnPlayer(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Treino de Tiro - Login", "Status da conta : Registrada\n digite sua senha para logar!\nSe errar 5 vezes sua conta será banida!", "Logar", "Cancelar");
- Erro[playerid]++;
- if(Erro[playerid] == 5)
- {
- SendClientMessage(playerid, -1, "Sua conta está banida por errar 5 vezes a sua senha, contacte o Admin para retirar seu Ban!");
- Ban(playerid);
- return 1;
- }
- }
- }
- }
- return 1;
- }
- public hora(playerid)
- {
- new str[128],
- str2[128],
- year,
- month,
- day,
- hour,
- minute,
- second;
- getdate(year, month, day);
- gettime(hour,minute,second);
- new mes[12];
- if(month == 1) { mes = "1"; }
- else if(month == 2) {mes = "2";}
- else if(month == 3) {mes = "3";}
- else if(month == 4) {mes = "4";}
- else if(month == 5) {mes = "5";}
- else if(month == 6) {mes = "6";}
- else if(month == 7) {mes = "7";}
- else if(month == 8) {mes = "8";}
- else if(month == 9) {mes = "9";}
- else if(month == 10) {mes = "10";}
- else if(month == 11) {mes = "11";}
- else if(month == 12) {mes= "12";}
- format(str, sizeof(str), "%d/%s/%d", day, mes,year);
- TextDrawSetString(Text:Textdraw1, str);
- format(str2, sizeof(str2), "%d:%d:%d", hour, minute, second);
- TextDrawSetString(Text:Textdraw2, str2);
- }
- CMD:equipar(playerid)
- {
- new name[MAX_PLAYER_NAME], string[23 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "O Player %s se equipou", name);
- SendClientMessageToAll(-1, string);
- GivePlayerWeapon(playerid, 25, 999);
- GivePlayerWeapon(playerid, 3, 999);
- return 1;
- }
- CMD:tr(playerid, params[])
- {
- new id, Float: x, Float: y, Float: z, string[256], string2[256], namep[MAX_PLAYER_NAME], namead[MAX_PLAYER_NAME];
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1,"Use: /tr [id]");
- if(id == playerid) return SendClientMessage(playerid, -1, "Você não pode trazer em você mesmo...");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1,"Este jogador não está online.");
- GetPlayerName(playerid, namead, sizeof(namead));
- GetPlayerName(id, namep, sizeof(namep));
- format(string, sizeof(string), "Trouxe o player %s até você.", namep);
- format(string2, sizeof(string2), "%s trouxe você até ele.", namead);
- SendClientMessage(playerid, -1, string);
- SendClientMessage(id, -1, string2);
- GetPlayerPos(playerid, x, y, z);
- SetPlayerPos(id, x+1, y+1, z);
- return 1;
- }
- CMD:ir(playerid, params[])
- {
- new id = strval(params);
- if(isnull(params)) return SendClientMessage(playerid, -1, "/ir [playerid]");
- if(id == playerid) return SendClientMessage(playerid, -1, "Você não pode ir em você mesmo...");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "O player não está conectado");
- new Float:X2, Float:Y2, Float:Z2, Pname[24];
- GetPlayerPos(id, X2, Y2, Z2);
- GetPlayerName(id, Pname, 24);
- SetPlayerPos(playerid, X2, Y2, Z2);
- new String[56];
- format(String, sizeof(String), "Você foi ate %s(%d)", Pname, id);
- SendClientMessage(playerid, -1, String);
- return 1;
- }
- CMD:vidat(playerid)
- {
- new i;
- SetPlayerHealth(i,100);
- new string2[72];
- format(string2, sizeof(string2), "Admin: %s deu vida para todos",(playerid));
- SendClientMessageToAll( -1, string2);
- SendClientMessage(playerid, -1, "Você deu vida para todos");
- return 1;
- }
- CMD:creditos(playerid)
- {
- SendClientMessage(playerid, -1,"GameMode feito por : Fábio Stralioti");
- return 1;
- }
- CMD:rtc(playerid)
- {
- ResetarCarros(playerid);
- return 1;
- }
- CMD:comandos(playerid)
- {
- new dialogrande[1024];
- format(dialogrande, sizeof(dialogrande),"%s%s",dialogrande,"/equipar\n/vidat\n/ir\n/tr\n/creditos\n/rtc\n");
- ShowPlayerDialog(playerid,DIALOG_COMANDOS, DIALOG_STYLE_MSGBOX, "Comandos", dialogrande, "OK", "");
- return 1;
- }
- stock ReturnPlayer(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,MAX_PLAYER_NAME);
- return name;
- }
- stock ResetarCarros(playerid)
- {
- new string[128];
- GetPlayerName(playerid, string, MAX_PLAYER_NAME);
- format(string, sizeof(string), "O player %s respawnou todos os veiculos", string);
- SendClientMessageToAll(-1, string);
- new bool:inVeh;
- for( new i = 0; i < MAX_VEHICLES; i++ )
- {
- inVeh = false;
- for( new j = 0; j < MAX_PLAYERS; j++ )
- {
- if(IsPlayerInVehicle( j, i ))
- {
- inVeh = true;
- }
- }
- if(!inVeh) SetVehicleToRespawn(i);
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment