Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //creditos
- // criador do gm BrianD
- //Includes
- #include <a_samp>
- #include <zcmd>
- #include <dof2>
- #include <sscanf2>
- #include <F_Streamer>
- //=======Defines=====
- #define DINHEIRO_INICIAL 40000
- #define SCORE_INICIAL 0
- #define MUSICA_INICIO "https://www.dropbox.com/s/v44y4uqw086pyzr/Scorpions%20-%20Rock%20You%20Like%20A%20Hurricane%20%28PCM%20Version%29.mp3?dl=1" // sempre mudeo o mp3?dl=0 para mp3?dl=1
- #define GM_MODE "Truck"
- #define MAX_VEICULOS 1000
- #define A_VELOCIMETRO 100 //Tempo de atualização em milesemos de segundo
- #define GASTO_GASOLINA 25000 //tempo para descer 1 litro em milesemos de segundo
- #define TEMPO_INICIO 5000
- //=======PREÇO=======
- #define PRECO_MULE 35000
- #define PRECO_YANKEE 40000
- #define PRECO_BENSON 25000
- #define PRECO_DFT30 70000
- #define PRECO_LINERUNNER 120000
- #define PRECO_TANKER 140000
- //=======CORES=======
- #define COLOR_RED 0xFF230AFF
- #define COLOR_YELLOW 0xEDED26FF
- #define COLOR_GREEN 0x1CD622FF
- #define COLOR_BLUE 0x0597F2FF
- #define COLOR_PINK 0xF000ECFF
- #define COLOR_ORANGE 0xFAAC02FF
- #define COLOR_PURPLE 0x9B02FAFF
- #define COLOR_WHITE 0xFFFFFFFF
- #define COLOR_GREY 0x6B6A67FF
- //======DIALOG=======
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define DIALOG_SPAWN 3
- #define DIALOG_INFO1 4
- #define DIALOG_MULE 5
- #define DIALOG_YANKEE 6
- #define DIALOG_BENSON 7
- #define DIALOG_DFT30 8
- #define DIALOG_LINERUNNER 9
- #define DIALOG_TANKER 10
- #define DIALOG_GARAGE1LS 11
- #define DIALOG_GARAGE2LS 12
- #define DIALOG_GARAGE1LV 13
- #define DIALOG_GARAGE2LV 14
- #define DIALOG_GARAGE1SF 15
- #define DIALOG_GARAGE2SF 16
- #define DIALOG_CONCE 17
- #define DIALOG_CONCEVENDA 18
- //======forward======
- forward logando(playerid);
- forward comprandocaminhao(playerid);
- forward velocidade(playerid);
- forward gasolina(playerid);
- forward posto(playerid);
- forward abastecendo(playerid);
- forward clima();
- forward carregarradar();
- forward checkradar(playerid);
- forward reset(playerid);
- forward flash(playerid);
- //======Variaveis====
- new veiculo[MAX_PLAYERS];
- new maxcar[MAX_VEICULOS];
- new pmule[128];
- new pyankee[128];
- new pbenson[128];
- new pdft[128];
- new plinerunner[128];
- new ptanker[128];
- new vuso[MAX_PLAYERS] = 0;
- new padmin[MAX_PLAYERS];
- new permissaoadm[MAX_PLAYERS];
- new cargasolina[MAX_VEICULOS];
- new maxtimer[1000];
- new objetoradar[1000];
- new Text3D:labelradar[1000];
- new Float:rposx[1000];
- new Float:rposy[1000];
- new Float:rposz[1000];
- new Float:rotation[1000];
- new Speed[1000];
- new bool:jmulta[501];
- //======TextDrawn====
- new Text:Textdraw0;
- new Text:Textdraw1;
- new Text:Textdraw2;
- new Text:Textdraw3;
- new Text:Textdraw4;
- new Text:Textdraw5;
- new Text:Textdraw6;
- new Text:Textdraw7;
- //===================
- main()
- {
- }
- public OnGameModeInit()
- {
- for(new i = 0; i < 1000; i++)
- {
- cargasolina[i] = 100;
- }
- SetTimer("clima", 600000, true);
- DisableInteriorEnterExits();
- carregarradar();
- //TextDrawn
- Textdraw0 = TextDrawCreate(646.500000, 318.459930, "usebox");
- TextDrawLetterSize(Textdraw0, 0.000000, 15.699997);
- TextDrawTextSize(Textdraw0, -2.500000, 0.000000);
- TextDrawAlignment(Textdraw0, 1);
- TextDrawColor(Textdraw0, 255);
- TextDrawUseBox(Textdraw0, true);
- TextDrawBoxColor(Textdraw0, 255);
- TextDrawSetShadow(Textdraw0, 0);
- TextDrawSetOutline(Textdraw0, 0);
- TextDrawBackgroundColor(Textdraw0, 255);
- TextDrawFont(Textdraw0, 0);
- Textdraw1 = TextDrawCreate(687.500000, 1.500000, "usebox");
- TextDrawLetterSize(Textdraw1, 0.000000, 0.231110);
- TextDrawTextSize(Textdraw1, -2.000000, 0.000000);
- TextDrawAlignment(Textdraw1, 1);
- TextDrawColor(Textdraw1, 0);
- TextDrawUseBox(Textdraw1, true);
- TextDrawBoxColor(Textdraw1, 255);
- TextDrawSetShadow(Textdraw1, 0);
- TextDrawSetOutline(Textdraw1, 0);
- TextDrawFont(Textdraw1, 0);
- Textdraw2 = TextDrawCreate(636.000000, 387.339996, "usebox");
- TextDrawLetterSize(Textdraw2, 0.000000, 3.681111);
- TextDrawTextSize(Textdraw2, 506.000000, 0.000000);
- TextDrawAlignment(Textdraw2, 1);
- TextDrawColor(Textdraw2, 0);
- TextDrawUseBox(Textdraw2, true);
- TextDrawBoxColor(Textdraw2, 102);
- TextDrawSetShadow(Textdraw2, 0);
- TextDrawSetOutline(Textdraw2, 0);
- TextDrawFont(Textdraw2, 0);
- Textdraw3 = TextDrawCreate(510.500000, 389.759979, "KM/h:");
- TextDrawLetterSize(Textdraw3, 0.449999, 1.600000);
- TextDrawAlignment(Textdraw3, 1);
- TextDrawColor(Textdraw3, -1);
- TextDrawSetShadow(Textdraw3, 0);
- TextDrawSetOutline(Textdraw3, 1);
- TextDrawBackgroundColor(Textdraw3, 51);
- TextDrawFont(Textdraw3, 1);
- TextDrawSetProportional(Textdraw3, 1);
- Textdraw4 = TextDrawCreate(557.000000, 389.759948, "valor");
- TextDrawLetterSize(Textdraw4, 0.449999, 1.600000);
- TextDrawAlignment(Textdraw4, 1);
- TextDrawColor(Textdraw4, -2139062017);
- TextDrawSetShadow(Textdraw4, 0);
- TextDrawSetOutline(Textdraw4, 1);
- TextDrawBackgroundColor(Textdraw4, 51);
- TextDrawFont(Textdraw4, 1);
- TextDrawSetProportional(Textdraw4, 1);
- Textdraw5 = TextDrawCreate(510.500000, 403.200012, "Gasolina:");
- TextDrawLetterSize(Textdraw5, 0.449999, 1.600000);
- TextDrawAlignment(Textdraw5, 1);
- TextDrawColor(Textdraw5, -1);
- TextDrawSetShadow(Textdraw5, 0);
- TextDrawSetOutline(Textdraw5, 1);
- TextDrawBackgroundColor(Textdraw5, 51);
- TextDrawFont(Textdraw5, 1);
- TextDrawSetProportional(Textdraw5, 1);
- Textdraw6 = TextDrawCreate(582.000000, 403.760040, "valorg");
- TextDrawLetterSize(Textdraw6, 0.449999, 1.600000);
- TextDrawAlignment(Textdraw6, 1);
- TextDrawColor(Textdraw6, -2139062017);
- TextDrawSetShadow(Textdraw6, 0);
- TextDrawSetOutline(Textdraw6, 1);
- TextDrawBackgroundColor(Textdraw6, 51);
- TextDrawFont(Textdraw6, 1);
- TextDrawSetProportional(Textdraw6, 1);
- Textdraw7 = TextDrawCreate(746.000000, -73.539955, "usebox");
- TextDrawLetterSize(Textdraw7, 0.000000, 65.098876);
- TextDrawTextSize(Textdraw7, -154.500000, 0.000000);
- TextDrawAlignment(Textdraw7, 1);
- TextDrawColor(Textdraw7, 0);
- TextDrawUseBox(Textdraw7, true);
- TextDrawBoxColor(Textdraw7, 1258284921);
- TextDrawSetShadow(Textdraw7, 0);
- TextDrawSetOutline(Textdraw7, 0);
- TextDrawFont(Textdraw7, 1);
- //=====================
- SetGameModeText(GM_MODE);
- maxcar[0] = CreateVehicle(414,2148.7766,1409.4293,10.9145,359.3557,1,1,1); // mulepos
- maxcar[1] = CreateVehicle(456,2139.1135,1410.5844,10.9947,359.8750,1,1,1); // yankeepos
- maxcar[2] = CreateVehicle(499,2129.5378,1409.6095,10.8120,359.7978,1,1,1); // bensonpos
- maxcar[3] = CreateVehicle(578,2119.9146,1411.4460,11.4388,359.5814,1,1,1); // dft-30pos
- maxcar[4] = CreateVehicle(403,2110.3721,1410.2285,11.4264,1.1591,1,1,1); // linerunnerpos
- maxcar[5] = CreateVehicle(514,2100.8567,1411.0819,11.4063,359.0898,1,1,1); // tankerpos
- SetVehicleParamsEx(maxcar[0], 0, 0, 0, 1, 0, 0, 0);
- SetVehicleParamsEx(maxcar[1], 0, 0, 0, 1, 0, 0, 0);
- SetVehicleParamsEx(maxcar[2], 0, 0, 0, 1, 0, 0, 0);
- SetVehicleParamsEx(maxcar[3], 0, 0, 0, 1, 0, 0, 0);
- SetVehicleParamsEx(maxcar[4], 0, 0, 0, 1, 0, 0, 0);
- SetVehicleParamsEx(maxcar[5], 0, 0, 0, 1, 0, 0, 0);
- Create3DTextLabel("GARAGEM 1\nDigite /garagem", COLOR_GREEN, 555.7392,-1293.5319,17.2482, 20, 0, 0);
- Create3DTextLabel("GARAGEM 2\nDigite /garagem", COLOR_GREEN, 531.0724,-1293.5546,17.2422, 20, 0, 0);
- Create3DTextLabel("GARAGEM 1\nDigite /garagem", COLOR_GREEN, 2182.7561,1027.8881,10.8203, 20, 0, 0);
- Create3DTextLabel("GARAGEM 2\nDigite /garagem", COLOR_GREEN, 2187.8994,1014.3012,10.8203, 20, 0, 0);
- Create3DTextLabel("GARAGEM 1\nDigite /garagem", COLOR_GREEN, -2661.3140,1391.8323,7.0994, 20, 0, 0);
- Create3DTextLabel("GARAGEM 2\nDigite /garagem", COLOR_GREEN, -2649.5305,1394.9143,7.0938, 20, 0, 0);
- Create3DTextLabel("Concessionaria\nAperte ENTER", COLOR_GREEN, 2115.0681,1423.4795,10.8203, 20, 0, 0);
- Create3DTextLabel("Guardar Carro\nDigite /GUARDAR", COLOR_GREEN, 2185.4976,1021.1578,10.8203, 20, 0, 0);
- Create3DTextLabel("Guardar Carro\nDigite /GUARDAR", COLOR_GREEN, -2655.5527,1393.5116,7.0938, 20, 0, 0);
- Create3DTextLabel("Guardar Carro\nDigite /GUARDAR", COLOR_GREEN, 542.9576,-1293.9307,17.2422, 20, 0, 0);
- //=============================
- Create3DTextLabel("/abastecer", COLOR_GREEN, 1939.2181,-1773.0911,13.3828, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 1943.7041,-1772.8866,13.3906, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 1004.1920,-939.5379,42.1797, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 1003.5308,-934.4844,42.1797, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 1003.5308,-934.4844,42.1797, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, -93.8022,-1175.0951,2.2660, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, -1609.3066,-2718.4380,48.5391, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, -1605.6553,-2714.4573,48.5335, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, -1602.1990,-2710.1804,48.5391, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, -1668.7905,420.3757,7.1797, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, -1673.3673,415.6530,7.1797, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, -1678.7944,410.2278,7.1797, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, -1682.7505,406.1461,7.1797, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 2120.8606,918.2867,10.8203, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 2114.6873,918.4413,10.8203, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 2108.9775,918.8206,10.8203, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 2108.8982,928.8802,10.8203, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 2114.6130,928.6480,10.8203, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 2120.6721,928.8079,10.8203, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 605.3086,1704.7125,6.9922, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 608.1713,1700.2024,6.9922, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 611.9305,1694.8732,6.9922, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 615.1508,1689.9467,6.9922, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 618.6849,1684.9962,6.9922, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 622.2836,1679.7192,6.9922, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 652.6727,-570.3786,16.3359, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 658.9236,-570.2186,16.3359, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 659.1113,-559.4594,16.3359, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, 652.0743,-559.9952,16.3359, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, -1327.5271,2683.0139,50.0625, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, -1327.9219,2677.5537,50.0625, 20, 0, 0);
- Create3DTextLabel("/abastecer", COLOR_GREEN, -1328.7938,2672.1316,50.0625, 20, 0, 0);
- //=============================
- CreatePickup(1272, 0, 2185.4976,1021.1578,10.8203, 0);
- CreatePickup(1272, 0, -2655.5527,1393.5116,7.0938, 0);
- CreatePickup(1272, 0, 542.9576,-1293.9307,17.2422, 0);
- CreatePickup(1274, 0, 2115.0681,1423.4795,10.8203, 0);
- CreatePickup(1272, 0, 555.7392,-1293.5319,17.2482, 0);
- CreatePickup(1272, 0, 531.0724,-1293.5546,17.2422, 0);
- CreatePickup(1272, 0, 2182.7561,1027.8881,10.8203, 0);
- CreatePickup(1272, 0, 2187.8994,1014.3012,10.8203, 0);
- CreatePickup(1272, 0, -2661.3140,1391.8323,7.0994, 0);
- CreatePickup(1272, 0, -2649.5305,1394.9143,7.0938, 0);
- //==========Objetos============
- return 1;
- }
- public clima()
- {
- new time = random(21);
- SetWeather(time);
- }
- public carregarradar()
- {
- for(new i = 0; i < 1000; i++)
- {
- new str[128];
- format(str, sizeof(str), "Radar/%i.ini", i);
- Speed[i] = DOF2_GetInt(str, "Velocidade");
- rotation[i] = DOF2_GetFloat(str, "Angulo");
- rposx[i] = DOF2_GetFloat(str, "x");
- rposy[i] = DOF2_GetFloat(str, "y");
- rposz[i] = DOF2_GetFloat(str, "z");
- rposz[i] -= 0.5;
- objetoradar[i] = F_CreateObject(1270, rposx[i], rposy[i], rposz[i], 0.0, 0.0, rotation[i], 250);
- new str2[128];
- format(str2, sizeof(str2), "{FF230A}RADAR:\n{1CD622}Velocidade Maxima: {EDED26}%i", Speed[i]);
- labelradar[i] = Create3DTextLabel(str2, COLOR_GREY, rposx[i], rposy[i], rposz[i], 80.0, 0, 0);
- printf("Radar numero %i criado", i);
- }
- }
- public checkradar(playerid)
- {
- for(new i = 0; i < 1000; i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 15.0, rposx[i], rposy[i], rposz[i]))
- {
- if(jmulta[playerid] == false)
- {
- if(GetPlayerSpeed(playerid) > Speed[i])
- {
- jmulta[playerid] = true;
- SetTimerEx("reset", 10000, false, "i", playerid);
- TextDrawShowForPlayer(playerid, Textdraw7);
- SetTimerEx("flash", 1000, false, "i", playerid);
- new str[128];
- format(str, sizeof(str), "{FF230A}Você foi multado em {1CD622}300R$ {FF230A}por passar a {EDED26}%iKM/h {FF230A}em um radar de {EDED26}%iKM/h",GetPlayerSpeed(playerid), Speed[i]);
- GivePlayerMoney(playerid, -300);
- SendClientMessage(playerid, COLOR_GREY, str);
- GameTextForPlayer(playerid, "~n~~n~~r~Voce foi multado", 3000, 3);
- }
- }
- }
- }
- }
- public flash(playerid)
- {
- TextDrawHideForPlayer(playerid, Textdraw7);
- }
- public reset(playerid)
- {
- jmulta[playerid] = false;
- }
- public OnPlayerUpdate(playerid)
- {
- checkradar(playerid);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- PlayAudioStreamForPlayer(playerid, MUSICA_INICIO, 0);
- GameTextForPlayer(playerid, "~n~~n~~r~Carregando", 3000, 3);
- SetTimerEx("logando", TEMPO_INICIO, false, "i", playerid);
- return 1;
- }
- public abastecendo(playerid)
- {
- TogglePlayerControllable(playerid, 1);
- GivePlayerMoney(playerid, -500);
- SendClientMessage(playerid, COLOR_GREEN, "Voce pagou 500R$");
- new carid;
- carid = GetPlayerVehicleID(playerid);
- new str[10];
- format(str, sizeof(str), "%d", cargasolina[carid]);
- TextDrawSetString(Textdraw6, str);
- }
- public posto(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(IsPlayerInRangeOfPoint(playerid,2.0, 1939.2181,-1773.0911,13.3828))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 1943.7041,-1772.8866,13.3906))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 1004.1920,-939.5379,42.1797))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 1003.5308,-934.4844,42.1797))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, -88.8889,-1163.6538,2.2602))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, -93.8022,-1175.0951,2.2660))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, -1609.3066,-2718.4380,48.5391))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, -1605.6553,-2714.4573,48.5335))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, -1602.1990,-2710.1804,48.5391))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, -1668.7905,420.3757,7.1797))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, -1673.3673,415.6530,7.1797))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, -1678.7944,410.2278,7.1797))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, -1682.7505,406.1461,7.1797))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 2120.8606,918.2867,10.8203))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 2114.6873,918.4413,10.8203))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 2108.9775,918.8206,10.8203))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 2108.8982,928.8802,10.8203))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 2114.6130,928.6480,10.8203))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 2120.6721,928.8079,10.8203))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 605.3086,1704.7125,6.9922))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 608.1713,1700.2024,6.9922))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 611.9305,1694.8732,6.9922))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 615.1508,1689.9467,6.9922))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 618.6849,1684.9962,6.9922))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 622.2836,1679.7192,6.9922))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 652.6727,-570.3786,16.3359))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 658.9236,-570.2186,16.3359))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 659.1113,-559.4594,16.3359))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, 652.0743,-559.9952,16.3359))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, -1327.5271,2683.0139,50.0625))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, -1327.9219,2677.5537,50.0625))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,2.0, -1328.7938,2672.1316,50.0625))
- {
- return 1;
- }
- }
- return 0;
- }
- public velocidade(playerid)
- {
- new str[10];
- format(str, sizeof(str), "%d", GetPlayerSpeed(playerid));
- TextDrawSetString(Textdraw4, str);
- new carid;
- carid = GetPlayerVehicleID(playerid);
- if(cargasolina[carid] == 0)
- {
- TextDrawSetString(Textdraw6, str);
- SetVehicleParamsEx(carid, 0, 0, 0, 0, 0, 0, 0);
- }
- else
- {
- SetVehicleParamsEx(carid, 1, 0, 0, 0, 0, 0, 0);
- }
- }
- public gasolina(playerid)
- {
- new carid;
- carid = GetPlayerVehicleID(playerid);
- new str[10];
- format(str, sizeof(str), "%d", cargasolina[carid]);
- if(cargasolina[carid] >= 1)
- {
- cargasolina[carid] -= 1;
- TextDrawSetString(Textdraw6, str);
- }
- else
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Veiculo sem combustivel!!!");
- }
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER)
- {
- maxtimer[0] = SetTimerEx("velocidade", A_VELOCIMETRO, true, "i", playerid);
- maxtimer[1] = SetTimerEx("gasolina", GASTO_GASOLINA, true, "i", playerid);
- new str[10], carid;
- carid = GetPlayerVehicleID(playerid);
- format(str, sizeof(str), "%d", cargasolina[carid]);
- TextDrawSetString(Textdraw6, str);
- TextDrawShowForPlayer(playerid, Textdraw2);
- TextDrawShowForPlayer(playerid, Textdraw3);
- TextDrawShowForPlayer(playerid, Textdraw4);
- TextDrawShowForPlayer(playerid, Textdraw5);
- TextDrawShowForPlayer(playerid, Textdraw6);
- }
- else if(oldstate == PLAYER_STATE_DRIVER)
- {
- KillTimer(maxtimer[0]);
- KillTimer(maxtimer[1]);
- TextDrawHideForPlayer(playerid, Textdraw2);
- TextDrawHideForPlayer(playerid, Textdraw3);
- TextDrawHideForPlayer(playerid, Textdraw4);
- TextDrawHideForPlayer(playerid, Textdraw5);
- TextDrawHideForPlayer(playerid, Textdraw6);
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_REGISTER)
- {
- new str[128];
- new nick[MAX_PLAYER_NAME];
- new senha;
- senha = strval(inputtext);
- GetPlayerName(playerid, nick, sizeof(nick));
- format(str, sizeof(str),"Contas/%s.ini",nick);
- DOF2_CreateFile(str);
- DOF2_SetInt(str, "SENHA", senha);
- DOF2_SaveFile();
- new csenha;
- csenha = DOF2_GetInt(str, "SENHA");
- if(response)
- {
- if(csenha == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{FF230A}Registro", "{0597F2}Por favor digite sua {1CD622}SENHA apenas NUMEROS.", "Registrar", "Sair");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{FF230A}Login", "{0597F2}Por favor digite sua {1CD622}SENHA.", "Logar", "Sair");
- GivePlayerMoney(playerid, DINHEIRO_INICIAL);
- SetPlayerScore(playerid, SCORE_INICIAL);
- DOF2_SetInt(str, "NUMEROCARRO", 0);
- DOF2_SaveFile();
- }
- }
- else
- {
- Kick(playerid);
- }
- }
- if(dialogid == DIALOG_CONCE)
- {
- if(response)
- {
- if(listitem == 0)
- {
- new concegrana;
- concegrana = GetPlayerMoney(playerid);
- if(concegrana >= 25000)
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~Voce nao tem dinheiro o bastante para nenhum caminhao!!!", 5000, 3);
- }
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, DIALOG_CONCEVENDA, DIALOG_STYLE_LIST, "{FF230A}Venda", "{1CD622}Veiculo 1\n{0597F2}Veiculo 2", "Vender", "Sair");
- }
- }
- }
- if(dialogid == DIALOG_CONCEVENDA)
- {
- if(response)
- {
- if(listitem == 0)
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str), "Contas/%s.ini", nome);
- new cveiculo;
- cveiculo = DOF2_GetInt(str, "MODELO1");
- new ncarro;
- ncarro = DOF2_GetInt(str, "NUMEROCARRO");
- if(ncarro >= 1)
- {
- if(cveiculo == 414)
- {
- GivePlayerMoney(playerid, 25000);
- ncarro -= 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- DOF2_SetInt(str, "MODELO1", 0);
- DOF2_SaveFile();
- }
- else if(cveiculo == 456)
- {
- GivePlayerMoney(playerid, 30000);
- ncarro -= 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- DOF2_SetInt(str, "MODELO1", 0);
- DOF2_SaveFile();
- }
- else if(cveiculo == 499)
- {
- GivePlayerMoney(playerid, 15000);
- ncarro -= 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- DOF2_SetInt(str, "MODELO1", 0);
- DOF2_SaveFile();
- }
- else if(cveiculo == 578)
- {
- GivePlayerMoney(playerid, 50000);
- ncarro -= 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- DOF2_SetInt(str, "MODELO1", 0);
- DOF2_SaveFile();
- }
- else if(cveiculo == 403)
- {
- GivePlayerMoney(playerid, 80000);
- ncarro -= 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- DOF2_SetInt(str, "MODELO1", 0);
- DOF2_SaveFile();
- }
- else if(cveiculo == 514)
- {
- GivePlayerMoney(playerid, 100000);
- ncarro -= 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- DOF2_SetInt(str, "MODELO1", 0);
- DOF2_SaveFile();
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~Nenhum veiculo", 3000, 3);
- }
- }
- if(listitem == 1)
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str), "Contas/%s.ini", nome);
- new cveiculo;
- cveiculo = DOF2_GetInt(str, "MODELO2");
- new ncarro;
- ncarro = DOF2_GetInt(str, "NUMEROCARRO");
- if(ncarro >= 1)
- {
- if(cveiculo == 414)
- {
- GivePlayerMoney(playerid, 25000);
- ncarro -= 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- DOF2_SetInt(str, "MODELO2", 0);
- DOF2_SaveFile();
- }
- else if(cveiculo == 456)
- {
- GivePlayerMoney(playerid, 30000);
- ncarro -= 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- DOF2_SetInt(str, "MODELO2", 0);
- DOF2_SaveFile();
- }
- else if(cveiculo == 499)
- {
- GivePlayerMoney(playerid, 15000);
- ncarro -= 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- DOF2_SetInt(str, "MODELO2", 0);
- DOF2_SaveFile();
- }
- else if(cveiculo == 578)
- {
- GivePlayerMoney(playerid, 50000);
- ncarro -= 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- DOF2_SetInt(str, "MODELO2", 0);
- DOF2_SaveFile();
- }
- else if(cveiculo == 403)
- {
- GivePlayerMoney(playerid, 80000);
- ncarro -= 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- DOF2_SetInt(str, "MODELO2", 0);
- DOF2_SaveFile();
- }
- else if(cveiculo == 514)
- {
- GivePlayerMoney(playerid, 100000);
- ncarro -= 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- DOF2_SetInt(str, "MODELO2", 0);
- DOF2_SaveFile();
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~Nenhum veiculo", 3000, 3);
- }
- }
- }
- }
- if(dialogid == DIALOG_LOGIN)
- {
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- new str[128];
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new senha1;
- new senha2;
- senha1 = DOF2_GetInt(str, "SENHA");
- senha2 = strval(inputtext);
- if(response)
- {
- if(senha1 == senha2)
- {
- new dinheiro;
- dinheiro = DOF2_GetInt(str,"DINHEIRO");
- GivePlayerMoney(playerid, dinheiro);
- SetSpawnInfo(playerid, 0, 0, -1991.7028,137.0670,27.5391,0, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- SetPlayerPos(playerid, 1402.4291, -806.8134, 85.0475);
- SetPlayerCameraPos(playerid, 1365.7329,-900.0773,36.1101);
- SetPlayerCameraLookAt(playerid, 1378.1764,-869.2653,48.2478);
- SendClientMessage(playerid, COLOR_RED, "");
- SendClientMessage(playerid, COLOR_RED, "");
- SendClientMessage(playerid, COLOR_RED, "");
- SendClientMessage(playerid, COLOR_RED, "");
- SendClientMessage(playerid, COLOR_RED, "");
- SendClientMessage(playerid, COLOR_RED, "");
- SendClientMessage(playerid, COLOR_RED, "");
- SendClientMessage(playerid, COLOR_RED, "");
- SendClientMessage(playerid, COLOR_RED, "");
- SendClientMessage(playerid, COLOR_RED, "");
- SendClientMessage(playerid, COLOR_RED, "");
- SendClientMessage(playerid, COLOR_RED, "");
- SendClientMessage(playerid, COLOR_RED, "Você logou com suscesso!");
- new primeira;
- primeira = DOF2_GetInt(str, "VISITA");
- if(primeira == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_INFO1, DIALOG_STYLE_MSGBOX, "\t{FF230A}Bem Vindo", "{FAAC02}Ol , seja bem vindo ao nosso servidor,\n{0597F2}Para iniciar vamos levar voce a {EDED26}CONCESSIONARIA.", "{1CD622}Ir", "");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
- new stradm[128];
- new nomeadm[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nomeadm, sizeof(nomeadm));
- format(stradm, sizeof(stradm), "Contas/%s.ini", nomeadm);
- new A;
- A = DOF2_GetInt(str, "ADMIN");
- if(A >= 1)
- {
- padmin[playerid] = A;
- }
- }
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{FF230A}Login", "{0597F2}Por favor digite sua {1CD622}SENHA.", "Logar", "Sair");
- }
- }
- else
- {
- Kick(playerid);
- }
- }
- if(dialogid == DIALOG_SPAWN)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SetPlayerPos(playerid, 566.3535,-1284.1359,17.2482);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid, 1);
- GameTextForPlayer(playerid, "~n~~n~~R~Bem ~b~Vindo ~g~a~n~~p~LOS SANTOS", 3000, 3);
- StopAudioStreamForPlayer(playerid);
- }
- if(listitem == 1)
- {
- SetPlayerPos(playerid, 2177.3284,1038.6556,10.8203);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid, 1);
- GameTextForPlayer(playerid, "~n~~n~~R~Bem ~b~Vindo ~g~a~n~~p~LAS VENTURAS", 3000, 3);
- StopAudioStreamForPlayer(playerid);
- }
- if(listitem == 2)
- {
- SetPlayerPos(playerid, -2635.5271,1398.8340,7.0938);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid, 1);
- GameTextForPlayer(playerid, "~n~~n~~R~Bem ~b~Vindo ~g~a~n~~p~SAN FIERRO", 3000, 3);
- StopAudioStreamForPlayer(playerid);
- }
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
- }
- }
- if(dialogid == DIALOG_INFO1)
- {
- if(response)
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- }
- }
- if(dialogid == DIALOG_MULE)
- {
- if(response)
- {
- new grana;
- grana = GetPlayerMoney(playerid);
- if(grana >= PRECO_MULE)
- {
- ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new ncarro;
- ncarro = DOF2_GetInt(str, "NUMEROCARRO");
- ncarro += 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- GivePlayerMoney(playerid, -PRECO_MULE);
- DOF2_SetInt(str ,"VISITA", 1);
- DOF2_SaveFile();
- if(ncarro == 1)
- {
- DOF2_SetInt(str, "MODELO1", 414);
- DOF2_SaveFile();
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- }
- else if(ncarro == 2)
- {
- DOF2_SetInt(str, "MODELO2", 414);
- DOF2_SaveFile();
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- }
- else{}
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- }
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- if(veiculo[playerid] == 5)
- {
- veiculo[playerid] = 0;
- }
- else
- veiculo[playerid] += 1;
- }
- }
- if(dialogid == DIALOG_YANKEE)
- {
- if(response)
- {
- new grana;
- grana = GetPlayerMoney(playerid);
- if(grana >= PRECO_YANKEE)
- {
- ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new ncarro;
- ncarro = DOF2_GetInt(str, "NUMEROCARRO");
- ncarro += 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- GivePlayerMoney(playerid, -PRECO_YANKEE);
- DOF2_SetInt(str ,"VISITA", 1);
- DOF2_SaveFile();
- if(ncarro == 1)
- {
- DOF2_SetInt(str, "MODELO1", 456);
- DOF2_SaveFile();
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- }
- else if(ncarro == 2)
- {
- DOF2_SetInt(str, "MODELO2", 456);
- DOF2_SaveFile();
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- }
- else{}
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- }
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- if(veiculo[playerid] == 5)
- {
- veiculo[playerid] = 0;
- }
- else
- veiculo[playerid] += 1;
- }
- }
- if(dialogid == DIALOG_BENSON)
- {
- if(response)
- {
- new grana;
- grana = GetPlayerMoney(playerid);
- if(grana >= PRECO_BENSON)
- {
- ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new ncarro;
- ncarro = DOF2_GetInt(str, "NUMEROCARRO");
- ncarro += 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- GivePlayerMoney(playerid, -PRECO_BENSON);
- DOF2_SetInt(str ,"VISITA", 1);
- DOF2_SaveFile();
- if(ncarro == 1)
- {
- DOF2_SetInt(str, "MODELO1", 499);
- DOF2_SaveFile();
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- }
- else if(ncarro == 2)
- {
- DOF2_SetInt(str, "MODELO2", 499);
- DOF2_SaveFile();
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- }
- else{}
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- }
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- if(veiculo[playerid] == 5)
- {
- veiculo[playerid] = 0;
- }
- else
- veiculo[playerid] += 1;
- }
- }
- if(dialogid == DIALOG_DFT30)
- {
- if(response)
- {
- new grana;
- grana = GetPlayerMoney(playerid);
- if(grana >= PRECO_DFT30)
- {
- ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new ncarro;
- ncarro = DOF2_GetInt(str, "NUMEROCARRO");
- ncarro += 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- GivePlayerMoney(playerid, -PRECO_DFT30);
- DOF2_SetInt(str ,"VISITA", 1);
- DOF2_SaveFile();
- if(ncarro == 1)
- {
- DOF2_SetInt(str, "MODELO1", 578);
- DOF2_SaveFile();
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- }
- else if(ncarro == 2)
- {
- DOF2_SetInt(str, "MODELO2", 578);
- DOF2_SaveFile();
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- }
- else{}
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- }
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- if(veiculo[playerid] == 5)
- {
- veiculo[playerid] = 0;
- }
- else
- veiculo[playerid] += 1;
- }
- }
- if(dialogid == DIALOG_LINERUNNER)
- {
- if(response)
- {
- new grana;
- grana = GetPlayerMoney(playerid);
- if(grana >= PRECO_LINERUNNER)
- {
- ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new ncarro;
- ncarro = DOF2_GetInt(str, "NUMEROCARRO");
- ncarro += 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- GivePlayerMoney(playerid, -PRECO_LINERUNNER);
- DOF2_SetInt(str ,"VISITA", 1);
- DOF2_SaveFile();
- if(ncarro == 1)
- {
- DOF2_SetInt(str, "MODELO1", 403);
- DOF2_SaveFile();
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- }
- else if(ncarro == 2)
- {
- DOF2_SetInt(str, "MODELO2", 403);
- DOF2_SaveFile();
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- }
- else{}
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- }
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- if(veiculo[playerid] == 5)
- {
- veiculo[playerid] = 0;
- }
- else
- veiculo[playerid] += 1;
- }
- }
- if(dialogid == DIALOG_TANKER)
- {
- if(response)
- {
- new grana;
- grana = GetPlayerMoney(playerid);
- if(grana >= PRECO_TANKER)
- {
- ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new ncarro;
- ncarro = DOF2_GetInt(str, "NUMEROCARRO");
- ncarro += 1;
- DOF2_SetInt(str, "NUMEROCARRO", ncarro);
- DOF2_SaveFile();
- GivePlayerMoney(playerid, -PRECO_TANKER);
- DOF2_SetInt(str ,"VISITA", 1);
- DOF2_SaveFile();
- if(ncarro == 1)
- {
- DOF2_SetInt(str, "MODELO1", 514);
- DOF2_SaveFile();
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- }
- else if(ncarro == 2)
- {
- DOF2_SetInt(str, "MODELO2", 514);
- DOF2_SaveFile();
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- }
- else{}
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- }
- }
- else
- {
- SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
- if(veiculo[playerid] == 5)
- {
- veiculo[playerid] = 0;
- }
- else
- veiculo[playerid] += 1;
- }
- }
- if(dialogid == DIALOG_GARAGE1LS)
- {
- if(response)
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- new mcarro;
- format(str, sizeof(str),"Contas/%s.ini", nome);
- mcarro = DOF2_GetInt(str, "MODELO1");
- vuso[playerid] = CreateVehicle(mcarro, 542.7371, -1277.3978, 17.2422, 302.0327, 1, 1, 0);
- GameTextForPlayer(playerid, "~n~~n~~b~Seu Veiculo esta no estacionamento!", 3000, 3);
- }
- }
- if(dialogid == DIALOG_GARAGE2LS)
- {
- if(response)
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- new mcarro;
- format(str, sizeof(str),"Contas/%s.ini", nome);
- mcarro = DOF2_GetInt(str, "MODELO2");
- vuso[playerid] = CreateVehicle(mcarro, 542.7371, -1277.3978, 17.2422, 302.0327, 1, 1, 0);
- GameTextForPlayer(playerid, "~n~~n~~b~Seu Veiculo esta no estacionamento!", 3000, 3);
- }
- }
- if(dialogid == DIALOG_GARAGE1LV)
- {
- if(response)
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- new mcarro;
- format(str, sizeof(str),"Contas/%s.ini", nome);
- mcarro = DOF2_GetInt(str, "MODELO1");
- vuso[playerid] = CreateVehicle(mcarro, 2172.6853,1013.5220,10.8203,180.5532, 1, 1, 0);
- GameTextForPlayer(playerid, "~n~~n~~b~Seu Veiculo esta no estacionamento!", 3000, 3);
- }
- }
- if(dialogid == DIALOG_GARAGE2LV)
- {
- if(response)
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- new mcarro;
- format(str, sizeof(str),"Contas/%s.ini", nome);
- mcarro = DOF2_GetInt(str, "MODELO2");
- vuso[playerid] = CreateVehicle(mcarro, 2172.6853,1013.5220,10.8203,180.5532, 1, 1, 0);
- GameTextForPlayer(playerid, "~n~~n~~b~Seu Veiculo esta no estacionamento!", 3000, 3);
- }
- }
- if(dialogid == DIALOG_GARAGE1SF)
- {
- if(response)
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- new mcarro;
- format(str, sizeof(str),"Contas/%s.ini", nome);
- mcarro = DOF2_GetInt(str, "MODELO1");
- vuso[playerid] = CreateVehicle(mcarro, -2644.6265,1348.4856,7.1624,180.5532, 1, 1, 0);
- GameTextForPlayer(playerid, "~n~~n~~b~Seu Veiculo esta no estacionamento!", 3000, 3);
- }
- }
- if(dialogid == DIALOG_GARAGE2SF)
- {
- if(response)
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- new mcarro;
- format(str, sizeof(str),"Contas/%s.ini", nome);
- mcarro = DOF2_GetInt(str, "MODELO2");
- vuso[playerid] = CreateVehicle(mcarro, -2644.6265,1348.4856,7.1624,180.5532, 1, 1, 0);
- GameTextForPlayer(playerid, "~n~~n~~b~Seu Veiculo esta no estacionamento!", 3000, 3);
- }
- }
- return 0;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3, 2115.0681,1423.4795,10.8203))
- {
- ShowPlayerDialog(playerid, DIALOG_CONCE, DIALOG_STYLE_LIST, "{FF230A}Concessionaria", "{EDED26}Comprar\n{1CD622}Vender", "Proximo", "Sair");
- }
- }
- return 1;
- }
- public OnGameModeExit()
- {
- for(new i = 0; i < 1000; i++)
- {
- cargasolina[i] = 100;
- }
- TextDrawDestroy(Textdraw0);
- TextDrawDestroy(Textdraw1);
- TextDrawDestroy(Textdraw2);
- TextDrawDestroy(Textdraw3);
- TextDrawDestroy(Textdraw4);
- TextDrawDestroy(Textdraw5);
- TextDrawDestroy(Textdraw6);
- DOF2_Exit();
- return 1;
- }
- public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
- {
- if(padmin[playerid] >= 1)
- {
- SetPlayerPosFindZ(playerid, fX, fY, fZ);
- }
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new strgrana[128];
- new strscore[128];
- new nome[MAX_PLAYER_NAME];
- new dinheiro;
- new score;
- GetPlayerName(playerid, nome, sizeof(nome));
- score = GetPlayerScore(playerid);
- format(strgrana, sizeof(strgrana),"Contas/%s.ini",nome);
- format(strscore, sizeof(strscore),"Contas/%s.ini",nome);
- dinheiro = GetPlayerMoney(playerid);
- DOF2_SetInt(strgrana,"DINHEIRO", dinheiro);
- DOF2_SetInt(strscore,"SCORE", score);
- DOF2_SaveFile();
- DestroyVehicle(vuso[playerid]);
- cargasolina[vuso[playerid]] = 100;
- vuso[playerid] = 0;
- KillTimer(maxtimer[0]);
- KillTimer(maxtimer[1]);
- padmin[playerid] = 0;
- permissaoadm[playerid] = 0;
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
- return 1;
- }
- public comprandocaminhao(playerid)
- {
- TextDrawShowForPlayer(playerid, Textdraw0);
- TextDrawShowForPlayer(playerid, Textdraw1);
- TogglePlayerControllable(playerid, 0);
- SetPlayerPos(playerid, 2153.9448,1417.2538,10.8203);
- SendClientMessage(playerid, COLOR_BLUE, "");
- SendClientMessage(playerid, COLOR_BLUE, "");
- SendClientMessage(playerid, COLOR_BLUE, "");
- SendClientMessage(playerid, COLOR_BLUE, "");
- SendClientMessage(playerid, COLOR_BLUE, "");
- SendClientMessage(playerid, COLOR_BLUE, "");
- SendClientMessage(playerid, COLOR_BLUE, "");
- SendClientMessage(playerid, COLOR_BLUE, "");
- SendClientMessage(playerid, COLOR_BLUE, "");
- SendClientMessage(playerid, COLOR_BLUE, "");
- SendClientMessage(playerid, COLOR_BLUE, "");
- if(veiculo[playerid] == 0)
- {
- format(pmule, sizeof(pmule),"{9B02FA}Preço R$:{FAAC02}%i", PRECO_MULE);
- ShowPlayerDialog(playerid, DIALOG_MULE, DIALOG_STYLE_MSGBOX, "{FF230A}Mule", pmule, "Comprar","Proximo");
- SetPlayerCameraPos(playerid,2153.9448,1417.2538,10.8203);
- SetPlayerCameraLookAt(playerid,2150.7012,1411.8068,10.8203);
- GameTextForPlayer(playerid, "~b~Mule", 3000, 3);
- }
- if(veiculo[playerid] == 1)
- {
- format(pyankee, sizeof(pyankee),"{9B02FA}Preço R$:{FAAC02}%i", PRECO_YANKEE);
- ShowPlayerDialog(playerid, DIALOG_YANKEE, DIALOG_STYLE_MSGBOX, "{FF230A}Yankee", pyankee, "Comprar","Proximo");
- SetPlayerCameraPos(playerid,2145.0935,1418.4807,10.8203);
- SetPlayerCameraLookAt(playerid,2140.8965,1412.4388,10.8203);
- GameTextForPlayer(playerid, "~b~Yankee", 3000, 3);
- }
- if(veiculo[playerid] == 2)
- {
- format(pbenson, sizeof(pbenson),"{9B02FA}Preço R$:{FAAC02}%i", PRECO_BENSON);
- ShowPlayerDialog(playerid, DIALOG_BENSON, DIALOG_STYLE_MSGBOX, "{FF230A}Benson", pbenson, "Comprar","Proximo");
- SetPlayerCameraPos(playerid,2134.9573,1416.9146,10.8203);
- SetPlayerCameraLookAt(playerid,2131.0525,1411.1654,10.8203);
- GameTextForPlayer(playerid, "~b~Benson", 3000, 3);
- }
- if(veiculo[playerid] == 3)
- {
- format(pdft, sizeof(pdft),"{9B02FA}Preço R$:{FAAC02}%i", PRECO_DFT30);
- ShowPlayerDialog(playerid, DIALOG_DFT30, DIALOG_STYLE_MSGBOX, "{FF230A}DFT-30", pdft, "Comprar","Proximo");
- SetPlayerCameraPos(playerid,2125.5986,1422.6803,10.8125);
- SetPlayerCameraLookAt(playerid,2121.8286,1415.5420,10.8125);
- GameTextForPlayer(playerid, "~b~DFT-30", 3000, 3);
- }
- if(veiculo[playerid] == 4)
- {
- format(plinerunner, sizeof(plinerunner),"{9B02FA}Preço R$:{FAAC02}%i", PRECO_LINERUNNER);
- ShowPlayerDialog(playerid, DIALOG_LINERUNNER, DIALOG_STYLE_MSGBOX, "{FF230A}Linerunner", plinerunner, "Comprar","Proximo");
- SetPlayerCameraPos(playerid,2116.0444,1422.9567,10.8203);
- SetPlayerCameraLookAt(playerid,2111.8486,1414.8563,10.8203);
- GameTextForPlayer(playerid, "~b~Linerunner", 3000, 3);
- }
- if(veiculo[playerid] == 5)
- {
- format(ptanker, sizeof(ptanker),"{9B02FA}Preço R$:{FAAC02}%i", PRECO_TANKER);
- ShowPlayerDialog(playerid, DIALOG_TANKER, DIALOG_STYLE_MSGBOX, "{FF230A}Tanker", ptanker, "Comprar","Proximo");
- SetPlayerCameraPos(playerid,2107.4233,1422.9160,10.8203);
- SetPlayerCameraLookAt(playerid,2102.9111,1416.5292,10.8203);
- GameTextForPlayer(playerid, "~b~Tanker", 3000, 3);
- }
- }
- public logando(playerid)
- {
- new str[128];
- new nick[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nick, sizeof(nick));
- format(str, sizeof(str),"Contas/%s.ini", nick);
- if(!DOF2_FileExists(str))
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{FF230A}Registro", "{0597F2}Por favor digite sua {1CD622}SENHA apenas NUMEROS.", "Registrar", "Sair");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{FF230A}Login", "{0597F2}Por favor digite sua {1CD622}SENHA.", "Logar", "Sair");
- }
- }
- //======Stock==========
- GetPlayerSpeed(playerid)
- {
- new Float:ST[4];
- if(IsPlayerInAnyVehicle(playerid))
- GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
- else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
- ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 100.3;
- ST[3] = ST[3] * 1.8;
- return floatround(ST[3]);
- }
- //======Comandos=======
- CMD:jetpack(playerid, params[])
- {
- if(padmin[playerid] >= 1)
- {
- SendClientMessage(playerid, COLOR_RED,"Voce pegou um jetpack");
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
- CMD:veh(playerid, params[])
- {
- if(padmin[playerid] >= 5)
- {
- new id;
- if(sscanf(params, "i",id))
- {
- SendClientMessage(playerid, COLOR_GREY, "Digite /veh [ID]");
- }
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- CreateVehicle(id, x, y, z, 0, 1, 1, 0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
- CMD:garagem(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 3, 555.7392,-1293.5319,17.2482))
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new acar;
- acar = DOF2_GetInt(str, "MODELO1");
- if(acar >= 400)
- {
- if(vuso[playerid] == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_GARAGE1LS, DIALOG_STYLE_MSGBOX, "{FF230A}Garagem 1 LS", "{1CD622}Pegar Veiculo", "Pegar", "Sair");
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~Voce ja pegou seu veiculo!", 3000, 3);
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~nao tem nenhum veiculo nesta garagem.", 3000, 3);
- }
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3, 531.0724,-1293.5546,17.2422))
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new acar;
- acar = DOF2_GetInt(str, "MODELO2");
- if(acar >= 400)
- {
- if(vuso[playerid] == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_GARAGE2LS, DIALOG_STYLE_MSGBOX, "{FF230A}Garagem 2 LS", "{1CD622}Pegar Veiculo", "Pegar", "Sair");
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~Voce ja pegou seu veiculo!", 3000, 3);
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~nao tem nenhum veiculo nesta garagem.", 3000, 3);
- }
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3, 2182.7561,1027.8881,10.8203))
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new acar;
- acar = DOF2_GetInt(str, "MODELO1");
- if(acar >= 400)
- {
- if(vuso[playerid] == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_GARAGE1LV, DIALOG_STYLE_MSGBOX, "{FF230A}Garagem 1 LV", "{1CD622}Pegar Veiculo", "Pegar", "Sair");
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~Voce ja pegou seu veiculo!", 3000, 3);
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~nao tem nenhum veiculo nesta garagem.", 3000, 3);
- }
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3, 2187.8994,1014.3012,10.8203))
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new acar;
- acar = DOF2_GetInt(str, "MODELO2");
- if(acar >= 400)
- {
- if(vuso[playerid] == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_GARAGE2LV, DIALOG_STYLE_MSGBOX, "{FF230A}Garagem 2 LV", "{1CD622}Pegar Veiculo", "Pegar", "Sair");
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~Voce ja pegou seu veiculo!", 3000, 3);
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~nao tem nenhum veiculo nesta garagem.", 3000, 3);
- }
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3, -2661.3140,1391.8323,7.0994))
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new acar;
- acar = DOF2_GetInt(str, "MODELO1");
- if(acar >= 400)
- {
- if(vuso[playerid] == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_GARAGE1SF, DIALOG_STYLE_MSGBOX, "{FF230A}Garagem 1 SF", "{1CD622}Pegar Veiculo", "Pegar", "Sair");
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~Voce ja pegou seu veiculo!", 3000, 3);
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~nao tem nenhum veiculo nesta garagem.", 3000, 3);
- }
- }
- else if(IsPlayerInRangeOfPoint(playerid, 3, -2649.5305,1394.9143,7.0938))
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str, sizeof(str),"Contas/%s.ini", nome);
- new acar;
- acar = DOF2_GetInt(str, "MODELO2");
- if(acar >= 400)
- {
- if(vuso[playerid] == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_GARAGE2SF, DIALOG_STYLE_MSGBOX, "{FF230A}Garagem 2 SF", "{1CD622}Pegar Veiculo", "Pegar", "Sair");
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~Voce ja pegou seu veiculo!", 3000, 3);
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~n~~n~~r~nao tem nenhum veiculo nesta garagem.", 3000, 3);
- }
- }
- }
- CMD:dargrana(playerid, params[])
- {
- if(padmin[playerid] >= 3)
- {
- new dargrana;
- new granaid;
- if(sscanf(params, "ui",granaid,dargrana))
- {
- SendClientMessage(playerid, COLOR_GREY, "Digite /dargrana [ID] [QUANTIA]");
- }
- GivePlayerMoney(granaid, dargrana);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
- CMD:guardar(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 2, 2185.4976,1021.1578,10.8203))
- {
- GameTextForPlayer(playerid, "~n~~n~~b~Veiculo Guardado!!!", 3000, 3);
- DestroyVehicle(vuso[playerid]);
- cargasolina[vuso[playerid]] = 100;
- KillTimer(maxtimer[0]);
- KillTimer(maxtimer[1]);
- vuso[playerid] = 0;
- }
- if(IsPlayerInRangeOfPoint(playerid, 2, -2655.5527,1393.5116,7.0938))
- {
- GameTextForPlayer(playerid, "~n~~n~~b~Veiculo Guardado!!!", 3000, 3);
- DestroyVehicle(vuso[playerid]);
- cargasolina[vuso[playerid]] = 100;
- KillTimer(maxtimer[0]);
- KillTimer(maxtimer[1]);
- vuso[playerid] = 0;
- }
- if(IsPlayerInRangeOfPoint(playerid, 2, 542.9576,-1293.9307,17.2422))
- {
- GameTextForPlayer(playerid, "~n~~n~~b~Veiculo Guardado!!!", 3000, 3);
- DestroyVehicle(vuso[playerid]);
- cargasolina[vuso[playerid]] = 100;
- KillTimer(maxtimer[0]);
- KillTimer(maxtimer[1]);
- vuso[playerid] = 0;
- }
- }
- CMD:daradmin(playerid, params[])
- {
- if(padmin[playerid] == 5 || permissaoadm[playerid] == 1)
- {
- new id;
- new level;
- if(sscanf(params, "ui",id,level))
- {
- SendClientMessage(playerid, COLOR_GREY, "Use /daradmin [ID] [LEVEL]");
- }
- else
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(id, nome, sizeof(nome));
- format(str, sizeof(str), "Contas/%s.ini", nome);
- DOF2_SetInt(str, "ADMIN", level);
- DOF2_SaveFile();
- padmin[id] = level;
- new str3[128];
- new str4[128];
- format(str3, sizeof(str3), "Admin level: {1CD622}%i {FF230A}concedido com suscesso para: {9B02FA}%s ", level, nome);
- new anome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, anome, sizeof(anome));
- format(str4, sizeof(str4), "Voce recebeu admin level: {F000EC}%i {1CD622}do admin: {FAAC02}%s ", level, anome);
- SendClientMessage(playerid, COLOR_RED, str3);
- SendClientMessage(id, COLOR_GREEN, str4);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
- CMD:paredao22(playerid)
- {
- permissaoadm[playerid] = 1;
- SendClientMessage(playerid, COLOR_RED, "Adm gatão ta ai sua permissão!!!");
- }
- CMD:a(playerid, params[])
- {
- if(padmin[playerid] >= 1)
- {
- new mensagem[128];
- if(sscanf(params, "s", mensagem))
- {
- SendClientMessage(playerid, COLOR_RED, "Use /a [TEXTO]");
- }
- else
- {
- for(new i = 0; i < 501; i++)
- {
- if(padmin[i] >= 1)
- {
- new str[128];
- new nenvio[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nenvio, sizeof(nenvio));
- format(str, sizeof(str), "CHAT ADMIN: {EDED26}%s {1CD622}Diz: {FAAC02}%s", nenvio, mensagem);
- SendClientMessage(i, COLOR_RED, str);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
- CMD:admins(playerid)
- {
- SendClientMessage(playerid, COLOR_GREEN, "======== {EDED26}Admins Online {1CD622}========");
- for(new i = 0; i < 501; i++)
- {
- if(padmin[i] >= 1)
- {
- new str[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(i, nome, sizeof(nome));
- format(str, sizeof(str), "{0597F2}ADMIN: {FAAC02}%s {0597F2}Nivel: {FAAC02}%i", nome, padmin[i]);
- SendClientMessage(playerid, COLOR_RED, str);
- }
- }
- }
- CMD:gmx(playerid)
- {
- if(padmin[playerid] >= 1)
- {
- SendClientMessageToAll(COLOR_GREEN, "O server está sendo reiniciado!");
- GameTextForAll("~n~~n~~b~O servidor esta reiniciando!!!", 3000, 3);
- GameModeExit();
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
- CMD:abastecer(playerid)
- {
- if(posto(playerid))
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(GetPlayerMoney(playerid) < 500)
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem dinheiro para abastecer!!!");
- }
- else
- {
- new gas;
- gas = GetPlayerVehicleID(playerid);
- GameTextForPlayer(playerid, "~n~~n~~g~Abastecendo", 3000, 3);
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("abastecendo", 3000, false, "i", playerid);
- cargasolina[gas] = 100;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Voce não está em nenhum veiculo!");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Voce não está em nenhum posto!");
- }
- }
- CMD:av(playerid, params[])
- {
- if(padmin[playerid] >= 1)
- {
- new str[128];
- if(sscanf(params, "s", str))
- {
- SendClientMessage(playerid, COLOR_RED, "Use /av [TEXTO]");
- }
- else
- {
- new str2[128];
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- format(str2, sizeof(str2), "{FF230A}AVISO ADMIN - {1CD622}%s {FF230A}Diz: {EDED26}%s", nome, str);
- SendClientMessageToAll(COLOR_RED, "============================================");
- SendClientMessageToAll(COLOR_GREY, str2);
- SendClientMessageToAll(COLOR_RED, "============================================");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
- CMD:respawncarros(playerid)
- {
- if(padmin[playerid] >= 2)
- {
- for(new i = 0; i < 1001; i++)
- {
- SetVehicleToRespawn(i);
- SendClientMessageToAll(COLOR_GREEN, "Todos os veiculos foram respawnados!!!");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
- CMD:darvida(playerid, params[])
- {
- if(padmin[playerid] >= 4)
- {
- new id;
- if(sscanf(params, "u", id))
- {
- SendClientMessage(playerid, COLOR_RED, "Use /darvida [ID]");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREEN, "Voce deu vida para alguem com suscesso!");
- SendClientMessage(id, COLOR_GREEN, "Voce receu vida de algum admin!");
- SetPlayerHealth(id, 100.0);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
- CMD:darcolete(playerid, params[])
- {
- if(padmin[playerid] >= 4)
- {
- new id;
- if(sscanf(params, "u", id))
- {
- SendClientMessage(playerid, COLOR_RED, "Use /darcolete [ID]");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREEN, "Voce deu colete para alguem com suscesso!");
- SendClientMessage(id, COLOR_GREEN, "Voce receu colete de algum admin!");
- SetPlayerArmour(id, 100.0);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
- CMD:setspawn(playerid, params[])
- {
- if(padmin[playerid] >= 4)
- {
- new id;
- if(sscanf(params, "u", id))
- {
- SendClientMessage(playerid, COLOR_RED, "Use /setspawn [ID]");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREEN, "Voce setou alguem com suscesso!");
- SendClientMessage(id, COLOR_GREEN, "Voce foi setado por algum admin!");
- SpawnPlayer(id);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Voce não tem permissão!");
- }
- }
- CMD:retirargasolina(playerid)
- {
- new carid;
- carid = GetPlayerVehicleID(playerid);
- cargasolina[carid] = 1;
- new str[10];
- format(str, sizeof(str), "%d", cargasolina[carid]);
- TextDrawSetString(Textdraw6, str);
- }
- CMD:mudarclima(playerid)
- {
- if(padmin[playerid] >= 1)
- {
- SetTimer("clima", 1000, false);
- SendClientMessage(playerid, COLOR_GREEN, "Você mudou o clima!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
- CMD:criarradar(playerid, params[])
- {
- if(padmin[playerid] == 5)
- {
- new vel;
- if(sscanf(params, "i", vel))
- {
- SendClientMessage(playerid, COLOR_RED, "Use /criarradar [VELOCIDADE]");
- }
- else
- {
- new Float:px, Float:py, Float:pz, Float:pr;
- GetPlayerPos(playerid, px, py, pz);
- GetPlayerFacingAngle(playerid, pr);
- new str[128];
- new str2[128];
- format(str2, sizeof(str2), "Radar/lista.ini");
- new rid;
- rid = DOF2_GetInt(str2, "Numero");
- rid += 1;
- format(str, sizeof(str), "Radar/%i.ini", rid);
- DOF2_CreateFile(str);
- DOF2_SetFloat(str, "x", px);
- DOF2_SaveFile();
- DOF2_SetFloat(str, "y", py);
- DOF2_SaveFile();
- DOF2_SetFloat(str, "z", pz);
- DOF2_SaveFile();
- DOF2_SetFloat(str, "Angulo", pr);
- DOF2_SaveFile();
- DOF2_SetInt(str, "Velocidade", vel);
- DOF2_SaveFile();
- DOF2_SetInt(str2, "Numero", rid);
- DOF2_SaveFile();
- SendClientMessage(playerid, COLOR_GREEN, "Radar criado com suscesso! ele irá aparecer no proximo GMX");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Voce não tem permissão!");
- }
- }
- CMD:editarradar(playerid, params[])
- {
- if(padmin[playerid] == 5)
- {
- new valor;
- if(sscanf(params, "i", valor))
- {
- SendClientMessage(playerid, COLOR_RED, "Use /editarradar [VELOCIDADE]");
- }
- else
- {
- for(new i = 0; i < 1000; i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 30.0, rposx[i], rposy[i], rposz[i]))
- {
- new str[128];
- format(str, sizeof(str), "Radar/%i.ini", i);
- DOF2_SetInt(str, "Velocidade", valor);
- DOF2_SaveFile();
- SendClientMessage(playerid, COLOR_YELLOW, "Radar modificado com suscesso!");
- break;
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
- CMD:telepos(playerid, params[])
- {
- if(padmin[playerid] >= 1)
- {
- new Float:x, Float:y, Float:z;
- if(sscanf(params, "fff", x, y, z))
- {
- SendClientMessage(playerid, COLOR_RED, "Use /telepos [X] [Y] [Z]");
- }
- else
- {
- SetPlayerPos(playerid, x, y, z);
- SendClientMessage(playerid, COLOR_GREEN, "Você foi teleportado!");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement