Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <sscanf>
- #include <DOF2>
- #include <string>
- #include <cpstream>
- #include <streamer>
- #define Red 0xFF0000FF
- #define Pink 0xFF44AAFF
- #define pasta_race "/Races/%02d.ini"
- #define pasta_veiculos "/Veiculos/%02d.ini"
- #undef MAX_PLAYERS
- #define MAX_PLAYERS 50
- new bool:EventoIniciou;
- new Anuncio;
- new TimerCountCP[MAX_PLAYERS];
- new bool:AutoRepararX[MAX_PLAYERS];
- new Text:TextdrawAnuncio;
- new PlayerText:TextContar[MAX_PLAYERS+1];
- new PlayerText:InicioRace0[MAX_PLAYERS];
- new PlayerText:InicioRace1[MAX_PLAYERS];
- new PlayerText:InicioRace2[MAX_PLAYERS];
- new PlayerText:InicioRace3[MAX_PLAYERS];
- new PlayerText:InicioRace4[MAX_PLAYERS];
- new PlayerText:InicioRace5[MAX_PLAYERS];
- new PlayerText:InicioRace6[MAX_PLAYERS];
- new PlayerText:InicioRace7[MAX_PLAYERS];
- new PlayerText:Textdraw0[MAX_PLAYERS];
- new PlayerText:Textdraw1[MAX_PLAYERS];
- new PlayerText:Textdraw2[MAX_PLAYERS];
- new PlayerText:Textdraw5[MAX_PLAYERS];
- new PlayerText:Textdraw6[MAX_PLAYERS];
- new PlayerText:Textdraw7[MAX_PLAYERS];
- new PlayerText:Textdraw8[MAX_PLAYERS];
- new PlayerText:Textdraw9[MAX_PLAYERS];
- new PlayerText:Textdraw10[MAX_PLAYERS];
- new PlayerText:CPConquistado[MAX_PLAYERS];
- /*new Colocados[MAX_PLAYERS];
- new AtualizarText[MAX_PLAYERS];*/
- new String[128],
- String2[128],
- String3[128],
- String4[128],
- String5[128],
- String6[128],
- Primeiro[50],
- Segundo[50],
- Terceiro[50],
- Quarto[50],
- Quinto[50];
- new bool:Colision = false;
- new bool:AlguemGanhou[MAX_PLAYERS] = false;
- new Terminou = 0;
- new Lugar[MAX_PLAYERS];
- new PlayersEvento;
- new PlayerText:TempoCorrida[MAX_PLAYERS];
- new AutoReparar[MAX_PLAYERS];
- new bool:Congelado = true;
- new bool:Status = false; // DEFINE SE O EVENTO ESTÁ FECHADO OU ABERTO. FALSE SE ESTIVER ABERTO
- new Float:PosEvento[3];
- new Vagas = 0;
- new IRVeiculos;
- new bool:Evento[MAX_PLAYERS] = false;
- new bool:EventoCriado = false;
- new Count[MAX_PLAYERS];
- new TimerCount[MAX_PLAYERS];
- new TempoMinimo[3];
- new Tempo[MAX_PLAYERS][4];
- new TempoRecorde[MAX_PLAYERS];
- new TamanhoCPS = 15;
- new Float:CP[3];
- new CPCountX[MAX_PLAYERS];
- new CPCountY[MAX_PLAYERS];
- new CPCountZ[MAX_PLAYERS];
- new str[128];
- new CPCount;
- new AddCP[MAX_PLAYERS] = 0; // Checkpoints conquistados pelo jogador(a)
- new TotalCPS;
- new RaceName;
- new bool:CriacaoAndamento = false;
- new bool:CPAtivado = false;
- new CPCarregado;
- new CPID;
- new Float:Position[4];
- new PosV = 0;
- new DistanciaV = 4;
- new Veiculo[MAX_VEHICLES];
- new TotalVeiculos;
- new Float:Pos[4];
- new Cor[2] = 1;
- new Modelo;
- new Str[128];
- new IDVeiculos;
- new bool:Salvando = false;
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Race filterscript by Gami");
- print("--------------------------------------\n");
- CriacaoAndamento = false;
- CPAtivado = false;
- RaceName = CPID;
- IRVeiculos = 0;
- TextdrawAnuncio = TextDrawCreate(306.399871, 153.315612, "");
- TextDrawLetterSize(TextdrawAnuncio, 0.322797, 1.943465);
- TextDrawAlignment(TextdrawAnuncio, 2);
- TextDrawSetShadow(TextdrawAnuncio, 0);
- TextDrawSetOutline(TextdrawAnuncio, -1);
- TextDrawBackgroundColor(TextdrawAnuncio, 51);
- TextDrawFont(TextdrawAnuncio, 1);
- TextDrawSetProportional(TextdrawAnuncio, 1);
- for(new I = 0; I < MAX_PLAYERS+1; I++){
- CPConquistado[I] = CreatePlayerTextDraw(I, 321.199920, 359.893463, "");
- PlayerTextDrawLetterSize(I, CPConquistado[I], 0.449999, 1.600000);
- PlayerTextDrawAlignment(I, CPConquistado[I], 2);
- PlayerTextDrawColor(I, CPConquistado[I], -1);
- PlayerTextDrawSetShadow(I, CPConquistado[I], 0);
- PlayerTextDrawSetOutline(I, CPConquistado[I], -1);
- PlayerTextDrawBackgroundColor(I, CPConquistado[I], 51);
- PlayerTextDrawFont(I, CPConquistado[I], 2);
- PlayerTextDrawSetProportional(I, CPConquistado[I], 1);
- Textdraw10[I] = CreatePlayerTextDraw(I, 530.399963, 212.551101, "9|:");
- PlayerTextDrawLetterSize(I, Textdraw10[I], 0.203997, 2.172444);
- PlayerTextDrawAlignment(I, Textdraw10[I], 1);
- PlayerTextDrawColor(I, Textdraw10[I], -1);
- PlayerTextDrawSetShadow(I, Textdraw10[I], 0);
- PlayerTextDrawSetOutline(I, Textdraw10[I], 1);
- PlayerTextDrawBackgroundColor(I, Textdraw10[I], 51);
- PlayerTextDrawFont(I, Textdraw10[I], 1);
- PlayerTextDrawSetProportional(I, Textdraw10[I], 1);
- Textdraw0[I] = CreatePlayerTextDraw(I, 530.799987, 104.540000, "usebox");
- PlayerTextDrawLetterSize(I, Textdraw0[I], 0.000000, 20.589998);
- PlayerTextDrawTextSize(I, Textdraw0[I], 632.000000, 0.000000);
- PlayerTextDrawAlignment(I, Textdraw0[I], 1);
- PlayerTextDrawColor(I, Textdraw0[I], 0);
- PlayerTextDrawUseBox(I, Textdraw0[I], true);
- PlayerTextDrawBoxColor(I, Textdraw0[I], 102);
- PlayerTextDrawSetShadow(I, Textdraw0[I], 0);
- PlayerTextDrawSetOutline(I, Textdraw0[I], 0);
- PlayerTextDrawFont(I, Textdraw0[I], 0);
- Textdraw1[I] = CreatePlayerTextDraw(I, 581.200683, 105.031028, "Race Info");
- PlayerTextDrawLetterSize(I, Textdraw1[I], 0.179600, 0.942933);
- PlayerTextDrawTextSize(I, Textdraw1[I], 381.199920, 101.546730);
- PlayerTextDrawAlignment(I, Textdraw1[I], 2);
- PlayerTextDrawColor(I, Textdraw1[I], 255);
- PlayerTextDrawUseBox(I, Textdraw1[I], true);
- PlayerTextDrawBoxColor(I, Textdraw1[I], -5963521);
- PlayerTextDrawSetShadow(I, Textdraw1[I], 0);
- PlayerTextDrawSetOutline(I, Textdraw1[I], 0);
- PlayerTextDrawBackgroundColor(I, Textdraw1[I], 51);
- PlayerTextDrawFont(I, Textdraw1[I], 2);
- PlayerTextDrawSetProportional(I, Textdraw1[I], 1);
- Textdraw2[I] = CreatePlayerTextDraw(I, 530.000000, 117.973381, "~y~~h~1|: ~r~Ninguem");
- PlayerTextDrawLetterSize(I, Textdraw2[I], 0.157999, 1.077331);
- PlayerTextDrawAlignment(I, Textdraw2[I], 1);
- PlayerTextDrawColor(I, Textdraw2[I], -1);
- PlayerTextDrawSetShadow(I, Textdraw2[I], 0);
- PlayerTextDrawSetOutline(I, Textdraw2[I], 1);
- PlayerTextDrawBackgroundColor(I, Textdraw2[I], 51);
- PlayerTextDrawFont(I, Textdraw2[I], 1);
- PlayerTextDrawSetProportional(I, Textdraw2[I], 1);
- /*
- Textdraw3[I] = CreatePlayerTextDraw(I, 557.599975, 271.288970, "/10");
- PlayerTextDrawLetterSize(I, Textdraw3[I], 0.409999, 2.072885);
- PlayerTextDrawAlignment(I, Textdraw3[I], 1);
- PlayerTextDrawColor(I, Textdraw3[I], -1378294017);
- PlayerTextDrawSetShadow(I, Textdraw3[I], 0);
- PlayerTextDrawSetOutline(I, Textdraw3[I], 1);
- PlayerTextDrawBackgroundColor(I, Textdraw3[I], 51);
- PlayerTextDrawFont(I, Textdraw3[I], 3);
- PlayerTextDrawSetProportional(I, Textdraw3[I], 1);
- Textdraw4[I] = CreatePlayerTextDraw(I, 532.800048, 250.880004, "2|");
- PlayerTextDrawLetterSize(I, Textdraw4[I], 0.607999, 3.964443);
- PlayerTextDrawAlignment(I, Textdraw4[I], 1);
- PlayerTextDrawColor(I, Textdraw4[I], -1378294017);
- PlayerTextDrawSetShadow(I, Textdraw4[I], 0);
- PlayerTextDrawSetOutline(I, Textdraw4[I], 1);
- PlayerTextDrawBackgroundColor(I, Textdraw4[I], 51);
- PlayerTextDrawFont(I, Textdraw4[I], 3);
- PlayerTextDrawSetProportional(I, Textdraw4[I], 1)
- */
- Textdraw5[I] = CreatePlayerTextDraw(I, 603.599792, 272.782257, "x/x");
- PlayerTextDrawLetterSize(I, Textdraw5[I], 0.275999, 1.600000);
- PlayerTextDrawAlignment(I, Textdraw5[I], 1);
- PlayerTextDrawColor(I, Textdraw5[I], -2147483393);
- PlayerTextDrawSetShadow(I, Textdraw5[I], 0);
- PlayerTextDrawSetOutline(I, Textdraw5[I], 1);
- PlayerTextDrawBackgroundColor(I, Textdraw5[I], 51);
- PlayerTextDrawFont(I, Textdraw5[I], 1);
- PlayerTextDrawSetProportional(I, Textdraw5[I], 1);
- Textdraw6[I] = CreatePlayerTextDraw(I, 530.000000, 134.897872, "~y~~h~2|: ~r~Ninguem");
- PlayerTextDrawLetterSize(I, Textdraw6[I], 0.157999, 1.077331);
- PlayerTextDrawAlignment(I, Textdraw6[I], 1);
- PlayerTextDrawColor(I, Textdraw6[I], -1);
- PlayerTextDrawSetShadow(I, Textdraw6[I], 0);
- PlayerTextDrawSetOutline(I, Textdraw6[I], 1);
- PlayerTextDrawBackgroundColor(I, Textdraw6[I], 51);
- PlayerTextDrawFont(I, Textdraw6[I], 1);
- PlayerTextDrawSetProportional(I, Textdraw6[I], 1);
- Textdraw7[I] = CreatePlayerTextDraw(I, 530.000000, 152.817825, "~y~~h~3|: ~r~Ninguem");
- PlayerTextDrawLetterSize(I, Textdraw7[I], 0.157999, 1.077331);
- PlayerTextDrawAlignment(I, Textdraw7[I], 1);
- PlayerTextDrawColor(I, Textdraw7[I], -1);
- PlayerTextDrawSetShadow(I, Textdraw7[I], 0);
- PlayerTextDrawSetOutline(I, Textdraw7[I], 1);
- PlayerTextDrawBackgroundColor(I, Textdraw7[I], 51);
- PlayerTextDrawFont(I, Textdraw7[I], 1);
- PlayerTextDrawSetProportional(I, Textdraw7[I], 1);
- Textdraw8[I] = CreatePlayerTextDraw(I, 529.599975, 172.231155, "~y~~h~4|: ~r~Ninguem");
- PlayerTextDrawLetterSize(I, Textdraw8[I], 0.157999, 1.077331);
- PlayerTextDrawAlignment(I, Textdraw8[I], 1);
- PlayerTextDrawColor(I, Textdraw8[I], -1);
- PlayerTextDrawSetShadow(I, Textdraw8[I], 0);
- PlayerTextDrawSetOutline(I, Textdraw8[I], 1);
- PlayerTextDrawBackgroundColor(I, Textdraw8[I], 51);
- PlayerTextDrawFont(I, Textdraw8[I], 1);
- PlayerTextDrawSetProportional(I, Textdraw8[I], 1);
- Textdraw9[I] = CreatePlayerTextDraw(I, 530.000000, 189.653366, "~y~~h~5|: ~r~Ninguem");
- PlayerTextDrawLetterSize(I, Textdraw9[I], 0.157999, 1.077331);
- PlayerTextDrawAlignment(I, Textdraw9[I], 1);
- PlayerTextDrawColor(I, Textdraw9[I], -1);
- PlayerTextDrawSetShadow(I, Textdraw9[I], 0);
- PlayerTextDrawSetOutline(I, Textdraw9[I], 1);
- PlayerTextDrawBackgroundColor(I, Textdraw9[I], 51);
- PlayerTextDrawFont(I, Textdraw9[I], 1);
- PlayerTextDrawSetProportional(I, Textdraw9[I], 1);
- TempoCorrida[I] = CreatePlayerTextDraw(I, 14.400009, 238.933471, "00:00:00");
- PlayerTextDrawFont(I, TempoCorrida[I], 1);
- PlayerTextDrawLetterSize(I, TempoCorrida[I], 0.225000, 1.251000);
- PlayerTextDrawColor(I, TempoCorrida[I], -1);
- PlayerTextDrawSetOutline(I, TempoCorrida[I], 1);
- PlayerTextDrawSetProportional(I, TempoCorrida[I], 1);
- TextContar[I] = CreatePlayerTextDraw(I, 229.200103, 361.386688, "");
- PlayerTextDrawLetterSize(I, TextContar[I], 0.449999, 1.600000);
- PlayerTextDrawAlignment(I, TextContar[I], 1);
- PlayerTextDrawColor(I, TextContar[I], -1);
- PlayerTextDrawSetShadow(I, TextContar[I], 0);
- PlayerTextDrawSetOutline(I, TextContar[I], 1);
- PlayerTextDrawBackgroundColor(I, TextContar[I], 51);
- PlayerTextDrawFont(I, TextContar[I], 1);
- PlayerTextDrawSetProportional(I, TextContar[I], 1);
- InicioRace0[I] = CreatePlayerTextDraw(I, 150.800003, 255.366668, "usebox"); // BOX
- PlayerTextDrawLetterSize(I, InicioRace0[I], 0.000000, 6.430986);
- PlayerTextDrawTextSize(I, InicioRace0[I], 12.400000, 0.000000);
- PlayerTextDrawAlignment(I, InicioRace0[I], 1);
- PlayerTextDrawColor(I, InicioRace0[I], 0);
- PlayerTextDrawUseBox(I, InicioRace0[I], true);
- PlayerTextDrawBoxColor(I, InicioRace0[I], 102);
- PlayerTextDrawSetShadow(I, InicioRace0[I], 0);
- PlayerTextDrawSetOutline(I, InicioRace0[I], 0);
- PlayerTextDrawFont(I, InicioRace0[I], 0);
- InicioRace7[I] = CreatePlayerTextDraw(I, 81.431015, 255.857666, "Race Info");
- PlayerTextDrawLetterSize(I, InicioRace7[I], 0.169600, 1.375999);
- PlayerTextDrawTextSize(I, InicioRace7[I], 3814.800292, 130.915496);
- PlayerTextDrawAlignment(I, InicioRace7[I], 2);
- PlayerTextDrawColor(I, InicioRace7[I], 255);
- PlayerTextDrawUseBox(I, InicioRace7[I], true);
- PlayerTextDrawBoxColor(I, InicioRace7[I], -1523963137);
- PlayerTextDrawSetShadow(I, InicioRace7[I], 0);
- PlayerTextDrawSetOutline(I, InicioRace7[I], 0);
- PlayerTextDrawBackgroundColor(I, InicioRace7[I], 51);
- PlayerTextDrawFont(I, InicioRace7[I], 2);
- PlayerTextDrawSetProportional(I, InicioRace7[I], 1);
- InicioRace1[I] = CreatePlayerTextDraw(I, 16.400007, 270.791229, "~b~~h~Checkpoints ID:");
- PlayerTextDrawLetterSize(I, InicioRace1[I], 0.262000, 1.127111);
- PlayerTextDrawAlignment(I, InicioRace1[I], 1);
- PlayerTextDrawColor(I, InicioRace1[I], -1);
- PlayerTextDrawSetShadow(I, InicioRace1[I], 0);
- PlayerTextDrawSetOutline(I, InicioRace1[I], 1);
- PlayerTextDrawBackgroundColor(I, InicioRace1[I], 51);
- PlayerTextDrawFont(I, InicioRace1[I], 1);
- PlayerTextDrawSetProportional(I, InicioRace1[I], 1);
- InicioRace2[I] = CreatePlayerTextDraw(I, 91.199966, 270.791137, "");
- PlayerTextDrawLetterSize(I, InicioRace2[I], 0.261999, 1.127110);
- PlayerTextDrawAlignment(I, InicioRace2[I], 1);
- PlayerTextDrawColor(I, InicioRace2[I], -1);
- PlayerTextDrawSetShadow(I, InicioRace2[I], 0);
- PlayerTextDrawSetOutline(I, InicioRace2[I], 1);
- PlayerTextDrawBackgroundColor(I, InicioRace2[I], 51);
- PlayerTextDrawFont(I, InicioRace2[I], 1);
- PlayerTextDrawSetProportional(I, InicioRace2[I], 1);
- InicioRace3[I] = CreatePlayerTextDraw(I, 16.728918, 282.737854, "~p~~h~Recordista:");
- PlayerTextDrawLetterSize(I, InicioRace3[I], 0.261999, 1.127110);
- PlayerTextDrawAlignment(I, InicioRace3[I], 1);
- PlayerTextDrawColor(I, InicioRace3[I], -1);
- PlayerTextDrawSetShadow(I, InicioRace3[I], 0);
- PlayerTextDrawSetOutline(I, InicioRace3[I], 1);
- PlayerTextDrawBackgroundColor(I, InicioRace3[I], 51);
- PlayerTextDrawFont(I, InicioRace3[I], 1);
- PlayerTextDrawSetProportional(I, InicioRace3[I], 1);
- InicioRace4[I] = CreatePlayerTextDraw(I, 70.533325, 283.235687, "");
- PlayerTextDrawLetterSize(I, InicioRace4[I], 0.261999, 1.127110);
- PlayerTextDrawAlignment(I, InicioRace4[I], 1);
- PlayerTextDrawColor(I, InicioRace4[I], -1);
- PlayerTextDrawSetShadow(I, InicioRace4[I], 0);
- PlayerTextDrawSetOutline(I, InicioRace4[I], -1);
- PlayerTextDrawBackgroundColor(I, InicioRace4[I], 51);
- PlayerTextDrawFont(I, InicioRace4[I], 1);
- PlayerTextDrawSetProportional(I, InicioRace4[I], 1);
- InicioRace5[I] = CreatePlayerTextDraw(I, 16.800001, 296.177886, "~y~~h~Tempo:");
- PlayerTextDrawLetterSize(I, InicioRace5[I], 0.261999, 1.127110);
- PlayerTextDrawAlignment(I, InicioRace5[I], 1);
- PlayerTextDrawColor(I, InicioRace5[I], -1);
- PlayerTextDrawSetShadow(I, InicioRace5[I], 0);
- PlayerTextDrawSetOutline(I, InicioRace5[I], 1);
- PlayerTextDrawBackgroundColor(I, InicioRace5[I], 51);
- PlayerTextDrawFont(I, InicioRace5[I], 1);
- PlayerTextDrawSetProportional(I, InicioRace5[I], 1);
- InicioRace6[I] = CreatePlayerTextDraw(I, 54.799991, 296.675811, "");
- PlayerTextDrawLetterSize(I, InicioRace6[I], 0.261999, 1.127110);
- PlayerTextDrawAlignment(I, InicioRace6[I], 1);
- PlayerTextDrawColor(I,InicioRace6[I], -1);
- PlayerTextDrawSetShadow(I, InicioRace6[I], 0);
- PlayerTextDrawSetOutline(I, InicioRace6[I], -1);
- PlayerTextDrawBackgroundColor(I, InicioRace6[I], 51);
- PlayerTextDrawFont(I, InicioRace6[I], 1);
- PlayerTextDrawSetProportional(I, InicioRace6[I], 1);
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- TextDrawHideForAll(TextdrawAnuncio);
- TextDrawDestroy(TextdrawAnuncio);
- for(new i = 0; i < MAX_PLAYERS; i++){
- DisablePlayerRaceCheckpoint(i);
- RemovePlayerMapIcon(i, 0);
- PlayerTextDrawDestroy(i, InicioRace0[i]);
- PlayerTextDrawDestroy(i, InicioRace1[i]);
- PlayerTextDrawDestroy(i, InicioRace2[i]);
- PlayerTextDrawDestroy(i, InicioRace3[i]);
- PlayerTextDrawDestroy(i, InicioRace4[i]);
- PlayerTextDrawDestroy(i, InicioRace5[i]);
- PlayerTextDrawDestroy(i, InicioRace6[i]);
- PlayerTextDrawDestroy(i, InicioRace7[i]);
- PlayerTextDrawDestroy(i, TempoCorrida[i]);
- PlayerTextDrawHide(i, TextContar[i]);
- PlayerTextDrawHide(i, Textdraw10[i]);
- PlayerTextDrawHide(i, Textdraw0[i]);
- PlayerTextDrawHide(i, Textdraw1[i]);
- PlayerTextDrawHide(i, Textdraw2[i]);
- PlayerTextDrawHide(i, Textdraw5[i]);
- PlayerTextDrawHide(i, Textdraw6[i]);
- PlayerTextDrawHide(i, Textdraw7[i]);
- PlayerTextDrawHide(i, Textdraw8[i]);
- PlayerTextDrawHide(i, Textdraw9[i]);
- PlayerTextDrawDestroy(i, Textdraw0[i]);
- PlayerTextDrawDestroy(i, Textdraw1[i]);
- PlayerTextDrawDestroy(i, Textdraw2[i]);
- PlayerTextDrawDestroy(i, Textdraw5[i]);
- PlayerTextDrawDestroy(i, Textdraw6[i]);
- PlayerTextDrawDestroy(i, Textdraw7[i]);
- PlayerTextDrawDestroy(i, Textdraw8[i]);
- PlayerTextDrawDestroy(i, Textdraw9[i]);
- PlayerTextDrawDestroy(i, Textdraw10[i]);
- PlayerTextDrawDestroy(i, TextContar[i]);
- }
- for(new X; X < MAX_VEHICLES; X++){
- DestroyVehicle(Veiculo[X]);
- }
- DOF2_Exit();
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- CPConquistado[playerid] = CreatePlayerTextDraw(playerid, 321.199920, 359.893463, "");
- PlayerTextDrawLetterSize(playerid, CPConquistado[playerid], 0.449999, 1.600000);
- PlayerTextDrawAlignment(playerid, CPConquistado[playerid], 2);
- PlayerTextDrawColor(playerid, CPConquistado[playerid], -1);
- PlayerTextDrawSetShadow(playerid, CPConquistado[playerid], 0);
- PlayerTextDrawSetOutline(playerid, CPConquistado[playerid], -1);
- PlayerTextDrawBackgroundColor(playerid, CPConquistado[playerid], 51);
- PlayerTextDrawFont(playerid, CPConquistado[playerid], 2);
- PlayerTextDrawSetProportional(playerid, CPConquistado[playerid], 1);
- TextdrawAnuncio = TextDrawCreate(306.399871, 153.315612, "");
- TextDrawLetterSize(TextdrawAnuncio, 0.322797, 1.943465);
- TextDrawAlignment(TextdrawAnuncio, 2);
- TextDrawColor(TextdrawAnuncio, -1);
- TextDrawSetShadow(TextdrawAnuncio, 0);
- TextDrawSetOutline(TextdrawAnuncio, -1);
- TextDrawBackgroundColor(TextdrawAnuncio, 51);
- TextDrawFont(TextdrawAnuncio, 1);
- TextDrawSetProportional(TextdrawAnuncio, 1);
- Textdraw10[playerid] = CreatePlayerTextDraw(playerid, 530.399963, 212.551101, "9|:");
- PlayerTextDrawLetterSize(playerid, Textdraw10[playerid], 0.203997, 2.172444);
- PlayerTextDrawAlignment(playerid, Textdraw10[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw10[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Textdraw10[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw10[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw10[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw10[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Textdraw10[playerid], 1);
- Textdraw0[playerid] = CreatePlayerTextDraw(playerid, 530.799987, 104.540000, "usebox");
- PlayerTextDrawLetterSize(playerid, Textdraw0[playerid], 0.000000, 20.589998);
- PlayerTextDrawTextSize(playerid, Textdraw0[playerid], 632.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, Textdraw0[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw0[playerid], 0);
- PlayerTextDrawUseBox(playerid, Textdraw0[playerid], true);
- PlayerTextDrawBoxColor(playerid, Textdraw0[playerid], 102);
- PlayerTextDrawSetShadow(playerid, Textdraw0[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw0[playerid], 0);
- PlayerTextDrawFont(playerid, Textdraw0[playerid], 0);
- Textdraw1[playerid] = CreatePlayerTextDraw(playerid, 581.200683, 105.031028, "Race Info");
- PlayerTextDrawLetterSize(playerid, Textdraw1[playerid], 0.179600, 0.942933);
- PlayerTextDrawTextSize(playerid, Textdraw1[playerid], 381.199920, 101.546730);
- PlayerTextDrawAlignment(playerid, Textdraw1[playerid], 2);
- PlayerTextDrawColor(playerid, Textdraw1[playerid], 255);
- PlayerTextDrawUseBox(playerid, Textdraw1[playerid], true);
- PlayerTextDrawBoxColor(playerid, Textdraw1[playerid], -5963521);
- PlayerTextDrawSetShadow(playerid, Textdraw1[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw1[playerid], 0);
- PlayerTextDrawBackgroundColor(playerid, Textdraw1[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw1[playerid], 2);
- PlayerTextDrawSetProportional(playerid, Textdraw1[playerid], 1);
- Textdraw2[playerid] = CreatePlayerTextDraw(playerid, 530.000000, 117.973381, "~y~~h~1|: ~r~Ninguem");
- PlayerTextDrawLetterSize(playerid, Textdraw2[playerid], 0.249999, 1.475553);
- PlayerTextDrawAlignment(playerid, Textdraw2[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw2[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Textdraw2[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw2[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw2[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Textdraw2[playerid], 1);
- /*
- Textdraw3[playerid] = CreatePlayerTextDraw(playerid, 557.599975, 271.288970, "/10");
- PlayerTextDrawLetterSize(playerid, Textdraw3[playerid], 0.409999, 2.072885);
- PlayerTextDrawAlignment(playerid, Textdraw3[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw3[playerid], -1378294017);
- PlayerTextDrawSetShadow(playerid, Textdraw3[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw3[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw3[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw3[playerid], 3);
- PlayerTextDrawSetProportional(playerid, Textdraw3[playerid], 1);
- Textdraw4[playerid] = CreatePlayerTextDraw(playerid, 532.800048, 250.880004, "2|");
- PlayerTextDrawLetterSize(playerid, Textdraw4[playerid], 0.607999, 3.964443);
- PlayerTextDrawAlignment(playerid, Textdraw4[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw4[playerid], -1378294017);
- PlayerTextDrawSetShadow(playerid, Textdraw4[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw4[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw4[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw4[playerid], 3);
- PlayerTextDrawSetProportional(playerid, Textdraw4[playerid], 1)
- */
- Textdraw5[playerid] = CreatePlayerTextDraw(playerid, 603.599792, 272.782257, "x/x");
- PlayerTextDrawLetterSize(playerid, Textdraw5[playerid], 0.275999, 1.600000);
- PlayerTextDrawAlignment(playerid, Textdraw5[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw5[playerid], -2147483393);
- PlayerTextDrawSetShadow(playerid, Textdraw5[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw5[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw5[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw5[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Textdraw5[playerid], 1);
- Textdraw6[playerid] = CreatePlayerTextDraw(playerid, 530.000000, 134.897872, "~y~~h~2|: ~r~Ninguem");
- PlayerTextDrawLetterSize(playerid, Textdraw6[playerid], 0.249999, 1.475553);
- PlayerTextDrawAlignment(playerid, Textdraw6[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw6[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Textdraw6[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw6[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw6[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw6[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Textdraw6[playerid], 1);
- Textdraw7[playerid] = CreatePlayerTextDraw(playerid, 530.000000, 152.817825, "~y~~h~3|: ~r~Ninguem");
- PlayerTextDrawLetterSize(playerid, Textdraw7[playerid], 0.249999, 1.475553);
- PlayerTextDrawAlignment(playerid, Textdraw7[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw7[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Textdraw7[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw7[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw7[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw7[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Textdraw7[playerid], 1);
- Textdraw8[playerid] = CreatePlayerTextDraw(playerid, 529.599975, 172.231155, "~y~~h~4|: ~r~Ninguem");
- PlayerTextDrawLetterSize(playerid, Textdraw8[playerid], 0.249999, 1.475553);
- PlayerTextDrawAlignment(playerid, Textdraw8[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw8[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Textdraw8[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw8[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw8[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw8[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Textdraw8[playerid], 1);
- Textdraw9[playerid] = CreatePlayerTextDraw(playerid, 530.000000, 189.653366, "~y~~h~5|: ~r~Ninguem");
- PlayerTextDrawLetterSize(playerid, Textdraw9[playerid], 0.249999, 1.475553);
- PlayerTextDrawAlignment(playerid, Textdraw9[playerid], 1);
- PlayerTextDrawColor(playerid, Textdraw9[playerid], -1);
- PlayerTextDrawSetShadow(playerid, Textdraw9[playerid], 0);
- PlayerTextDrawSetOutline(playerid, Textdraw9[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, Textdraw9[playerid], 51);
- PlayerTextDrawFont(playerid, Textdraw9[playerid], 1);
- PlayerTextDrawSetProportional(playerid, Textdraw9[playerid], 1);
- TempoCorrida[playerid] = CreatePlayerTextDraw(playerid, 14.400009, 238.933471, "00:00:00");
- PlayerTextDrawFont(playerid, TempoCorrida[playerid], 1);
- PlayerTextDrawLetterSize(playerid, TempoCorrida[playerid], 0.225000, 1.251000);
- PlayerTextDrawColor(playerid, TempoCorrida[playerid], -1);
- PlayerTextDrawSetOutline(playerid, TempoCorrida[playerid], 1);
- PlayerTextDrawSetProportional(playerid, TempoCorrida[playerid], 1);
- TextContar[playerid] = CreatePlayerTextDraw(playerid, 229.200103, 361.386688, "");
- PlayerTextDrawLetterSize(playerid, TextContar[playerid], 0.449999, 1.600000);
- PlayerTextDrawAlignment(playerid, TextContar[playerid], 1);
- PlayerTextDrawColor(playerid, TextContar[playerid], -1);
- PlayerTextDrawSetShadow(playerid, TextContar[playerid], 0);
- PlayerTextDrawSetOutline(playerid, TextContar[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, TextContar[playerid], 51);
- PlayerTextDrawFont(playerid, TextContar[playerid], 1);
- PlayerTextDrawSetProportional(playerid, TextContar[playerid], 1);
- InicioRace0[playerid] = CreatePlayerTextDraw(playerid, 150.800003, 255.366668, "usebox"); // BOX
- PlayerTextDrawLetterSize(playerid, InicioRace0[playerid], 0.000000, 6.430986);
- PlayerTextDrawTextSize(playerid, InicioRace0[playerid], 12.400000, 0.000000);
- PlayerTextDrawAlignment(playerid, InicioRace0[playerid], 1);
- PlayerTextDrawColor(playerid, InicioRace0[playerid], 0);
- PlayerTextDrawUseBox(playerid, InicioRace0[playerid], true);
- PlayerTextDrawBoxColor(playerid, InicioRace0[playerid], 102);
- PlayerTextDrawSetShadow(playerid, InicioRace0[playerid], 0);
- PlayerTextDrawSetOutline(playerid, InicioRace0[playerid], 0);
- PlayerTextDrawFont(playerid, InicioRace0[playerid], 0);
- InicioRace7[playerid] = CreatePlayerTextDraw(playerid, 81.431015, 255.857666, "Race Info");
- PlayerTextDrawLetterSize(playerid, InicioRace7[playerid], 0.169600, 1.375999);
- PlayerTextDrawTextSize(playerid, InicioRace7[playerid], 3814.800292, 130.915496);
- PlayerTextDrawAlignment(playerid, InicioRace7[playerid], 2);
- PlayerTextDrawColor(playerid, InicioRace7[playerid], 255);
- PlayerTextDrawUseBox(playerid, InicioRace7[playerid], true);
- PlayerTextDrawBoxColor(playerid, InicioRace7[playerid], -1523963137);
- PlayerTextDrawSetShadow(playerid, InicioRace7[playerid], 0);
- PlayerTextDrawSetOutline(playerid, InicioRace7[playerid], 0);
- PlayerTextDrawBackgroundColor(playerid, InicioRace7[playerid], 51);
- PlayerTextDrawFont(playerid, InicioRace7[playerid], 2);
- PlayerTextDrawSetProportional(playerid, InicioRace7[playerid], 1);
- InicioRace1[playerid] = CreatePlayerTextDraw(playerid, 16.400007, 270.791229, "~b~~h~Checkpoints ID:");
- PlayerTextDrawLetterSize(playerid, InicioRace1[playerid], 0.262000, 1.127111);
- PlayerTextDrawAlignment(playerid, InicioRace1[playerid], 1);
- PlayerTextDrawColor(playerid, InicioRace1[playerid], -1);
- PlayerTextDrawSetShadow(playerid, InicioRace1[playerid], 0);
- PlayerTextDrawSetOutline(playerid, InicioRace1[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, InicioRace1[playerid], 51);
- PlayerTextDrawFont(playerid, InicioRace1[playerid], 1);
- PlayerTextDrawSetProportional(playerid, InicioRace1[playerid], 1);
- InicioRace2[playerid] = CreatePlayerTextDraw(playerid, 91.199966, 270.791137, "");
- PlayerTextDrawLetterSize(playerid, InicioRace2[playerid], 0.261999, 1.127110);
- PlayerTextDrawAlignment(playerid, InicioRace2[playerid], 1);
- PlayerTextDrawColor(playerid, InicioRace2[playerid], -1);
- PlayerTextDrawSetShadow(playerid, InicioRace2[playerid], 0);
- PlayerTextDrawSetOutline(playerid, InicioRace2[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, InicioRace2[playerid], 51);
- PlayerTextDrawFont(playerid, InicioRace2[playerid], 1);
- PlayerTextDrawSetProportional(playerid, InicioRace2[playerid], 1);
- InicioRace3[playerid] = CreatePlayerTextDraw(playerid, 16.728918, 282.737854, "~p~~h~Recordista:");
- PlayerTextDrawLetterSize(playerid, InicioRace3[playerid], 0.261999, 1.127110);
- PlayerTextDrawAlignment(playerid, InicioRace3[playerid], 1);
- PlayerTextDrawColor(playerid, InicioRace3[playerid], -1);
- PlayerTextDrawSetShadow(playerid, InicioRace3[playerid], 0);
- PlayerTextDrawSetOutline(playerid, InicioRace3[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, InicioRace3[playerid], 51);
- PlayerTextDrawFont(playerid, InicioRace3[playerid], 1);
- PlayerTextDrawSetProportional(playerid, InicioRace3[playerid], 1);
- InicioRace4[playerid] = CreatePlayerTextDraw(playerid, 70.533325, 283.235687, "");
- PlayerTextDrawLetterSize(playerid, InicioRace4[playerid], 0.261999, 1.127110);
- PlayerTextDrawAlignment(playerid, InicioRace4[playerid], 1);
- PlayerTextDrawColor(playerid, InicioRace4[playerid], -1);
- PlayerTextDrawSetShadow(playerid, InicioRace4[playerid], 0);
- PlayerTextDrawSetOutline(playerid, InicioRace4[playerid], -1);
- PlayerTextDrawBackgroundColor(playerid, InicioRace4[playerid], 51);
- PlayerTextDrawFont(playerid, InicioRace4[playerid], 1);
- PlayerTextDrawSetProportional(playerid, InicioRace4[playerid], 1);
- InicioRace5[playerid] = CreatePlayerTextDraw(playerid, 16.800001, 296.177886, "~y~~h~Tempo:");
- PlayerTextDrawLetterSize(playerid, InicioRace5[playerid], 0.261999, 1.127110);
- PlayerTextDrawAlignment(playerid, InicioRace5[playerid], 1);
- PlayerTextDrawColor(playerid, InicioRace5[playerid], -1);
- PlayerTextDrawSetShadow(playerid, InicioRace5[playerid], 0);
- PlayerTextDrawSetOutline(playerid, InicioRace5[playerid], 1);
- PlayerTextDrawBackgroundColor(playerid, InicioRace5[playerid], 51);
- PlayerTextDrawFont(playerid, InicioRace5[playerid], 1);
- PlayerTextDrawSetProportional(playerid, InicioRace5[playerid], 1);
- InicioRace6[playerid] = CreatePlayerTextDraw(playerid, 54.799991, 296.675811, "");
- PlayerTextDrawLetterSize(playerid, InicioRace6[playerid], 0.261999, 1.127110);
- PlayerTextDrawAlignment(playerid, InicioRace6[playerid], 1);
- PlayerTextDrawColor(playerid, InicioRace6[playerid], -1);
- PlayerTextDrawSetShadow(playerid, InicioRace6[playerid], 0);
- PlayerTextDrawSetOutline(playerid, InicioRace6[playerid], -1);
- PlayerTextDrawBackgroundColor(playerid, InicioRace6[playerid], 51);
- PlayerTextDrawFont(playerid, InicioRace6[playerid], 1);
- PlayerTextDrawSetProportional(playerid, InicioRace6[playerid], 1);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- new file[128];
- format(file, sizeof(file), pasta_race, CPCarregado);
- if (CPAtivado == false) return SendClientMessage(playerid, Red, "** [ERRO] Os CPs estão desativados!");
- DisablePlayerRaceCheckpoint(playerid);
- CPCountX[playerid]++;
- CPCountY[playerid]++;
- CPCountZ[playerid]++;
- format(String, sizeof(String), "%02d CPX", CPCountX[playerid]);
- format(String2, sizeof(String2), "%02d CPY", CPCountY[playerid]);
- format(String3, sizeof(String3), "%02d CPZ", CPCountZ[playerid]);
- format(String4, sizeof(String4), "%02d CPX", CPCountX[playerid] + 1);
- format(String5, sizeof(String5), "%02d CPY", CPCountY[playerid] + 1);
- format(String6, sizeof(String6), "%02d CPZ", CPCountZ[playerid] + 1);
- if (AddCP[playerid] < TotalCPS)
- { // VERIFICA SE OS CPS ADQUIRIDOS SÃO MENOR DO QUE O TOTAL DE CPS
- SetPlayerRaceCheckpoint(playerid, 0, DOF2_GetFloat(file, String), DOF2_GetFloat(file, String2), DOF2_GetFloat(file, String3), DOF2_GetFloat(file, String4), DOF2_GetFloat(file, String5), DOF2_GetFloat(file, String6), TamanhoCPS);
- SetPlayerMapIcon(playerid, 0, DOF2_GetFloat(file, String4), DOF2_GetFloat(file, String5), DOF2_GetFloat(file, String6), 53, -1, MAPICON_LOCAL);
- AddCP[playerid]++;
- format(Str, sizeof(Str), "~g~~h~%d/%d", AddCP[playerid], DOF2_GetInt(file, "Total CPS"));
- PlayerTextDrawSetString(playerid, Textdraw5[playerid], Str);
- if (AddCP[playerid] == TotalCPS - 1)
- { // VERIFICA SE O PLAYER ESTÁ NO PENÚLTIMO CP PARA SETAR O CP FINAL
- SetPlayerRaceCheckpoint(playerid, 1, DOF2_GetFloat(file, String), DOF2_GetFloat(file, String2), DOF2_GetFloat(file, String3), DOF2_GetFloat(file, String4), DOF2_GetFloat(file, String5), DOF2_GetFloat(file, String6), TamanhoCPS);
- RemovePlayerMapIcon(playerid, 0);
- }
- if (AddCP[playerid] == TotalCPS)
- {
- AlguemGanhou[playerid] = true;
- KillTimer(TempoRecorde[playerid]);
- DisablePlayerRaceCheckpoint(playerid);
- TempoMinimo[1] = DOF2_GetInt(file, "Recorde Minutos");
- TempoMinimo[0] = DOF2_GetInt(file, "Recorde Segundos");
- Terminou++;
- Lugar[Terminou] = playerid;
- format(str, sizeof(str), "** [CORRIDA]{FFFFFF} %s terminou a corrida em %d° lugar, em um tempo de %02d:%02d!", GetName(playerid), Terminou, Tempo[playerid][1], Tempo[playerid][0]);
- SendClientMessageToAll(Red, str);
- for (new i; i < MAX_PLAYERS; i++)
- {
- SetTimerEx("AtualizarTextdraws", 500, false, "i", i);
- }
- if (Tempo[playerid][1] <= TempoMinimo[1] && Tempo[playerid][0] < TempoMinimo[0] || Tempo[playerid][1] < TempoMinimo[1])
- {
- format(str, sizeof(str), "** [CORRIDA] %s é o novo recordista do CPs ID %02d com um tempo de %02d:%02d!", GetName(playerid), CPCarregado, Tempo[playerid][1], Tempo[playerid][0]);
- SendClientMessageToAll(Pink, str);
- DOF2_SetString(file, "Recordista", GetName(playerid));
- DOF2_SetInt(file, "Recorde Minutos", Tempo[playerid][1]);
- DOF2_SetInt(file, "Recorde Segundos", Tempo[playerid][0]);
- DOF2_SaveFile();
- format(Str, sizeof(Str), "%s", DOF2_GetString(file, "Recordista"));
- PlayerTextDrawSetString(playerid, InicioRace4[playerid], Str);
- format(Str, sizeof(Str), "00:%02d:%02d", DOF2_GetInt(file, "Recorde Minutos"), DOF2_GetInt(file, "Recorde Segundos"));
- PlayerTextDrawSetString(playerid, InicioRace6[playerid], Str);
- }
- }
- KillTimer(TimerCountCP[playerid]);
- format(str, sizeof(str), "~r~~h~CHECKPOINT~b~CONQUISTADO~n~~w~%d/%d", AddCP[playerid], TotalCPS);
- PlayerTextDrawSetString(playerid, CPConquistado[playerid], str);
- PlayerTextDrawShow(playerid, CPConquistado[playerid]);
- TimerCountCP[playerid] = SetTimerEx("CountCP", 3000, true, "i", playerid);
- }
- /*
- new j, aPID, I;
- for (I = 1; I < MAX_PLAYERS; I++) //Loop todos jogadores para ordenar começando pelo 2º numero = 1
- {
- if (!IsPlayerConnected(I)) continue;
- Colocados[I] = I; // Colocados[1] = 1;
- aPID = Colocados[I]; // AtualPD = 1;
- j = I - 1; // j = 0;
- while (j > -1 && AddCP[Colocados[j + 1]] < AddCP[Colocados[j]])
- {
- Colocados[j + 1] = Colocados[j]; // Colocados[1] = Colocados[0]
- AddCP[Colocados[j + 1]] = AddCP[Colocados[j]]; // AddCP[Colocados[1]] = AddCP[Colocados[0]]
- j--; // j = -1;
- }
- Colocados[j + 1] = aPID; // Colocados[0] = 1; Se for feito o while Colocados[0] = Colocados[1];
- AddCP[Colocados[j + 1]] = AddCP[aPID]; // AddCP[Colocados[0]] = AddCP[Colocados[1]];
- AtualizarText[I - 1] = SetTimerEx("AtualizarTextdraws", 100, false, "d", I - 1);
- AtualizarText[I] = SetTimerEx("AtualizarTextdraws", 100, false, "d", I);
- }
- */
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ){
- new vID = GetPlayerVehicleID(playerid);
- SetVehiclePos(vID, fX, fY, fZ);
- SetPlayerPos(playerid, fX, fY, fZ);
- PutPlayerInVehicle(playerid, vID, 0);
- return 1;
- }
- /*
- CMD:xb(playerid){
- new CPs[5], i, Atual, j;
- for (i = 1; i < MAX_PLAYERS; i++)
- {
- if (!IsPlayerConnected(i)) continue;
- printf("%i", i);
- CPs[i] = AddCP[i];
- Atual = CPs[i];
- j = i - 1; // j = 0;
- while (j > -1 && AddCP[j+1] < AddCP[j])
- {
- CPs[j+1] = CPs[j];
- j--;
- }
- CPs[j+1] = Atual;
- }
- format(Str, 128, "Quantidade dos CPs dos ids foram organizados em ordem crescente: %d, %d, %d", CPs[0], CPs[1], CPs[2]);
- SendClientMessageToAll(-1, Str);
- return 1;
- }
- */
- CMD:pintar(playerid, params[])
- {
- new CorP[2];
- if (sscanf(params, "dd", CorP[0], CorP[1])) return SendClientMessage(playerid, Red, "** [ERRO] {AAAAAA}Utilize: /Pintar [Cor 1] [Cor 2]");
- SendClientMessage(playerid, -1, "** Cores alteradas com sucesso!");
- ChangeVehicleColor(GetPlayerVehicleID(playerid), CorP[0], CorP[1]);
- return 1;
- }
- CMD:novocp(playerid, params[]){
- new file[128], pasta[128], id;
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, Red, "** [ERRO] {AAAAAA}Utilize: /NovoCP [ID dos veículos salvos]");
- format(pasta, sizeof(pasta), pasta_veiculos, id);
- if(!DOF2_FileExists(pasta)) return SendClientMessage(playerid, Red, "** [ERRO] O ID de veículos que você colocou não existe! Salve usando /SalvarVeiculos");
- if(CriacaoAndamento == true) return SendClientMessage(playerid, 0xFF0000FF, "** [ERRO] Alguém já está criando CPs!");
- for(new X; X < 500; X++){
- format(file, sizeof(file), pasta_race, X);
- if(DOF2_FileExists(file)) continue;
- if(!DOF2_FileExists(file)){
- DOF2_CreateFile(file);
- DOF2_SetString(file, "Criador", GetName(playerid));
- DOF2_SetInt(file, "ID Veiculos", id);
- DOF2_SaveFile();
- CriacaoAndamento = true;
- RaceName = X;
- format(str, sizeof(str), "** [INFO]{FFFFFF} Você começou a criar o CP ID: %02d! Para criar os checkpoints use /SalvarCP", X);
- SendClientMessage(playerid, Red, str);
- } break;
- }
- return 1;
- }
- CMD:salvarcp(playerid){
- new file[500];
- format(file, sizeof(file), pasta_race, RaceName);
- if(CriacaoAndamento == false) return SendClientMessage(playerid, 0xFF0000FF, "** [ERRO] Primeiro use /NovoCP para criar os arquivos!");
- if(CPCount > 800) return SendClientMessage(playerid, Red, "** [ERRO] Você já salvou 800 CPS que são o máximo");
- GetPlayerPos(playerid, CP[0], CP[1], CP[2]);
- CPCount++;
- format(str, sizeof(str), "%02d CPX", CPCountX[playerid]);
- DOF2_SetFloat(file, str, CP[0]);
- CPCountX[playerid]++;
- format(str, sizeof(str), "%02d CPY", CPCountY[playerid]);
- DOF2_SetFloat(file, str, CP[1]);
- CPCountY[playerid]++;
- format(str, sizeof(str), "%02d CPZ", CPCountZ[playerid]);
- DOF2_SetFloat(file, str, CP[2]);
- CPCountZ[playerid]++;
- TotalCPS++;
- DOF2_SaveFile();
- SetPlayerRaceCheckpoint(playerid, 1, CP[0], CP[1], CP[2], 0.0, 0.0, 0.0, 7);
- format(str, sizeof(str), "** [INFO] {FFFFFF}CP salvo com sucesso [%d / 800]!", CPCount);
- SendClientMessage(playerid, Red, str);
- return 1;
- }
- CMD:arquivarcps(playerid){
- new file[128];
- format(file, sizeof(file), pasta_race, RaceName);
- if(CriacaoAndamento == false) return SendClientMessage(playerid, Red, "** [ERRO] Não há um CP em criação! (Use: /NovoCP)");
- DOF2_SetString(file, "Recordista", "Ninguem");
- DOF2_SetInt(file, "Total CPS", TotalCPS);
- DOF2_SetInt(file, "Recorde Minutos", 90);
- DOF2_SetInt(file, "Recorde Segundos", 00);
- DOF2_SaveFile();
- CriacaoAndamento = false;
- CPCountX[playerid] = 0;
- CPCountY[playerid] = 0;
- CPCountZ[playerid] = 0;
- SendClientMessage(playerid, Red, "** [INFO]{FFFFFF} Seus CPs foram arquivados com sucesso!");
- for(new i; i < MAX_PLAYERS; i++){
- if(!IsPlayerConnected(i)) continue;
- DisablePlayerRaceCheckpoint(i);
- }
- return 1;
- }
- CMD:carregarcps(playerid, params[]){
- new file[128], string[128];
- if(CriacaoAndamento == true || CPAtivado == true) return SendClientMessage(playerid, 0xFF0000FF, "** [ERRO] Está havendo uma criação de CPs");
- if(sscanf(params, "d", CPCarregado)) return SendClientMessage(playerid, 0xFF0000FF, "** [ERRO] {AAAAAA}Utilize: /CarregarCP [ID dos CPs salvos]");
- format(file, sizeof(file), pasta_race, CPCarregado);
- if(!DOF2_FileExists(file)) return SendClientMessage(playerid, 0xFF0000FF, "** [ERRO] Não existe nenhum CP salvo com esse nome.");
- TotalCPS = DOF2_GetInt(file, "Total CPS");
- format(string, sizeof(string), "** [ATENÇÃO] {AAAAAA}Você carregou o CPs ID {FF44AA}\"%02d\" {AAAAAA}criados pelo jogador(a) {FF44AA}%s ", CPCarregado, DOF2_GetString(file, "Criador"));
- SendClientMessage(playerid, Red, string);
- if(DOF2_GetInt(file, "Recorde Minutos") == 90 && DOF2_GetInt(file, "Recorde Segundos") == 0){
- format(string, sizeof(string), "** [ATENÇÃO] {AAAAAA}Recorde no tempo de {FF44AA}\"Sem recorde\"{AAAAAA} por {FF44AA}\"%s\"", DOF2_GetString(file, "Recordista"));
- SendClientMessage(playerid, Red, string);
- }else{
- format(string, sizeof(string), "** [ATENÇÃO] {AAAAAA}Recorde no tempo de {FF44AA}\"%02d:%02d\"{AAAAAA} por {FF44AA}\"%s\"", DOF2_GetInt(file, "Recorde Minutos"), DOF2_GetInt(file, "Recorde Segundos"), DOF2_GetString(file, "Recordista"));
- SendClientMessage(playerid, Red, string);
- }
- format(string, sizeof(string), "** [ATENÇÃO] {AAAAAA}ID Veículos: {FF44AA}%d", DOF2_GetInt(file, "ID Veiculos"));
- SendClientMessage(playerid, Red, string);
- format(string, sizeof(string), "** [ATENÇÃO] {AAAAAA}Total de CPs: {FF44AA}%d", TotalCPS);
- SendClientMessage(playerid, Red, string);
- SendClientMessage(playerid, -1, "");
- SetPlayerPos(playerid, DOF2_GetFloat(file, "00 CPX"), DOF2_GetFloat(file, "00 CPY"), DOF2_GetFloat(file, "00 CPZ"));
- SetPlayerMapIcon(playerid, 0, DOF2_GetFloat(file, "00 CPX"), DOF2_GetFloat(file, "00 CPY"), DOF2_GetFloat(file, "00 CPZ"), 53, -1, MAPICON_LOCAL);
- return 1;
- }
- CMD:cps(playerid){
- new file[128];
- format(file, sizeof(file), pasta_race, CPCarregado);
- if(CPAtivado == true){
- for(new i; i < MAX_PLAYERS; i++){
- if(!IsPlayerConnected(i)) continue;
- DisablePlayerRaceCheckpoint(i);
- CPCountX[playerid] = 0;
- CPCountY[playerid] = 0;
- CPCountZ[playerid] = 0;
- KillTimer(TempoRecorde[i]);
- Tempo[i][0] = 0;
- Tempo[i][1] = 0;
- Tempo[i][3] = 0;
- Terminou = 0;
- AlguemGanhou[i] = false;
- }
- SendClientMessage(playerid, Red, "** [INFO]{FFFFFF} Os CPs foram desativados!");
- CPAtivado = false;
- }else{
- SendClientMessage(playerid, Red, "** [INFO]{FFFFFF} Os CPs foram ativados!");
- CPAtivado = true;
- for(new i; i < MAX_PLAYERS; i++){
- if(!IsPlayerConnected(i)) continue;
- RemovePlayerMapIcon(i, 0);
- SetPlayerRaceCheckpoint(i, 0, DOF2_GetFloat(file, "00 CPX"), DOF2_GetFloat(file, "00 CPY"), DOF2_GetFloat(file, "00 CPZ"), DOF2_GetFloat(file, "01 CPX"), DOF2_GetFloat(file, "01 CPY"), DOF2_GetFloat(file, "01 CPZ"), TamanhoCPS);
- SetPlayerMapIcon(i, 0, DOF2_GetFloat(file, "01 CPX"), DOF2_GetFloat(file, "01 CPY"), DOF2_GetFloat(file, "01 CPZ"), 53, -1, MAPICON_LOCAL);
- }
- }
- return 1;
- }
- CMD:tamanhocps(playerid, params[]){
- if(sscanf(params, "d", TamanhoCPS)) return SendClientMessage(playerid, 0xFF0000FF, "** [ERRO] {AAAAAA}Utilize: /TamanhoCps [Tamanho dos CPS(padrão 15)]");
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF}Você alterou o tamanho dos CPS.");
- return 1;
- }
- CMD:destruircps(playerid){
- if(CPAtivado == true) return SendClientMessage(playerid, Red, "** [ERRO] Os CPS estão ativados!");
- SendClientMessage(playerid, Red, "** [INFO]{FFFFFF} Todos os CPs foram destruídos com sucesso!");
- for(new i; i < MAX_PLAYERS; i++){
- CPCountX[i] = 0;
- CPCountY[i] = 0;
- CPCountZ[i] = 0;
- AddCP[i] = 0;
- }
- CPCount = 0;
- TotalCPS = 0;
- return 1;
- }
- CMD:raceemandamento(playerid){
- if(CriacaoAndamento == false){
- SendClientMessage(playerid, 0xFF0000FF, "** [INFO] {FFFFFF}Você ativou o Race em Andamento!");
- CriacaoAndamento = true;
- }else{
- SendClientMessage(playerid, 0xFF0000FF, "** [INFO]{FFFFFF} Você desativou o Race em Andamento!");
- CriacaoAndamento = false;
- }
- return 1;
- }
- CMD:deletarcps(playerid, params[]){
- new file[128], id;
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, Red, "** [ERRO] {aaaaaa}Utilize: /DeletarCPs [ID do CP]");
- format(file, sizeof(file), pasta_race, id);
- if(!DOF2_FileExists(file)) return SendClientMessage(playerid, Red, "** [ERRO] Esse CP não existe");
- DOF2_RemoveFile(file);
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF}CP deletado com sucesso!");
- return 1;
- }
- CMD:distanciav(playerid, params[]){
- new x;
- if(sscanf(params, "d", x)) return SendClientMessage(playerid, Red, "** [ERRO] {AAAAAA}Utilize: /DistanciaV [Distância 0-5]");
- if(x < 1 || x > 20) return SendClientMessage(playerid, Red, "** [ERRO] A distância entre os veículos deve ser entre 1 e 15!");
- format(Str, sizeof(Str), "** [INFO] {FFFFFF}Distância dos veículos alterada para %d!", x);
- SendClientMessage(playerid, Red, Str);
- DistanciaV = x;
- return 1;
- }
- CMD:c(playerid, params[]){
- new Quantidade, file[128];
- format(file, sizeof(file), pasta_veiculos, IDVeiculos);
- if(!sscanf(params, "dd", Modelo, Quantidade)){
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
- GetPlayerFacingAngle(playerid, Position[3]);
- GetPlayerFacingAngle(playerid, Pos[3]);
- if(PosV == 0){
- for(new X; X < Quantidade; X++){
- Pos[0] = Pos[0] - DistanciaV;
- Veiculo[TotalVeiculos] = CreateVehicle(Modelo, Pos[0], Pos[1], Pos[2], Pos[3], Cor[0], Cor[1], -1, 0);
- TotalVeiculos++;
- AddVehicleComponent(TotalVeiculos, 1010);
- AddVehicleComponent(TotalVeiculos, 1087);
- AddVehicleComponent(TotalVeiculos, 1085);
- if(Salvando == true){
- DOF2_SetInt(file, "Modelo", Modelo);
- DOF2_SetInt(file, "Total Veiculos", X);
- format(Str, sizeof(Str), "%02d PosX", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[0]);
- format(Str, sizeof(Str), "%02d PosY", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[1]);
- format(Str, sizeof(Str), "%02d PosZ", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[2]);
- format(Str, sizeof(Str), "%02d Angle", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[3]);
- DOF2_SetInt(file, "Modelo", Modelo);
- DOF2_SetInt(file, "Total Veiculos", TotalVeiculos);
- DOF2_SaveFile();
- }
- }
- PutPlayerInVehicle(playerid, TotalVeiculos, 0);
- format(Str, sizeof(Str), "** [INFO] {FFFFFF}Veículos criados com sucesso! [%d | 200] (Ângulo: %0.3f | Cores: %d e %d)", TotalVeiculos, Pos[3], Cor[0], Cor[1]);
- SendClientMessage(playerid, Red, Str);
- }
- if(PosV == 1){
- for(new X; X < Quantidade; X++){
- Pos[1] = Pos[1] - DistanciaV;
- Veiculo[TotalVeiculos] = CreateVehicle(Modelo, Pos[0], Pos[1], Pos[2], Pos[3], Cor[0], Cor[1], -1, 0);
- TotalVeiculos++;
- if(Salvando == true){
- DOF2_SetInt(file, "Modelo", Modelo);
- DOF2_SetInt(file, "Total Veiculos", TotalVeiculos);
- format(Str, sizeof(Str), "%02d PosX", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[0]);
- format(Str, sizeof(Str), "%02d PosY", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[1]);
- format(Str, sizeof(Str), "%02d PosZ", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[2]);
- format(Str, sizeof(Str), "%02d Angle", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[3]);
- DOF2_SaveFile();
- }
- }
- PutPlayerInVehicle(playerid, TotalVeiculos, 0);
- format(Str, sizeof(Str), "** [INFO] {FFFFFF}Veículos criados com sucesso! [%d | 200] (Ângulo: %0.3f | Cores: %d e %d)", TotalVeiculos, Pos[3], Cor[0], Cor[1]);
- SendClientMessage(playerid, Red, Str);
- }
- if(PosV == 2){
- for(new X; X < Quantidade; X++){
- Pos[0] = Pos[0] - 3;
- Pos[1] = Pos[1] + 3.1114;
- Veiculo[TotalVeiculos] = CreateVehicle(Modelo, Pos[0], Pos[1], Pos[2], Pos[3], Cor[0], Cor[1], -1, 0);
- TotalVeiculos++;
- AddVehicleComponent(TotalVeiculos, 1010);
- AddVehicleComponent(TotalVeiculos, 1087);
- AddVehicleComponent(TotalVeiculos, 1085);
- if(Salvando == true){
- DOF2_SetInt(file, "Modelo", Modelo);
- DOF2_SetInt(file, "Total Veiculos", X);
- format(Str, sizeof(Str), "%02d PosX", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[0]);
- format(Str, sizeof(Str), "%02d PosY", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[1]);
- format(Str, sizeof(Str), "%02d PosZ", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[2]);
- format(Str, sizeof(Str), "%02d Angle", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[3]);
- DOF2_SetInt(file, "Modelo", Modelo);
- DOF2_SetInt(file, "Total Veiculos", TotalVeiculos);
- DOF2_SaveFile();
- }
- }
- PutPlayerInVehicle(playerid, TotalVeiculos, 0);
- format(Str, sizeof(Str), "** [INFO] {FFFFFF}Veículos criados com sucesso! [%d | 200] (Ângulo: %0.3f | Cores: %d e %d)", TotalVeiculos, Pos[3], Cor[0], Cor[1]);
- SendClientMessage(playerid, Red, Str);
- }
- if(PosV == 3){
- for(new X; X < Quantidade; X++){
- Pos[0] = Pos[0] - 2.7035;
- Pos[1] = Pos[1] - 2.6541;
- Veiculo[TotalVeiculos] = CreateVehicle(Modelo, Pos[0], Pos[1], Pos[2], Pos[3], Cor[0], Cor[1], -1, 0);
- TotalVeiculos++;
- AddVehicleComponent(TotalVeiculos, 1010);
- AddVehicleComponent(TotalVeiculos, 1087);
- AddVehicleComponent(TotalVeiculos, 1085);
- if(Salvando == true){
- DOF2_SetInt(file, "Modelo", Modelo);
- DOF2_SetInt(file, "Total Veiculos", X);
- format(Str, sizeof(Str), "%02d PosX", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[0]);
- format(Str, sizeof(Str), "%02d PosY", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[1]);
- format(Str, sizeof(Str), "%02d PosZ", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[2]);
- format(Str, sizeof(Str), "%02d Angle", TotalVeiculos);
- DOF2_SetFloat(file, Str, Pos[3]);
- DOF2_SetInt(file, "Modelo", Modelo);
- DOF2_SetInt(file, "Total Veiculos", TotalVeiculos);
- DOF2_SaveFile();
- }
- }
- PutPlayerInVehicle(playerid, TotalVeiculos, 0);
- format(Str, sizeof(Str), "** [INFO] {FFFFFF}Veículos criados com sucesso! [%d | 200] (Ângulo: %0.3f | Cores: %d e %d)", TotalVeiculos, Pos[3], Cor[0], Cor[1]);
- SendClientMessage(playerid, Red, Str);
- }
- AddVehicleComponent(Veiculo[TotalVeiculos], 1010);
- AddVehicleComponent(Veiculo[TotalVeiculos], 1087);
- }else{
- SendClientMessage(playerid, Red, "** [ERRO] {AAAAAA}Utilize: /C [Modelo] [Quantidade]");
- }
- return 1;
- }
- CMD:salvarveiculos(playerid){
- new file[128];
- if(Salvando == false){
- Salvando = true;
- for(new X; X < 500; X++){
- format(file, sizeof(file), pasta_veiculos, X);
- if(DOF2_FileExists(file)) continue;
- if(!DOF2_FileExists(file)){
- DOF2_CreateFile(file);
- DOF2_SetString(file, "Criador", GetName(playerid));
- DOF2_SaveFile();
- IDVeiculos = X;
- }break;
- }
- format(Str, sizeof(Str), "** [INFO] {FFFFFF}Arquivo ID: {FF44AA}%d{FFFFFF} criado para salvar os veículos!", IDVeiculos);
- SendClientMessage(playerid, Red, Str);
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF} Para salvar os veículos use: {FF44AA}/C!");
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF} Se salvar errado use{FF44AA} /DC{FFFFFF} & depois {FF44AA}/DeletarVeiculos");
- }else{
- Salvando = false;
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF}Veículos salvos com sucesso!");
- }
- return 1;
- }
- CMD:posv(playerid, params[]){
- new POSV;
- if(sscanf(params, "d", POSV)) return SendClientMessage(playerid, Red, "** [ERRO]{AAAAAA} Utilize: /PosV [0 - X | 1 - Y | 2 - XY | 3 - XY]");
- if(POSV < 0 || POSV > 3) return SendClientMessage(playerid, Red, "** [ERRO] Use 0(X) ou 3(Y)!");
- switch(POSV){
- case 0:
- {
- SendClientMessage(playerid, Red, "** [INFO]{FFFFFF} Posição dos veículos alterada para X!");
- PosV = 0;
- }
- case 1:
- {
- SendClientMessage(playerid, Red, "** [INFO]{FFFFFF} Posição dos veículos alterada para Y!");
- PosV = 1;
- }
- case 2:
- {
- SendClientMessage(playerid, Red, "** [INFO]{FFFFFF} Posição dos veículos alterada para fora do eixo X e Y! {FF0000}(Use: /IrPos 4)");
- PosV = 2;
- }
- case 3:
- {
- SendClientMessage(playerid, Red, "** [INFO]{FFFFFF} Posição dos veículos alterada para fora do eixo X e Y! {FF0000}(Use: /IrPos 5)");
- PosV = 3;
- }
- }
- return 1;
- }
- CMD:dc(playerid){
- if(Salvando == true) return SendClientMessage(playerid, Red, "** [ERRO] Alguém está salvando veículos");
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF} Todos veículos criados foram destruídos!");
- for(new X; X < MAX_VEHICLES; X++){
- DestroyVehicle(Veiculo[X]);
- TotalVeiculos = 0;
- IRVeiculos = 0;
- }
- return 1;
- }
- CMD:irpos(playerid, params[]){
- new x;
- if(sscanf(params, "d", x)) return SendClientMessage(playerid, Red, "** [ERRO]{AAAAAA} Utilize: /irpos [0 ou 1 - X | 2 ou 3 - Y]");
- switch(x){
- case 0:{
- SetPlayerPos(playerid, Position[0], Position[1]+7, Position[2]);
- SetPlayerFacingAngle(playerid, Position[3]);
- }
- case 1:{
- SetPlayerPos(playerid, Position[0], Position[1]-7, Position[2]);
- SetPlayerFacingAngle(playerid, Position[3]);
- }
- case 2:
- {
- SetPlayerPos(playerid, Position[0]-7, Position[1], Position[2]);
- SetPlayerFacingAngle(playerid, Position[3]);
- }
- case 3:
- {
- SetPlayerPos(playerid, Position[0]+7, Position[1], Position[2]);
- SetPlayerFacingAngle(playerid, Position[3]);
- }
- case 4:
- {
- if (PosV != 2) return SendClientMessage(playerid, Red, "** [ERRO] Use /IrPos 5 só quanto o /PosV = 2");
- SetPlayerPos(playerid, Position[0]+4.6811, Position[1]+4.8308, Position[2]);
- SetPlayerFacingAngle(playerid, Position[3]);
- }
- case 5:
- {
- if (PosV != 3) return SendClientMessage(playerid, Red, "** [ERRO] Use /IrPos 5 só quanto o /PosV = 3");
- SetPlayerPos(playerid, Position[0]-4.9276, Position[1]+4.9221, Position[2]);
- SetPlayerFacingAngle(playerid, Position[3]);
- }
- }
- return 1;
- }
- CMD:mypos(playerid){
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- format(Str, sizeof(Str), "X:%0.4f Y: %0.4f Z: %0.4f", Pos[0], Pos[1], Pos[2]);
- SendClientMessage(playerid, -1, Str);
- return 1;
- }
- CMD:dmc(playerid){
- new idv = GetPlayerVehicleID(playerid);
- DestroyVehicle(idv);
- return 1;
- }
- CMD:carregarveiculos(playerid, params[]){
- new pasta[128], x, str1[120], str2[120], str3[120], str4[120], Max;
- if(sscanf(params, "d", x)) return SendClientMessage(playerid, Red, "** [ERRO] {AAAAAA}Utilize: /CarregarVeiculos [ID do arquivo]");
- format(pasta, sizeof(pasta), "/Veiculos/%02d.ini", x);
- Max = DOF2_GetInt(pasta, "Total Veiculos");
- if(!DOF2_FileExists(pasta)) return SendClientMessage(playerid, Red, "** [ERRO] Não existe veículos salvos com esse ID!");
- for(new i; i < MAX_VEHICLES; i++){
- DestroyVehicle(Veiculo[i]);
- TotalVeiculos = 0;
- }
- for(new X = 1; X <= Max; X++){
- TotalVeiculos++;
- format(str1, sizeof(str1), "%02d PosX", X);
- format(str2, sizeof(str2), "%02d PosY", X);
- format(str3, sizeof(str3), "%02d PosZ", X);
- format(str4, sizeof(str4), "%02d Angle", X);
- Pos[0] = DOF2_GetFloat(pasta, str1);
- Pos[1] = DOF2_GetFloat(pasta, str2);
- Pos[2] = DOF2_GetFloat(pasta, str3);
- Pos[3] = DOF2_GetFloat(pasta, str4);
- Veiculo[TotalVeiculos] = CreateVehicle(DOF2_GetInt(pasta, "Modelo"), Pos[0], Pos[1], Pos[2], Pos[3], Cor[0], Cor[1], -1, 0);
- AddVehicleComponent(Veiculo[TotalVeiculos], 1010);
- AddVehicleComponent(Veiculo[TotalVeiculos], 1087);
- AddVehicleComponent(Veiculo[TotalVeiculos], 1085);
- }
- Max = 0;
- format(Str, sizeof(Str), "** [ATENÇÃO] {AAAAAA}Foram carregados {FF44AA}\"%d\"{AAAAAA} veículos!", TotalVeiculos);
- SendClientMessage(playerid, Red, Str);
- format(Str, sizeof(Str), "** [ATENÇÃO] {AAAAAA}Criados por: {FF44AA}%s", DOF2_GetString(pasta, "Criador"));
- SendClientMessage(playerid, Red, Str);
- format(Str, sizeof(Str), "** [ATENÇÃO] {AAAAAA}Modelo ID: {FF44AA}%d", DOF2_GetInt(pasta, "Modelo"));
- SendClientMessage(playerid, Red, Str);
- return 1;
- }
- CMD:cores(playerid, params[]){
- new x[2];
- if(sscanf(params, "dd", x[0], x[1])) return SendClientMessage(playerid, Red, "** [ERRO] {AAAAAA}Utilize: /Cores [Cor 1] [Cor 2]");
- Cor[0] = x[0];
- Cor[1] = x[1];
- format(Str, sizeof(Str), "** [INFO]{FFFFFF} As cores dos veículos foram alteradas para %d e %d", Cor[0], Cor[1]);
- SendClientMessage(playerid, Red, Str);
- return 1;
- }
- CMD:deletarveiculos(playerid, params[]){
- new file[128], id;
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, Red, "** [ERRO] {AAAAAA}Utilize: /DeletarVeiculos [ID do arquivo]");
- format(file, sizeof(file), pasta_veiculos, id);
- if(!DOF2_FileExists(file)) return SendClientMessage(playerid, Red, "** [ERRO] Não existe veículos salvos com esse ID!");
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF}Arquivo de veículos deletados com sucesso!");
- DOF2_RemoveFile(file);
- return 1;
- }
- CMD:contar(playerid, params[]){
- new Float:p[3], y;
- if(sscanf(params, "d", y)) return SendClientMessage(playerid, Red, "** [ERRO] {AAAAAA}Utilize: /Contar [tempo em segundos]");
- if(y < 1 || y > 15) return SendClientMessage(playerid, Red, "** [ERRO] O tempo deve ser entre 1 e 15 segundos!");
- SendClientMessage(playerid, Red, "** [ATENÇÃO] {FFFFFF}Você iniciou a contagem!");
- for(new i; i < MAX_PLAYERS; i++){
- if(!IsPlayerConnected(i)) continue;
- if(Evento[i] == false) continue;
- KillTimer(TempoRecorde[i]);
- Tempo[i][0] = 0;
- Tempo[i][1] = 0;
- Tempo[i][2] = 0;
- GetPlayerPos(i, p[0], p[1], p[2]);
- Count[i] = y;
- TimerCount[i] = SetTimerEx("CountDown", 1000, true, "d", i);
- format(Str, sizeof(Str), "~r~~h~# ~p~Contagem: ~w~%02d ~r~~h~#", Count[i]);
- PlayerTextDrawSetString(i, TextContar[i], Str);
- PlayerTextDrawShow(i, TextContar[i]);
- TogglePlayerControllable(i, 0);
- PlayerPlaySound(playerid, 1056, p[0], p[1], p[2]);
- }
- return 1;
- }
- CMD:salvarevento(playerid, params[]){
- new x;
- if(sscanf(params, "d", x)) return SendClientMessage(playerid, Red, "** [ERRO] {AAAAAA}Utilize: /SalvarEvento [Vagas]");
- if(EventoCriado == true) return SendClientMessage(playerid, Red, "** [ERRO] Já existe um evento criado!");
- GetPlayerPos(playerid, PosEvento[0], PosEvento[1], PosEvento[2]);
- EventoCriado = true;
- Vagas = x;
- SendClientMessage(playerid, -1, "** [INFO] Evento salvo com sucesso!");
- return 1;
- }
- CMD:irevento(playerid){
- new file[120];
- format(file, sizeof(file), pasta_race, CPCarregado);
- if (EventoCriado == false) return SendClientMessage(playerid, Red, "** [ERRO] Não existe um evento criado!");
- if (Evento[playerid] == true) return SendClientMessage(playerid, Red, "** [ERRO] Você já está no evento!");
- if (Status == true) return SendClientMessage(playerid, Red, "** [ERRO] O evento está fechado!");
- if (Vagas < 1) return SendClientMessage(playerid, Red, "** [ERRO] Não há mais vagas!");
- if (EventoIniciou == true){
- for (new i; i < MAX_PLAYERS; i++){
- if (!IsPlayerConnected(i)) continue;
- if (i == playerid) continue;
- Tempo[playerid][0] = Tempo[i][0];
- Tempo[playerid][1] = Tempo[i][1];
- }
- TempoRecorde[playerid] = SetTimerEx("TimerT", 1000, true, "d", playerid);
- }
- if (Congelado == true){
- TogglePlayerControllable(playerid, 0);
- }else{
- TogglePlayerControllable(playerid, 1);
- }
- format(Str, sizeof(Str), "%s", DOF2_GetString(file, "Recordista"));
- PlayerTextDrawSetString(playerid, InicioRace4[playerid], Str);
- format(Str, sizeof(Str), "%02d", CPCarregado);
- PlayerTextDrawSetString(playerid, InicioRace2[playerid], Str);
- if(DOF2_GetInt(file, "Recorde Minutos") != 90){
- format(Str, sizeof(Str), "00:%02d:%02d", DOF2_GetInt(file, "Recorde Minutos"), DOF2_GetInt(file, "Recorde Segundos"));
- }else{
- format(Str, sizeof(Str), "00:00:00");
- }
- PlayerTextDrawSetString(playerid, InicioRace6[playerid], Str);
- PlayerTextDrawShow(playerid, TempoCorrida[playerid]);
- PlayerTextDrawShow(playerid, InicioRace0[playerid]);
- PlayerTextDrawShow(playerid, InicioRace7[playerid]);
- PlayerTextDrawShow(playerid, InicioRace1[playerid]);
- PlayerTextDrawShow(playerid, InicioRace2[playerid]);
- PlayerTextDrawShow(playerid, InicioRace3[playerid]);
- PlayerTextDrawShow(playerid, InicioRace4[playerid]);
- PlayerTextDrawShow(playerid, InicioRace5[playerid]);
- PlayerTextDrawShow(playerid, InicioRace6[playerid]);
- format(Str, sizeof(Str), "~g~~h~0/%d", DOF2_GetInt(file, "Total CPS"));
- PlayerTextDrawSetString(playerid, Textdraw5[playerid], Str);
- PlayerTextDrawShow(playerid, Textdraw0[playerid]);
- PlayerTextDrawShow(playerid, Textdraw1[playerid]);
- PlayerTextDrawShow(playerid, Textdraw2[playerid]);
- PlayerTextDrawShow(playerid, Textdraw5[playerid]);
- PlayerTextDrawShow(playerid, Textdraw6[playerid]);
- PlayerTextDrawShow(playerid, Textdraw7[playerid]);
- PlayerTextDrawShow(playerid, Textdraw8[playerid]);
- PlayerTextDrawShow(playerid, Textdraw9[playerid]);
- PlayersEvento++;
- IRVeiculos++;
- Vagas--;
- SetCameraBehindPlayer(playerid);
- Evento[playerid] = true;
- SetPlayerPos(playerid, PosEvento[0], PosEvento[1], PosEvento[2]);
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF}Você veio para o evento!");
- PutPlayerInVehicle(playerid, Veiculo[IRVeiculos], 0);
- return 1;
- }
- CMD:sairevento(playerid){
- if(Evento[playerid] == false) return SendClientMessage(playerid, Red, "** [ERRO] Você não está em um evento!");
- Evento[playerid] = false;
- SetTimerEx("EsconderTextdraw", 100, false, "i", playerid);
- SpawnPlayer(playerid);
- PlayersEvento--;
- Vagas++;
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF}Você saiu do evento e foi respawnado!");
- return 1;
- }
- CMD:deletarevento(playerid){
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF}Evento deletado com sucesso!");
- for(new I; I < 50; I++){
- if(!IsPlayerConnected(I)) continue;
- PlayerTextDrawHide(playerid, TempoCorrida[I]);
- Evento[I] = false;
- EventoCriado = false;
- Congelado = true;
- IRVeiculos = 0;
- PlayersEvento = 0;
- Tempo[I][0] = 0;
- Tempo[I][1] = 0;
- EventoIniciou = false;
- DisableRemoteVehicleCollisions(I, 0);
- SetTimerEx("EsconderTextdraw", 100, false, "i", I);
- PlayerTextDrawSetString(I, Textdraw2[I], "~y~~h~1|: ~r~Ninguem");
- PlayerTextDrawSetString(I, Textdraw6[I], "~y~~h~2|: ~r~Ninguem");
- PlayerTextDrawSetString(I, Textdraw7[I], "~y~~h~3|: ~r~Ninguem");
- PlayerTextDrawSetString(I, Textdraw8[I], "~y~~h~4|: ~r~Ninguem");
- PlayerTextDrawSetString(I, Textdraw9[I], "~y~~h~5|: ~r~Ninguem");
- }
- return 1;
- }
- CMD:colisao(playerid){
- if(Colision == false)
- {
- Colision = true;
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- DisableRemoteVehicleCollisions(i, 1);
- }
- SendClientMessage(playerid, -1, "* Colisão entre os veículos desativada");
- }else if (Colision == true){
- Colision = false;
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- DisableRemoteVehicleCollisions(i, 0);
- }
- SendClientMessage(playerid, -1, "* Colisão entre os veículos ativada");
- }
- return 1;
- }
- CMD:fecharevento(playerid){
- if(Status == false){
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF}Evento fechado!");
- Status = true;
- }else{
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF}Evento aberto!");
- Status = false;
- }
- return 1;
- }
- CMD:stopppp(playerid){
- TempoRecorde[playerid] = SetTimerEx("TimerT", 1000, false, "d", playerid);
- KillTimer(TempoRecorde[playerid]);
- return 1;
- }
- CMD:congelarevento(playerid){
- if(Congelado == false){
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF}Você congelou todos jogadores do evento!");
- Congelado = true;
- }else{
- SendClientMessage(playerid, Red, "** [INFO] {FFFFFF}Você descongelou todos os jogadores do evento!");
- Congelado = false;
- }
- return 1;
- }
- CMD:autoreparar(playerid){
- if (AutoRepararX[playerid] == false){
- AutoRepararX[playerid] = true;
- AutoReparar[playerid] = SetTimerEx("AutoRepararP", 1000, true, "i", playerid);
- SendClientMessage(playerid, -1, "* Autoreparar ativado!");
- }else
- if(AutoRepararX[playerid] == true){
- AutoRepararX[playerid] = false;
- KillTimer(AutoReparar[playerid]);
- SendClientMessage(playerid, -1, "* Autoreparar desativado!");
- }
- return 1;
- }
- CMD:anunciar(playerid, params[]){
- new Texto[150], strin[150];
- if (sscanf(params, "s[150]", Texto)) return SendClientMessage(playerid, Red, "** [ERRO] {AAAAAA}Utilize: /Anunciar [Texto]");
- format(strin, sizeof(strin), "~r~~h~# ~p~%s : ~w~%s ~r~~h~#", GetName(playerid), Texto);
- TextDrawSetString(TextdrawAnuncio, strin);
- TextDrawShowForAll(TextdrawAnuncio);
- KillTimer(Anuncio);
- Anuncio = SetTimer("RemoverAnuncio", 5000, false);
- return 1;
- }
- CMD:asdsadasdas(playerid){
- for(new i; i < MAX_PLAYERS; i++){
- if(!IsPlayerConnected(i)) continue;
- PlayerTextDrawHide(playerid, InicioRace0[i]);
- PlayerTextDrawHide(playerid, InicioRace1[i]);
- PlayerTextDrawHide(playerid, InicioRace2[i]);
- PlayerTextDrawHide(playerid, InicioRace3[i]);
- PlayerTextDrawHide(playerid, InicioRace4[i]);
- PlayerTextDrawHide(playerid, InicioRace5[i]);
- PlayerTextDrawHide(playerid, InicioRace6[i]);
- PlayerTextDrawHide(playerid, InicioRace7[i]);
- PlayerTextDrawDestroy(playerid, InicioRace0[i]);
- PlayerTextDrawDestroy(playerid, InicioRace1[i]);
- PlayerTextDrawDestroy(playerid, InicioRace2[i]);
- PlayerTextDrawDestroy(playerid, InicioRace3[i]);
- PlayerTextDrawDestroy(playerid, InicioRace4[i]);
- PlayerTextDrawDestroy(playerid, InicioRace5[i]);
- PlayerTextDrawDestroy(playerid, InicioRace6[i]);
- PlayerTextDrawDestroy(playerid, InicioRace7[i]);
- }
- return 1;
- }
- CMD:deletarcp(playerid){
- new file[128];
- format(file, sizeof(file), pasta_race, RaceName);
- CPCountX[playerid]--;
- CPCountY[playerid]--;
- CPCountZ[playerid]--;
- CPCount--;
- TotalCPS = TotalCPS - 1;
- format(String, sizeof(String), "%02d CPX", CPCountX[playerid]-1);
- format(String2, sizeof(String2), "%02d CPY", CPCountY[playerid]-1);
- format(String3, sizeof(String3), "%02d CPZ", CPCountZ[playerid]-1);
- SetPlayerRaceCheckpoint(playerid, 1, DOF2_GetFloat(file, String), DOF2_GetFloat(file, String2), DOF2_GetFloat(file, String3), 0.0, 0.0, 0.0, 7);
- SendClientMessage(playerid, sizeof(playerid), "* Último CP salvo foi deletado");
- return 1;
- }
- forward RemoverAnuncio();
- forward AutoRepararP(playerid);
- forward Recorde(playerid);
- forward CountDown(playerid);
- forward TimerRecorde(playerid);
- forward TimerT(playerid);
- forward EsconderTextdraw(playerid);
- forward OrganizarArray(playerid);
- forward CountCP(playerid);
- public CountCP(playerid)
- {
- PlayerTextDrawHide(playerid, CPConquistado[playerid]);
- return 1;
- }
- public RemoverAnuncio()
- {
- TextDrawHideForAll(TextdrawAnuncio);
- TextDrawSetString(TextdrawAnuncio, "");
- return 1;
- }
- forward AtualizarTextdraws(playerid);
- public AtualizarTextdraws(playerid)
- {
- if (Terminou == 1)
- {
- format(Primeiro, sizeof(Primeiro), "~y~~h~1|: ~w~%s ~p~~h~(%02d:%02d)~g~ Won", GetName(Lugar[1]), Tempo[Lugar[1]][1], Tempo[Lugar[1]][0]);
- PlayerTextDrawSetString(playerid, Textdraw2[playerid], Primeiro);
- }
- if (Terminou == 2)
- {
- format(Segundo, sizeof(Segundo), "~y~~h~2|: ~w~%s ~p~~h~(%02d:%02d)", GetName(Lugar[2]), Tempo[Lugar[2]][1], Tempo[Lugar[2]][0]);
- PlayerTextDrawSetString(playerid, Textdraw6[playerid], Segundo);
- }
- if (Terminou == 3)
- {
- format(Terceiro, sizeof(Terceiro), "~y~~h~3|: ~w~%s ~p~~h~(%02d:%02d)", GetName(Lugar[3]), Tempo[Lugar[3]][1], Tempo[Lugar[3]][0]);
- PlayerTextDrawSetString(playerid, Textdraw7[playerid], Terceiro);
- }
- if (Terminou == 4)
- {
- format(Quarto, sizeof(Quarto), "~y~~h~4|: ~w~%s ~p~~h~(%02d:%02d)", GetName(Lugar[4]), Tempo[Lugar[4]][1], Tempo[Lugar[4]][0]);
- PlayerTextDrawSetString(playerid, Textdraw8[playerid], Quarto);
- }
- if (Terminou == 5)
- {
- format(Quinto, sizeof(Quinto), "~y~~h~5|: ~w~%s ~p~~h~(%02d:%02d)", GetName(Lugar[5]), Tempo[Lugar[5]][1], Tempo[Lugar[5]][0]);
- PlayerTextDrawSetString(playerid, Textdraw9[playerid], Quinto);
- }
- return 1;
- }
- public EsconderTextdraw(playerid){
- if(Evento[playerid] == false){
- PlayerTextDrawHide(playerid, Textdraw0[playerid]);
- PlayerTextDrawHide(playerid, Textdraw1[playerid]);
- PlayerTextDrawHide(playerid, Textdraw2[playerid]);
- PlayerTextDrawHide(playerid, Textdraw5[playerid]);
- PlayerTextDrawHide(playerid, Textdraw6[playerid]);
- PlayerTextDrawHide(playerid, Textdraw7[playerid]);
- PlayerTextDrawHide(playerid, Textdraw8[playerid]);
- PlayerTextDrawHide(playerid, Textdraw9[playerid]);
- PlayerTextDrawHide(playerid, TextContar[playerid]);
- PlayerTextDrawHide(playerid, Textdraw10[playerid]);
- PlayerTextDrawHide(playerid, TempoCorrida[playerid]);
- PlayerTextDrawHide(playerid, InicioRace0[playerid]);
- PlayerTextDrawHide(playerid, InicioRace1[playerid]);
- PlayerTextDrawHide(playerid, InicioRace2[playerid]);
- PlayerTextDrawHide(playerid, InicioRace3[playerid]);
- PlayerTextDrawHide(playerid, InicioRace4[playerid]);
- PlayerTextDrawHide(playerid, InicioRace5[playerid]);
- PlayerTextDrawHide(playerid,InicioRace6[playerid]);
- PlayerTextDrawHide(playerid, InicioRace7[playerid]);
- }
- if (EventoCriado == false)
- {
- for(new i; i < MAX_PLAYERS; i++){
- PlayerTextDrawHide(i, Textdraw0[i]);
- PlayerTextDrawHide(i, Textdraw1[i]);
- PlayerTextDrawHide(i, Textdraw2[i]);
- PlayerTextDrawHide(i, Textdraw5[i]);
- PlayerTextDrawHide(i, Textdraw6[i]);
- PlayerTextDrawHide(i, Textdraw7[i]);
- PlayerTextDrawHide(i, Textdraw8[i]);
- PlayerTextDrawHide(i, Textdraw9[i]);
- PlayerTextDrawHide(i, Textdraw10[i]);
- PlayerTextDrawHide(i, TextContar[i]);
- PlayerTextDrawHide(i, TempoCorrida[i]);
- PlayerTextDrawHide(i, InicioRace0[i]);
- PlayerTextDrawHide(i, InicioRace1[i]);
- PlayerTextDrawHide(i, InicioRace2[i]);
- PlayerTextDrawHide(i, InicioRace3[i]);
- PlayerTextDrawHide(i, InicioRace4[i]);
- PlayerTextDrawHide(i, InicioRace5[i]);
- PlayerTextDrawHide(i, InicioRace6[i]);
- PlayerTextDrawHide(i, InicioRace7[i]);
- }
- }
- return 1;
- }
- public TimerT(playerid){
- Tempo[playerid][0]++;
- if(Tempo[playerid][0] > 59){
- Tempo[playerid][0] = 0;
- Tempo[playerid][1]++;
- }
- format(Str, sizeof(Str), "%02d:%02d:%02d", Tempo[playerid][2], Tempo[playerid][1], Tempo[playerid][0]);
- PlayerTextDrawSetString(playerid, TempoCorrida[playerid], Str);
- if(Tempo[playerid][1] > 59){
- Tempo[playerid][2]++;
- Tempo[playerid][1] = 0;
- }
- return 1;
- }
- public AutoRepararP(playerid){
- RepairVehicle(GetPlayerVehicleID(playerid));
- return 1;
- }
- public CountDown(playerid){
- new Float:p[3];
- GetPlayerPos(playerid, p[0], p[1], p[2]);
- Count[playerid]--;
- if(Count[playerid] < 1){
- KillTimer(TimerCount[playerid]);
- PlayerTextDrawHide(playerid, TextContar[playerid]);
- GameTextForPlayer(playerid, "~g~~h~GO ~y~~h~GO ~r~~h~GO!", 3600, 3);
- TogglePlayerControllable(playerid, 1);
- Congelado = false;
- EventoIniciou = true;
- TempoRecorde[playerid] = SetTimerEx("TimerT", 1000, true, "d", playerid);
- PlayerPlaySound(playerid, 1057,p[0],p[1],p[2]);
- }else if(Count[playerid] > 0){
- PlayerTextDrawShow(playerid, TextContar[playerid]);
- format(Str, sizeof(Str), "~r~~h~# ~p~Contagem: ~w~%02d ~r~~h~#", Count[playerid]);
- PlayerTextDrawSetString(playerid, TextContar[playerid], Str);
- PlayerPlaySound(playerid, 1056,p[0],p[1],p[2]);
- }
- return 1;
- }
- stock GetName(playerid){
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- return Nome;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement