Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- BATTLEFIELD 3 SAMP 100% POR LUCAS EMMANUEL
- LUCAS-FC - SAMP FORUM.
- SÓ CONSEGUI GRAÇAS A VOCÊS !
- */
- /* includes */
- #include <a_samp>
- #include <zcmd>
- #include DOF2
- /* Defines */
- #define Fuzileiros (1)
- #define Israelita (2)
- #define Farc (3)
- #define BOMBATEMPO 15
- #define ARMARTEMPO 5
- #define Azul_Claro 0x00C2ECFF
- #define Verde_Claro 0x38FF06FF
- #define Cinza_Escuro 0x626262FF
- #define Cinza 0xCECECEFF
- #define Branco 0xFFFFFFFF
- #define M4-AK 1
- #define PUMP 2
- #define JSF 1
- /* New's */
- new Text:Textdraw0;
- new GuerraB[MAX_PLAYERS];
- new guerra;
- new TemGuerra;
- new GzFarC;
- new GzFuz;
- new GzGi;
- new Posto;
- new EstMi;
- new EquiMi;
- new EquiTer;
- new EquiFar;
- new ExercitoC [19];
- new TerroristasC [16];
- new FarcC [16];
- new BombaRelogio[MAX_PLAYERS];
- new MS[MAX_PLAYERS];
- new Segundos[MAX_PLAYERS];
- new Minutos[MAX_PLAYERS];
- new Float:BombX, Float:BombY, Float:BombZ;
- new bombplanttime;
- new bombtime;
- new PlantouBomba[MAX_PLAYERS];
- new Text:BombCount;
- /* forward's */
- forward salario(playerid);
- forward guerrat(playerid);
- forward BombTime(playerid);
- forward BombPlantTime(playerid);
- /* -------- */
- main()
- {
- print(" Gamemode Feito Por Lucas Emmanuel ");
- }
- /* -------- */
- public OnGameModeInit()
- {
- // SetWorldTime(24);
- Posto = CreatePickup(1242,1,-375.8249,2260.4480,43.0619);
- EquiTer = CreatePickup(335,1,-693.1985,959.3026,12.2316);
- EquiMi = CreatePickup(334,1,189.3186,1923.1282,17.6406);
- EstMi = CreatePickup(1239,1,283.5517,1972.5457,17.6406);
- EquiFar = CreatePickup(335,1,-318.2394,2658.2397,63.8692);
- Create3DTextLabel("Posto Avançado\n {09D6E1}Aperte F",Branco,-375.8249,2260.4480,43.0619,40.0,0,0);
- Create3DTextLabel("Aperte {09D6E1}F {FFFFFF}Para Equipar",Branco,-318.2394,2658.2397,63.8692,40.0,0,0);
- Create3DTextLabel("Aperte {09D6E1}F {FFFFFF}Para Equipar",Branco,-693.1985,959.3026,12.2316,40.0,0,0);
- Create3DTextLabel("Estacionamento {09D6E1}Militar",Branco,283.5517,1972.5457,17.6406,40.0,0,0);
- Create3DTextLabel("Para Se Equipar\n {09D6E1}Aperte F",Branco,189.3186,1923.1282,17.6406,40.0,0,0);
- UsePlayerPedAnims();
- DisableInteriorEnterExits();
- SetGameModeText("BATTLEFIELD 3");
- AddPlayerClass(287,156.8867,1903.3468,18.6473,269.5479,0,0,0,0,0,0);
- AddPlayerClass(210,-253.2915,2604.2185,62.8582,329.9537,0,0,0,0,0,0);
- AddPlayerClass(217,-253.2915,2604.2185,62.8582,329.9537,0,0,0,0,0,0);
- ExercitoC[0] = AddStaticVehicleEx(470,284.29998779,1963.09997559,17.79999924,270.08984375,95,10,45);
- ExercitoC[1] = AddStaticVehicleEx(470,284.20001221,1956.19995117,17.79999924,270.08789062,95,10,45);
- ExercitoC[2] = AddStaticVehicleEx(470,284.10000610,1948.90002441,17.79999924,270.08789062,95,10,45);
- ExercitoC[3] = AddStaticVehicleEx(433,281.89999390,1989.90002441,18.20000076,270.45312500,95,10,45);
- ExercitoC[4] = AddStaticVehicleEx(433,281.60000610,1984.59997559,18.20000076,270.45043945,95,10,45);
- ExercitoC[5] = AddStaticVehicleEx(433,281.89999390,1995.59997559,18.20000076,270.45043945,95,10,45);
- ExercitoC[6] = AddStaticVehicleEx(520,281.20001221,2023.80004883,18.60000038,269.58374023,-1,-1,45);
- ExercitoC[7] = AddStaticVehicleEx(425,358.10000610,2065.19995117,18.50000000,89.54687500,95,10,45);
- ExercitoC[8] = AddStaticVehicleEx(425,375.39999390,1899.50000000,18.50000000,89.54406738,95,10,45);
- ExercitoC[9] = AddStaticVehicleEx(425,375.79998779,1951.59997559,18.50000000,89.54406738,95,10,45);
- ExercitoC[10] = AddStaticVehicleEx(520,378.10000610,1997.69995117,18.60000038,89.54687500,-1,-1,45);
- ExercitoC[11] = AddStaticVehicleEx(432,300.00000000,2057.80004883,17.70000076,270.45312500,95,10,45);
- ExercitoC[12] = AddStaticVehicleEx(432,317.39999390,2057.60009766,17.70000076,270.45043945,95,10,45);
- ExercitoC[13] = AddStaticVehicleEx(433,297.70001221,1797.80004883,18.20000076,0.00000000,95,10,45);
- ExercitoC[14] = AddStaticVehicleEx(433,319.79998779,1797.90002441,18.20000076,0.00000000,95,10,45);
- ExercitoC[15] = AddStaticVehicleEx(433,-372.7287,2255.2021,42.8311,95.9297,95,10,45);
- ExercitoC[16] = AddStaticVehicleEx(470,-394.3503,2241.1802,42.4220,285.6273,95,10,45);
- ExercitoC[17] = AddStaticVehicleEx(470,-374.4364,2234.3169,42.4765,104.3475,95,10,45);
- ExercitoC[18] = AddStaticVehicleEx(433,-363.5634,2210.8430,42.8149,103.7164,95,10,45);
- TerroristasC[0] = AddStaticVehicleEx(425,-705.79998779,966.59997559,13.30000019,0.00000000,44,1,45);
- TerroristasC[1] = AddStaticVehicleEx(560,-668.79998779,945.50000000,11.89999962,359.13061523,44,1,45);
- TerroristasC[2] = AddStaticVehicleEx(560,-675.70001221,945.50000000,11.89999962,359.12658691,44,1,45);
- TerroristasC[3] = AddStaticVehicleEx(433,-719.79998779,938.20001221,12.69999981,359.13061523,44,1,45);
- TerroristasC[4] = AddStaticVehicleEx(470,-696.70001221,932.00000000,12.39999962,0.00000000,44,1,45);
- TerroristasC[5] = AddStaticVehicleEx(520,-654.09997559,956.59997559,13.00000000,0.00000000,-1,-1,15);
- TerroristasC[6] = AddStaticVehicleEx(473,-638.40002441,862.90002441,0.00000000,317.40002441,44,1,45);
- TerroristasC[7] = AddStaticVehicleEx(473,-661.59997559,876.29998779,0.00000000,225.24505615,44,1,45);
- TerroristasC[8] = AddStaticVehicleEx(522,-676.59997559,935.09997559,11.80000019,0.00000000,44,1,45);
- TerroristasC[9] = AddStaticVehicleEx(522,-672.20001221,935.09997559,11.80000019,0.00000000,44,1,45);
- TerroristasC[10] = AddStaticVehicleEx(522,-668.00000000,935.20001221,11.80000019,0.00000000,44,1,45);
- TerroristasC[11] = AddStaticVehicleEx(520,-698.20001221,899.50000000,13.39999962,0.00000000,-1,-1,15);
- TerroristasC[12] = AddStaticVehicleEx(433,-718.29998779,981.00000000,12.69999981,359.12658691,44,1,45);
- TerroristasC[13] = AddStaticVehicleEx(560,-675.50000000,918.59997559,11.89999962,0.00000000,44,1,45);
- TerroristasC[14] = AddStaticVehicleEx(560,-681.40002441,918.59997559,11.89999962,0.00000000,44,1,45);
- FarcC[0] = AddStaticVehicleEx(433,-294.70001221,2667.69995117,63.20000076,89.54687500,1,1,45);
- FarcC[1] = AddStaticVehicleEx(433,-272.39999390,2655.89990234,63.20000076,89.54406738,1,1,45);
- FarcC[2] = AddStaticVehicleEx(470,-284.50000000,2667.00000000,62.70000076,0.00000000,1,1,45);
- FarcC[3] = AddStaticVehicleEx(520,-312.29998779,2679.89990234,63.50000000,0.00000000,1,1,45);
- FarcC[4] = AddStaticVehicleEx(470,-295.50000000,2689.00000000,62.79999924,0.00000000,1,1,45);
- FarcC[5] = AddStaticVehicleEx(425,-339.89999390,2677.60009766,64.19999695,0.00000000,1,1,45);
- FarcC[6] = AddStaticVehicleEx(433,-201.39999390,2608.30004883,63.29999924,0.00000000,1,1,45);
- FarcC[7] = AddStaticVehicleEx(433,-213.30000305,2608.60009766,63.29999924,0.00000000,1,1,45);
- FarcC[8] = AddStaticVehicleEx(520,-231.39999390,2606.80004883,63.59999847,0.00000000,1,1,45);
- FarcC[9] = AddStaticVehicleEx(470,-269.20001221,2674.89990234,62.79999924,269.58374023,1,1,45);
- FarcC[10] = AddStaticVehicleEx(433,-327.79998779,2656.10009766,64.30000305,89.54406738,1,1,45);
- FarcC[11] = AddStaticVehicleEx(560,-278.79998779,2609.30004883,62.70000076,0.00000000,1,1,45);
- FarcC[12] = AddStaticVehicleEx(560,-273.00000000,2609.30004883,62.70000076,0.00000000,1,1,45);
- FarcC[13] = AddStaticVehicleEx(560,-267.29998779,2609.19995117,62.70000076,0.00000000,1,1,45);
- FarcC[14] = AddStaticVehicleEx(433,-262.29998779,2648.80004883,63.20000076,0.00000000,1,1,45);
- CreateObject(3279,-280.20001221,2688.10009766,61.70000076,0.00000000,0.00000000,0.00000000); /* Torre HQ Farc */
- BombCount = TextDrawCreate(270.000000, 397.000000, "00:00:00");
- TextDrawBackgroundColor(BombCount, 255);
- TextDrawFont(BombCount, 2);
- TextDrawLetterSize(BombCount, 0.500000, 2.199999);
- TextDrawColor(BombCount, -1);
- TextDrawSetOutline(BombCount, 1);
- TextDrawSetProportional(BombCount, 1);
- Textdraw0 = TextDrawCreate(477.000000, 99.000000, "Battlefield 3 SAMP");
- TextDrawBackgroundColor(Textdraw0, 255);
- TextDrawFont(Textdraw0, 1);
- TextDrawLetterSize(Textdraw0, 0.500000, 1.299999);
- TextDrawColor(Textdraw0, 0x00C2ECFF);
- TextDrawSetOutline(Textdraw0, 1);
- TextDrawSetProportional(Textdraw0, 1);
- GzFarC = GangZoneCreate(-467.115, 2510.743, 35.03363, 2826.046);
- GzFuz = GangZoneCreate(-81.74512, 1658.258, 502.1487, 2183.763);
- GzGi = GangZoneCreate(-899.1964, 770.7397, -455.4371, 1132.754);
- return 1;
- }
- /* -------- */
- public OnGameModeExit()
- {
- DOF2_Exit();
- return 1;
- }
- /* -------- */
- public OnPlayerRequestClass(playerid, classid)
- {
- switch(classid)
- {
- case 0:
- {
- SetPlayerTeam(playerid,Fuzileiros);
- GameTextForPlayer(playerid, "~g~ Fuzileiros", 2500, 3);
- SetPlayerColor(playerid,Verde_Claro);
- SetSpawnInfo(playerid,Fuzileiros,287,156.8867,1903.3468,18.6473,269.5479,0,0,0,0,0,0);
- }
- case 1:
- {
- SetPlayerTeam(playerid,Israelita);
- GameTextForPlayer(playerid, "~b~ Guerrilheiros Israelitas", 2500, 3);
- SetPlayerColor(playerid,Azul_Claro);
- SetSpawnInfo(playerid,Israelita,210,-688.7601,938.9449,13.6328,176.8548,0,0,0,0,0,0);
- }
- case 2:
- {
- SetPlayerTeam(playerid,Farc);
- GameTextForPlayer(playerid, "~w~ As Farc", 2500, 3);
- SetPlayerColor(playerid,Cinza);
- SetSpawnInfo(playerid,Farc,217,-322.4511,2675.4148,63.6797,356.0116,0,0,0,0,0,0);
- }
- }
- SetPlayerPos(playerid,1025.5751,-2140.7637,39.2032);
- SetPlayerCameraPos(playerid,1019.7552,-2141.0266,37.7274);
- SetPlayerCameraLookAt(playerid,1021.9974,-2140.9907,38.3012);
- SetPlayerFacingAngle(playerid, 82.6125);
- return 1;
- }
- /* -------- */
- public OnPlayerConnect(playerid)
- {
- new nome[25], s[100];
- GetPlayerName(playerid, nome, 25);
- format(s, sizeof(s), "O Jogador {09D6E1}%s {FFFFFF}Entrou no Servidor.", nome);
- SendClientMessageToAll(Branco, s);
- RemoveBuildingForPlayer(playerid, 16776, -237.0234, 2662.8359, 62.6094, 0.25); // Galinha Gigante Deletada. [ HQ Farc ]
- SetTimer("salario",3600000,1); // Tempo salário 1hr
- TextDrawShowForPlayer(playerid,Textdraw0);
- Load(playerid);
- new pRpnames[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pRpnames, sizeof(pRpnames));
- new RpNames = strfind(pRpnames, "_", true);
- if(RpNames == -1)
- {
- SendClientMessage(playerid, Branco, "[x] Você Foi Kikado Por não usar o Formato de Nome Adequado: {09D6E1}Nome_Sobrenome");
- Kick(playerid);
- return 1;
- }
- return 1;
- }
- /* -------- */
- public OnPlayerDisconnect(playerid, reason)
- {
- new nome[25], s[100];
- GetPlayerName(playerid, nome, 25);
- format(s, sizeof(s), "O Jogador {09D6E1}%s {FFFFFF}Desconectou do Servidor.", nome);
- SendClientMessageToAll(Branco, s);
- Salvar(playerid);
- return 1;
- }
- /* -------- */
- public OnPlayerSpawn(playerid)
- {
- SendClientMessage(playerid,Cinza_Escuro,"[x] Digite {09D6E1}/CMDS {FFFFFF}Para Abrir a Lista De {09D6E1}Comandos do {FFFFFF}BATTLEFIELD 3.");
- ShowPlayerDialog(playerid,JSF,DIALOG_STYLE_MSGBOX, "Mensagem de Boas Vindas", "{09D6E1}Seja Bem Vindo ao {FFFFFF}Battlefield 3 {09D6E1}SAMP", "Okay", "");
- GangZoneShowForPlayer(playerid, GzFarC, 0x3E3E4496);
- GangZoneShowForPlayer(playerid, GzFuz, 0x00400096);
- GangZoneShowForPlayer(playerid, GzGi, 0x00717196);
- return 1;
- }
- /* -------- */
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(killerid != INVALID_PLAYER_ID)
- {
- SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
- GivePlayerMoney(killerid, 250);
- new NomePlayer[25], s[150];
- GetPlayerName(playerid, NomePlayer, 25);
- format(s, sizeof(s), "[x] Você Ganhou R$: 250 + 1 Score Por Matar {09D6E1}%s !", NomePlayer);
- SendClientMessage(killerid,-1, s);
- }
- return 1;
- }
- /* -------- */
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- /* -------- */
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- /* -------- */
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- if(!success)
- {
- SendClientMessage(playerid,Cinza_Escuro, "[x] O Comando Não {09D6E1}Existe.");
- return 1;
- }
- return 1;
- }
- /* Comandos */
- CMD:cmds(playerid)
- {
- if(GetPlayerTeam(playerid) == 1)
- {
- ShowPlayerDialog(playerid,JSF,DIALOG_STYLE_MSGBOX, "{09D6E1}COMANDOS BATTLEFIELD 3", "{19ED0D} /Colete \n /Capacete \n /Estac \n /Posto \n /Kill \n /Sniper \n /Creditos", "OK", "");
- }
- else if(GetPlayerTeam(playerid) == 2)
- {
- ShowPlayerDialog(playerid,JSF,DIALOG_STYLE_MSGBOX, "{09D6E1}COMANDOS BATTLEFIELD 3", "{19ED0D} /Colete \n /Capacete \n /Kill \n /Sniper \n /Creditos \n /Guerra \n /Atentado", "OK", "");
- }
- else if(GetPlayerTeam(playerid) == 3)
- {
- ShowPlayerDialog(playerid,JSF,DIALOG_STYLE_MSGBOX, "{09D6E1}COMANDOS BATTLEFIELD 3", "{19ED0D} /Colete \n /Capacete \n /Kill \n /Sniper \n /Creditos \n /Guerra \n /Atentado", "OK", "");
- }
- return 1;
- }
- /* -------- */
- CMD:grana(playerid)
- {
- GivePlayerMoney(playerid,99999);
- SendClientMessage(playerid,-1,"Chupa jô");
- return 1;
- }
- /* -------- */
- CMD:colete(playerid)
- {
- if(GetPlayerTeam(playerid) == 1)
- {
- if(GetPlayerMoney(playerid) < 1000)
- return SendClientMessage(playerid,Cinza_Escuro,"[x] Você Não Tem {09D6E1}R$: 1000 {FFFFFF}Consigo.");
- SendClientMessage(playerid,Cinza_Escuro,"[x] Você Comprou um Colete Por {09D6E1}R$: 1000");
- SetPlayerAttachedObject( playerid, 0, 19142, 1, 0.117633, 0.028060, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
- GivePlayerMoney(playerid,-1000);
- new Float:ColeteP;
- GetPlayerArmour(playerid, ColeteP);
- SetPlayerArmour(playerid, ColeteP + 35);
- }
- else if(GetPlayerTeam(playerid) == 2)
- {
- if(GetPlayerMoney(playerid) < 1000)
- return SendClientMessage(playerid,Cinza_Escuro,"[x] Você Não Tem {09D6E1}R$: 1000 {FFFFFF}Consigo.");
- SendClientMessage(playerid,Cinza_Escuro,"[x] Você Comprou um Colete Por {09D6E1}R$: 1000");
- SetPlayerAttachedObject( playerid, 0, 19142, 1, 0.036378, 0.048509, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
- GivePlayerMoney(playerid,-1000);
- new Float:ColeteP;
- GetPlayerArmour(playerid, ColeteP);
- SetPlayerArmour(playerid, ColeteP + 35);
- }
- else if(GetPlayerTeam(playerid) == 3)
- {
- if(GetPlayerMoney(playerid) < 1000)
- return SendClientMessage(playerid,Cinza_Escuro,"[x] Você Não Tem {09D6E1}R$: 1000 {FFFFFF}Consigo.");
- SendClientMessage(playerid,Cinza_Escuro,"[x] Você Comprou um Colete Por {09D6E1}R$: 1000");
- SetPlayerAttachedObject( playerid, 0, 19142, 1, 0.083493, 0.041181, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
- GivePlayerMoney(playerid,-1000);
- new Float:ColeteP;
- GetPlayerArmour(playerid, ColeteP);
- SetPlayerArmour(playerid, ColeteP + 35);
- }
- return 1;
- }
- /* -------- */
- CMD:capacete(playerid)
- {
- if(GetPlayerTeam(playerid) == 1)
- {
- if(GetPlayerMoney(playerid) < 600)
- return SendClientMessage(playerid,Cinza_Escuro,"[x] Você Não Tem {09D6E1}R$: 600 {FFFFFF}Consigo.");
- SendClientMessage(playerid,Cinza_Escuro,"[x] Você Comprou um Capacete Por {09D6E1}R$: 600");
- SetPlayerAttachedObject( playerid, 3, 19104, 2, 0.133160, 0.019420, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
- GivePlayerMoney(playerid,-600);
- new Float:CapaceteP;
- GetPlayerArmour(playerid, CapaceteP);
- SetPlayerArmour(playerid, CapaceteP + 25);
- }
- else if(GetPlayerTeam(playerid) == 2)
- {
- if(GetPlayerMoney(playerid) < 600)
- return SendClientMessage(playerid,Cinza_Escuro,"[x] Você Não Tem {09D6E1}R$: 600 {FFFFFF}Consigo.");
- SendClientMessage(playerid,Cinza_Escuro,"[x] Você Comprou um Capacete Por {09D6E1}R$: 600");
- SetPlayerAttachedObject( playerid, 3, 19102, 2, 0.128419, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
- GivePlayerMoney(playerid,-600);
- new Float:CapaceteP;
- GetPlayerArmour(playerid, CapaceteP);
- SetPlayerArmour(playerid, CapaceteP + 25);
- }
- else if(GetPlayerTeam(playerid) == 3)
- {
- if(GetPlayerMoney(playerid) < 600)
- return SendClientMessage(playerid,Cinza_Escuro,"[x] Você Não Tem {09D6E1}R$: 600 {FFFFFF}Consigo.");
- SendClientMessage(playerid,Cinza_Escuro,"[x] Você Comprou um Capacete Por {09D6E1}R$: 600");
- SetPlayerAttachedObject( playerid, 3, 19103, 2, 0.161174, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
- GivePlayerMoney(playerid,-600);
- new Float:CapaceteP;
- GetPlayerArmour(playerid, CapaceteP);
- SetPlayerArmour(playerid, CapaceteP + 25);
- }
- return 1;
- }
- /* -------- */
- CMD:guerra(playerid,params[])
- {
- if(GetPlayerTeam(playerid) != 2) if(GetPlayerTeam(playerid) != 3)
- return SendClientMessage(playerid,Cinza_Escuro,"[x] Comando Indisponível Para sua {09D6E1}Organização");
- if(TemGuerra == 1)
- return SendClientMessage(playerid,Cinza_Escuro, "[x] Uma Guerra Já Foi {09D6E1}Iniciada.");
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid, X,Y,Z);
- guerra = GangZoneCreate(X-100,Y-100,X+100,Y+100);
- GangZoneShowForAll(guerra,-1);
- SetTimer("guerrat",120000,0); // Tempo Guerra 2 min
- GuerraB[playerid] = 1;
- PlayAudioStreamForPlayer(playerid,"https://dl.dropbox.com/u/107605026/Musicas/NA.mp3");
- new pname[25], s[150];
- GetPlayerName(playerid, pname, 25);
- format(s, sizeof(s), "{19ED0D}[GUERRA] {FFFFFF}O {09D6E1}Terrorista {FFFFFF}%s Acaba De Iniciar uma {09D6E1}Guerra.", pname);
- SendClientMessageToAll(Branco, s);
- TemGuerra = 1;
- return 1;
- }
- /* -------- */
- CMD:atentado(playerid)
- {
- if(GetPlayerTeam(playerid) != 2) if(GetPlayerTeam(playerid) != 3)
- return SendClientMessage(playerid,Cinza_Escuro,"[x] Comando Indisponível Para sua {09D6E1}Organização");
- if(PlantouBomba[playerid] == 1)
- return SendClientMessage(playerid,Cinza_Escuro, "[x] Uma Bomba Já Foi {09D6E1}Plantada. ");
- new pname[25], s[150];
- GetPlayerName(playerid, pname, 25);
- format(s, sizeof(s), "{19ED0D}[ATENTADO] {FFFFFF}O {09D6E1}Terrorista {FFFFFF}%s Acaba De Plantar uma {09D6E1}Bomba.", pname);
- SendClientMessageToAll(Branco, s);
- bombplanttime = SetTimerEx("BombPlantTime", ARMARTEMPO*1000, 0, "d", playerid);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 1, 0, 0, 0, 0);
- PlantouBomba[playerid] = 1;
- return 1;
- }
- /* -------- */
- CMD:kill(playerid)
- {
- new pname[25], s[150];
- GetPlayerName(playerid, pname, 25);
- format(s, sizeof(s), "{19ED0D}[ATENÇÃO] {FFFFFF}O {09D6E1}Jogador {FFFFFF}%s Acaba De Se {09D6E1}Matar.", pname);
- SendClientMessageToAll(Branco, s);
- SetPlayerHealth(playerid,0);
- return 1;
- }
- /* -------- */
- CMD:posto(playerid)
- {
- if(GetPlayerTeam(playerid) != 1)
- return SendClientMessage(playerid,Cinza_Escuro,"[x] Comando Indisponível Para sua {09D6E1}Organização");
- SendClientMessage(playerid,Cinza_Escuro,"[x] O Satélite Marcou o Posto Avançado no seu {09D6E1}GPS");
- SetPlayerCheckpoint(playerid,-375.8249,2260.4480, -0.2432, 3.0);
- return 1;
- }
- /* -------- */
- CMD:sniper(playerid)
- {
- if(GetPlayerMoney(playerid) < 1500)
- return SendClientMessage(playerid,Cinza_Escuro,"[x] Você Não Tem {09D6E1}R$: 1500 {FFFFFF}Consigo.");
- SendClientMessage(playerid,Cinza_Escuro,"[x] Você Comprou uma Sniper Por {09D6E1}R$: 1500");
- GivePlayerWeapon(playerid,34,250);
- GivePlayerMoney(playerid,-1500);
- return 1;
- }
- /* -------- */
- CMD:creditos(playerid)
- {
- ShowPlayerDialog(playerid,JSF,DIALOG_STYLE_MSGBOX, "{0ECFE0}Lista de Créditos", "{0EE015}GameMode : {FFFFFF}Lucas Emmanuel \n{E0890E}Mapper : {FFFFFF}Lucas Emmanuel", "Okay", "");
- return 1;
- }
- /* -------- */
- CMD:estac(playerid)
- {
- if(GetPlayerTeam(playerid) != 1)
- return SendClientMessage(playerid,Cinza_Escuro, "[x] Comando Indisponível Para sua {09D6E1}Organização");
- SetPlayerPos(playerid,283.5517,1972.5457,17.6406);
- return 1;
- }
- /* -------- */
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- /* -------- */
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- /* -------- */
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER)
- {
- new vehicleid;
- vehicleid = GetPlayerVehicleID(playerid);
- if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && GetPlayerScore(playerid) < 250)
- {
- if(GetVehicleModel(vehicleid) == 425 || GetVehicleModel(vehicleid) == 432 || GetVehicleModel(vehicleid) == 520)
- {
- SendClientMessage(playerid,Cinza_Escuro, "[x] Você Precisa ter no Mínimo {09D6E1}250 Scores {FFFFFF}Para Pilotar Essa Beleza. ");
- RemovePlayerFromVehicle(playerid);
- }
- }
- }
- /* -------- */
- new VehID = GetPlayerVehicleID(playerid);
- if(newstate == PLAYER_STATE_DRIVER)
- {
- for(new vP = 0; vP < sizeof(ExercitoC); vP++)
- {
- if(VehID == ExercitoC[vP] && GetPlayerTeam(playerid) != 1)
- {
- SendClientMessage(playerid,Cinza_Escuro, "[x] Este Carro Não Pertence a Sua {09D6E1}Organização.");
- RemovePlayerFromVehicle(playerid);
- }
- }
- for(new vP = 0; vP < sizeof(TerroristasC); vP++)
- {
- if(VehID == TerroristasC[vP] && GetPlayerTeam(playerid) != 2)
- {
- SendClientMessage(playerid,Cinza_Escuro, "[x] Este Carro Não Pertence a Sua {09D6E1}Organização.");
- RemovePlayerFromVehicle(playerid);
- }
- }
- for(new vP = 0; vP < sizeof(FarcC); vP++)
- {
- if(VehID == FarcC[vP] && GetPlayerTeam(playerid) != 3)
- {
- SendClientMessage(playerid,Cinza_Escuro, "[x] Este Carro Não Pertence a Sua {09D6E1}Organização.");
- RemovePlayerFromVehicle(playerid);
- }
- }
- }
- return 1;
- }
- /* -------- */
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- /* -------- */
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- /* -------- */
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- 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) {
- if(pickupid == EstMi){
- }
- if(pickupid == EquiMi){
- }
- if(pickupid == EquiTer){
- }
- if(pickupid == Posto){
- DisablePlayerCheckpoint(playerid);
- }
- if(pickupid == EquiFar){
- }
- 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)
- {
- if(newkeys== 16)
- {
- if(IsPlayerInRangeOfPoint(playerid,1.0,189.3186,1923.1282,17.6406))
- {
- if(GetPlayerTeam(playerid) != 1) return SendClientMessage(playerid,Cinza_Escuro, "[x] Você Não Tem {09D6E1}Autorização.");
- {
- SendClientMessage(playerid,Cinza_Escuro,"[x] Você Recebeu Armamentos do Governo Para a {09D6E1}Guerra.");
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid,24,250);
- GivePlayerWeapon(playerid,25,250);
- GivePlayerWeapon(playerid,31,250);
- GivePlayerWeapon(playerid,3,1);
- }
- }
- }
- if(newkeys== 16)
- {
- if(IsPlayerInRangeOfPoint(playerid,1.0,-693.1985,959.3026,12.2316))
- {
- if(GetPlayerTeam(playerid) != 2) return SendClientMessage(playerid,Cinza_Escuro, "[x] Você Não Tem {09D6E1}Autorização.");
- {
- SendClientMessage(playerid,Cinza_Escuro,"[x] Você Recebeu Armamentos da Sua {09D6E1}Organização.");
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid,24,250);
- GivePlayerWeapon(playerid,25,250);
- GivePlayerWeapon(playerid,30,250);
- GivePlayerWeapon(playerid,4,1);
- }
- }
- }
- if(newkeys== 16)
- {
- if(IsPlayerInRangeOfPoint(playerid,1.0,-375.8249,2260.4480,43.0619))
- {
- if(GetPlayerTeam(playerid) != 1) return SendClientMessage(playerid,Cinza_Escuro, "[x] Você Não Tem {09D6E1}Autorização.");
- {
- SendClientMessage(playerid,Cinza_Escuro,"[x] Você Recebeu Remédios e Munição No {09D6E1}Posto Avançado");
- new pname[25], s[150];
- GetPlayerName(playerid, pname, 25);
- format(s, sizeof(s), "{09D6E1}[Atenção] {FFFFFF}O Fuzileiro {09D6E1}%s {FFFFFF}Chegou No {09D6E1}Posto Avançado", pname);
- SendClientMessageToAll(Branco, s);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid,24,750);
- GivePlayerWeapon(playerid,25,750);
- GivePlayerWeapon(playerid,31,750);
- GivePlayerWeapon(playerid,29,750);
- GivePlayerWeapon(playerid,3,1);
- SetPlayerArmour(playerid,75);
- }
- }
- }
- if(newkeys== 16)
- {
- if(IsPlayerInRangeOfPoint(playerid,1.0,-318.2394,2658.2397,63.8692))
- {
- if(GetPlayerTeam(playerid) != 3) return SendClientMessage(playerid,Cinza_Escuro, "[x] Você Não Tem {09D6E1}Autorização.");
- {
- SendClientMessage(playerid,Cinza_Escuro,"[x] Você Recebeu Armamentos da Sua {09D6E1}Organização.");
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid,24,250);
- GivePlayerWeapon(playerid,25,250);
- GivePlayerWeapon(playerid,30,250);
- GivePlayerWeapon(playerid,4,1);
- }
- }
- }
- return 1;
- }
- /* -------- */
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- /* Armas nas Costas do Player */
- public OnPlayerUpdate(playerid)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- new Armas[MAX_PLAYERS],Balas[MAX_PLAYERS];
- GetPlayerWeaponData(playerid, 5, Armas[playerid], Balas[playerid]);
- if(Armas[playerid] == 30 && Balas[playerid] >= 1)
- {
- if(GetPlayerWeapon(playerid) == 30) RemovePlayerAttachedObject(playerid,M4-AK);
- else SetPlayerAttachedObject(playerid, M4-AK, 355, 1, -0.060921, -0.141673, 0.000000, 0.000000, 35.362735, 0.000000);
- }
- else if(Armas[playerid] == 31 && Balas[playerid] >= 1)
- {
- if(GetPlayerWeapon(playerid) == 31) RemovePlayerAttachedObject(playerid,M4-AK);
- else SetPlayerAttachedObject(playerid, M4-AK, 356, 1, -0.099681, -0.133408, 0.000000, 1.027592, 19.667785, 0.000000);
- }
- else
- {
- RemovePlayerAttachedObject(playerid,M4-AK);
- }
- GetPlayerWeaponData(playerid, 3, Armas[playerid], Balas[playerid]);
- if(Armas[playerid] == 25 && Balas[playerid] >= 1)
- {
- if(GetPlayerWeapon(playerid) == 25) RemovePlayerAttachedObject(playerid,PUMP);
- else SetPlayerAttachedObject(playerid, PUMP, 349, 1, -0.109260, -0.059651, -0.066210, 186.310729, 42.375362, 6.716565);
- }
- else if(Armas[playerid] == 27 && Balas[playerid] >= 1)
- {
- if(GetPlayerWeapon(playerid) == 27) RemovePlayerAttachedObject(playerid,PUMP);
- else SetPlayerAttachedObject(playerid, PUMP, 351, 1, -0.181073, -0.056285, -0.081242, 181.269729, 39.399085, 12.246994);
- }
- else
- {
- RemovePlayerAttachedObject(playerid,PUMP);
- }
- }
- /* Anime Armas */
- static ArmaNaMao[MAX_PLAYERS];
- new ArmaID = GetPlayerWeapon(playerid);
- if(ArmaID > 0 && ArmaNaMao[playerid] != ArmaID)
- {
- CallLocalFunction("OnPlayerReloading", "lol", 5.0, 0, 0, 0, 0, 500);
- }
- ArmaNaMao[playerid] = ArmaID;
- 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 salario(playerid)
- {
- SendClientMessage(playerid,-1,"{19ED0D}[Parabéns] {FFFFFF}Você acaba de Ganhar 10 Scores e R$:1000 {09D6E1}Por Mais uma Hora Jogada.");
- SetPlayerScore(playerid, GetPlayerScore(playerid)+10);
- GivePlayerMoney(playerid, 1000);
- return 1;
- }
- /* -------- */
- public guerrat(playerid)
- {
- GangZoneDestroy(guerra);
- GangZoneHideForAll(guerra);
- SendClientMessageToAll(Branco, "{19ED0D}[GUERRA] {FFFFFF}A Guerra Foi {09D6E1}Finalizada {FFFFFF}Pelo Governo {09D6E1}Federal");
- GuerraB[playerid] = 0;
- TemGuerra = 0;
- return 1;
- }
- /* -------- */
- public BombPlantTime(playerid)
- {
- GetPlayerPos(playerid, BombX, BombY, BombZ);
- BombaRelogio[playerid] = CreateObject(1252, BombX, BombY, BombZ-0.80, 270, 0, 0);
- TogglePlayerControllable(playerid, 1);
- ClearAnimations(playerid);
- bombtime = SetTimerEx("BombTime", 9, 1, "d", playerid);
- MS[playerid] = 99;
- Segundos[playerid] = BOMBATEMPO;
- TextDrawShowForAll(Text:BombCount);
- KillTimer(bombplanttime);
- return 1;
- }
- /* -------- */
- public BombTime(playerid)
- {
- MS[playerid]--;
- if(MS[playerid] == 0)
- {
- MS[playerid] = 99;
- Segundos[playerid]--;
- }
- if(Segundos[playerid] > 60)
- {
- new Segundos2 = Segundos[playerid] - 60;
- Segundos[playerid] = Segundos2;
- Minutos[playerid]++;
- }
- if(Segundos[playerid] == 0 && Minutos[playerid] > 0)
- {
- Segundos[playerid] = 59;
- Minutos[playerid]--;
- }
- if(Segundos[playerid] == 0 && MS[playerid] == 1)
- {
- PlantouBomba[playerid] = 0;
- TextDrawHideForAll(Text:BombCount);
- DestroyObject(BombaRelogio[playerid]);
- CreateExplosion(BombX, BombY + random(8), BombZ + random(5), 6, 10.0);
- CreateExplosion(BombX + random(8), BombY, BombZ + random(5), 6, 10.0);
- CreateExplosion(BombX, BombY, BombZ, 6, 10.0);
- CreateExplosion(BombX, BombY - random(8), BombZ + random(5), 6, 10.0);
- CreateExplosion(BombX - random(8), BombY, BombZ + random(5), 6, 10.0);
- KillTimer(bombtime);
- }
- if(Segundos[playerid] < 10)
- {
- new count[10];
- format(count, sizeof(count), "00:0%i:%i", Segundos[playerid], MS[playerid]);
- TextDrawSetString(BombCount, count);
- }
- if(Segundos[playerid] >= 10)
- {
- new count[10];
- format(count, sizeof(count), "00:%i:%i", Segundos[playerid], MS[playerid]);
- TextDrawSetString(BombCount, count);
- }
- if(Minutos[playerid] < 10 && Segundos[playerid] < 10)
- {
- new count[10];
- format(count, sizeof(count), "0%i:0%i:%i",Minutos[playerid], Segundos[playerid], MS[playerid]);
- TextDrawSetString(BombCount, count);
- }
- if(Minutos[playerid] < 10 && Segundos[playerid] > 9)
- {
- new count[10];
- format(count, sizeof(count), "0%i:%i:%i",Minutos[playerid], Segundos[playerid], MS[playerid]);
- TextDrawSetString(BombCount, count);
- }
- if(Minutos[playerid] >= 10 && Segundos[playerid] > 9)
- {
- new count[10];
- format(count, sizeof(count), "%i:%i:%i",Minutos[playerid], Segundos[playerid], MS[playerid]);
- TextDrawSetString(BombCount, count);
- }
- if(Minutos[playerid] >= 10 && Segundos[playerid] < 10)
- {
- new count[10];
- format(count, sizeof(count), "%i:0%i:%i",Minutos[playerid], Segundos[playerid], MS[playerid]);
- TextDrawSetString(BombCount, count);
- }
- return 1;
- }
- /* Salvar Score do Player */
- stock Salvar(playerid)
- {
- new arquivo_conta[50], nome_player[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome_player, sizeof(nome_player));
- format(arquivo_conta, sizeof(arquivo_conta),"Scores/%s.ini", nome_player);
- if(!DOF2_FileExists(arquivo_conta))
- {
- DOF2_CreateFile(arquivo_conta);
- Salvar(playerid);
- return 1;
- }
- DOF2_SetInt(arquivo_conta,"Score", GetPlayerScore(playerid));
- DOF2_SaveFile();
- return 1;
- }
- /* -------- */
- stock Load(playerid)
- {
- new arquivo_conta[50], nome_player[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome_player, sizeof(nome_player));
- format(arquivo_conta, sizeof(arquivo_conta),"Scores/%s.ini", nome_player);
- SetPlayerScore(playerid, DOF2_GetInt(arquivo_conta,"Score"));
- return 1;
- }
- /* Fim :) */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement