-
Posts
112 -
Joined
-
Last visited
-
Days Won
4
Content Type
Profiles
Forums
News
Documentation
Everything posted by Tentacion
-
Gamemode ce revolutioneaza scripterii sampisti.
Tentacion replied to Tentacion's topic in Gamemode-uri
Faza e ca m-am apucat de Jade si acum fac gm-uri la caterinca. -
Gamemode ce revolutioneaza scripterii sampisti.
Tentacion replied to Tentacion's topic in Gamemode-uri
Hai ca daca e te anunt eu cand prinzi 10 fps -
Gamemode ce revolutioneaza scripterii sampisti.
Tentacion replied to Tentacion's topic in Gamemode-uri
Ba in caz de nu v-ati prins de titlu, e sa va fac sa turbati pe aici, dar ms -
Gamemode ce revolutioneaza scripterii sampisti.
Tentacion replied to Tentacion's topic in Gamemode-uri
=)))))))))))))))))) -
Gamemode ce revolutioneaza scripterii sampisti.
Tentacion replied to Tentacion's topic in Gamemode-uri
Da, pentru ca nu puteti sa va dati admin din baza de date.. -
Gamemode ce revolutioneaza scripterii sampisti.
Tentacion replied to Tentacion's topic in Gamemode-uri
Titlul era clickbait, dar ms -
====================================================v0.1==================================================== Facuta comanda /gotods; Facuta comanda /gotospawn; Motificat Spawn-ul masinilor din DS; Modificat Spawn; Quest Special; S-a scos Minerul si s-a adaugat Pilotul; Adaugare Update Major Fish; Adaugare Wood Cutter; Adaugare ForkLift; Adaugare Survival Arena; (O sa revin cu un Update) Adaugat /bonus (500.000$ / Level 3 / 100 PP si toate licentele pe 10 ore); Adaugare Sistem Outfit; ( La PD, mai multe detalii o sa vedeti in joc ) Adaugare BackPack; Economia schimbata major; Textdraw jos schimbat; GPS schimbat; Dealership schimbat; Sistem de VIP; Sistem de Youtuber; ====================================================v0.2==================================================== Schimbate preturile in Shop; Adaugate iteme noi in Shop; Adaugate detalii despre donatii in /shop; Adaugare sistem Neon; Adaugare sistem pet; Apartamentele sunt scoase; Casele si Bizz-urile sunt scoase la licitatii; Adaugata comanda /gotojob; Adaugata comanda /serverstats; Adaugata comanda /systems; Adaugata comanda /realizari; Adaugata comanda /editjob; Adaugata comanda /vpark; Adaugata comanda /lp; Refacuta comanda /ah; Refacute anumite comenzi din /ah; ====================================================v0.3==================================================== Adaugate Warn-urile la Helper / Admin si Lider; Editate anumite factiuni; Schimbat panel-ul cu unul mult mai securizat; Securitate Anti-hack; Adaugata comanda /editvehicle; Adaugata comanda /movebiz; Adaugat sistemul de a edita masinile din DS (pret, viteza, stock); Adaugata comanda /createbiz; Adaugata comanda /parrot; Adaugata comanda /outfit si pentru NG si FBI; Adaugate masini si bike-uri la spawn; Adaugata comanda /gotoquest; Adaugata comanda /crash; Adaugat Premium Money; Refacut Textul din dreapta jos; ====================================================v0.4==================================================== Rezolvat bug-ul la Shop (o zi); Editat culorile la FPS / TICK / PING; Editat Speedometer; Editate culorile la Wanted si DealerShip; Editate culorile la /spec; Editate culorile la /find; Editate culorile la numele de sub radar; Editate culorile la Undercover; Editate culorile la HUD - Level; Editate culorile la HUD - Job; Editate culorile la Text DS; Modificata pozitia actorului de pe server; Acum in /serverstats apare si versiunea serverului; Adaugata o iconita la spawn; Modificata locatia NPC-ului (si scris); ====================================================v0.5==================================================== Pretul unui skin acum este de 100.000$; Adaugate accesoriile pe server; Sterse comenzile /hat; /glasses; /putglasses; /removeglasses; /removehat; /puthat; Adaugate preturi mai mari la itemele din /accs; ( Fiecare dupa importanta lor ) Adaugata comanda /aaa2; Reparat textdraw tutorial (pas 6); Adaugata comanda /gotoc; Adaugata comanda /servermenu; Refacut textdraw-ul de resetare quests; Acum quest-urile sunt resetate automat, la ora 00:00 ====================================================v0.6==================================================== ====================================================FINAL==================================================== Acum /bonus este pe Dialog; Acum nu mai poti da /work din masina; Rescrisa comanda /stats; Reparat un bug la Bonus; Nu se mai respawneaza masinile aiurea; Acum poti da direct toate licentele in /agl; Acum nu mai poti sa-ti dai singur Ban/Kick/Mute/SMS; Acum poti da /re chiar daca nu ai PREMIUM ACCOUNT; Acum nu mai apare cand suni/esti sunat la cei de langa tine; Acum in /pcolor nu mai apare numele culorii, ci direct CULOARE *colorat in culoarea respectiva*; Rescrisa comanda /drink; Rescrisa comanda /tog; Adaugata comanda /sondaj; /remsondaj; /vote; Acum nu mai poti da arrest unui Owner (a6+); Acum distanta dintre un Politist si un player cu wanted pentru a da /arrest, a fost marita; S-a trecut de la AdmCmd, la AdmBot; Rescrisa comanda /set; DW: https://drive.google.com/open?id=16W15idPAdMyLDFnw_fSvoAZLNkum8hLh
-
Mersi frumos.
-
:))))))))
-
Foarte
-
Nu stiu unde este problema, de asta ti-am si spus ca este Sistemul tau, il ai postat H1Z1/PUBG V3 sau ceva de genul. - Concluzie : Doresc ca atunci cand cineva moare, sa i se seteze vw 0 automat, pentru ca i se seteaza tot acelasi VW ca cei care inca sunt in meci.
-
#include <a_samp> #include <crashdetect> #include <zcmd> #include <foreach> #include <streamer> #include <posloot> #include <afkdetect> #define DIALOG_INV 2220 #define DIALOG_HELM 2221 #define DIALOG_ARM 2222 #define DIALOG_KIT 2223 #define DIALOG_REPLKEV 2224 #define DIALOG_REPLHEL 2225 #define DIALOG_WEAPON 2226 #define DIALOG_REPLWEP 2227 #define DIALOG_INF 22228 #define PRESSED(%0) \ (newkeys & (%0) && !(oldkeys & (%0))) #define RELEASED(%0) \ (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0))) #define HOLDING(%0) \ ((newkeys & (%0)) == (%0)) new Text:DeadZoneTD,Text:TdSafe[MAX_PLAYERS],SafeZonePlayer[MAX_PLAYERS],InBG[MAX_PLAYERS],FirsAid[MAX_PLAYERS],Armour[MAX_PLAYERS], Text:BloodTD,InDeadZone[MAX_PLAYERS],MatchLobbyTimer =-1,Text3D:arenatxt,PlayerKills[MAX_PLAYERS],Helmet[MAX_PLAYERS],ContainerOpened, StepGaz=0,SafeZone,LastSafeZ,Range,ranges=2,Text:AliveTD,MatchTimer,AllowClose,LootDrop,ParaAttach,NeonAttach,Float:GasX,Float:GasY, Float:minimumx, Float:maximumx, Float:minimumy, Float:maximumy,Float:Lminimumx,Float:Lmaximumx,Float:Lminimumy,Float:Lmaximumy, Text:PowerTD,pLastTick[MAX_PLAYERS],PlayerText:pPowerTD[MAX_PLAYERS],Loot[sizeof(LootSpawnPos)],OBJ[sizeof(LootSpawnPos)], MatchVeh[MAX_VEHICLES],counthcars,vehspawned,randomcar,SpaceInv[MAX_PLAYERS],Broke[MAX_PLAYERS][2],survivalhelicopter; new RandomWeaponSpawn[] = { 4,8,16,17,18,22,23,24,25,26,27,28,29,30, 31,32,33,22,23,24,27,28,30,31,32,33,11736, 11736,19141,18978,19142,19515,19141,18978 }; new RandomCarSpawn[]= { 596,422,468,471,568,500,424, 470,422,468,471,568,500,424,470 }; forward SpawnLootDrop(); public SpawnLootDrop() { new Float:prevDistance = 999999.9,PosPl=INVALID_VEHICLE_ID, Float:PlayerPosX,Float:PlayerPosY,Float:PlayerPosZ; foreach(Player,i) { new Float:distance = GetPlayerDistanceFromPoint(i,GasX,GasY,PlayerPosZ); if(distance<prevDistance) prevDistance = distance,PosPl=i; } if(PosPl!=INVALID_VEHICLE_ID) { GetPlayerPos(PosPl,PlayerPosX ,PlayerPosY,PlayerPosZ); if(IsValidDynamicObject(LootDrop)) DestroyDynamicObject(LootDrop),LootDrop =INVALID_OBJECT_ID; if(IsValidDynamicObject(NeonAttach)) DestroyDynamicObject(NeonAttach); if(IsValidDynamicObject(ParaAttach)) DestroyDynamicObject(ParaAttach); ContainerOpened=0; LootDrop =(2935,PlayerPosX ,PlayerPosY,PlayerPosZ+200,0,0,0,9999); ParaAttach= (3666, PlayerPosX , PlayerPosY, PlayerPosZ+200+1.94020, 0,0,0,9999); NeonAttach= (18849, PlayerPosX , PlayerPosY, PlayerPosZ+200+7.92503, 0,0,0,9999); MoveDynamicObject(LootDrop,PlayerPosX ,PlayerPosY,PlayerPosZ,6); MoveDynamicObject(NeonAttach,PlayerPosX ,PlayerPosY,PlayerPosZ+7.92503,6); MoveDynamicObject(ParaAttach,PlayerPosX ,PlayerPosY,PlayerPosZ+1.94020,6); } } public OnObjectMoved(objectid) { if(objectid==LootDrop) { if(IsValidObject(NeonAttach)) DestroyObject(NeonAttach); } return 1; } new Float:RandomSpawnLobby[][3]= { {257.181,1860.503,119.599},{243.296,1859.930,119.599},{243.638,1877.472,119.599},{242.824,1884.262,119.599}, {246.053,1891.619,119.599},{253.373,1888.566,119.599},{253.668,1880.119,119.599},{254.032,1874.471,119.599}, {259.293,1870.591,119.599},{261.541,1863.094,119.599},{257.696,1853.693,119.599},{250.069,1848.966,119.599}, {242.326,1841.062,119.599},{234.920,1841.732,119.599},{231.564,1836.570,119.599},{224.874,1835.792,119.599}, {218.564,1833.623,119.599},{202.549,1837.797,119.599},{191.192,1846.539,119.599},{192.841,1855.671,119.599}, {194.639,1869.734,119.599},{188.210,1882.682,119.599},{195.800,1896.385,119.599},{201.536,1898.803,119.599}, {207.336,1903.920,119.599},{214.135,1902.080,119.599},{219.080,1904.843,119.599},{225.681,1901.635,119.599}, {231.099,1905.419,119.599},{236.682,1903.709,119.599},{243.982,1904.326,119.599},{252.497,1900.444,119.599}, {256.723,1906.052,119.599},{252.716,1915.440,119.599},{255.482,1925.942,119.599},{250.659,1934.180,119.599}, {253.615,1941.489,119.599},{255.844,1824.805,119.599},{249.514,1817.549,119.599},{251.840,1811.197,119.599}, {247.700,1806.756,119.599},{250.228,1798.802,119.599},{247.022,1796.381,119.599},{249.980,1790.783,119.599}, {246.452,1784.865,119.599},{260.849,1782.603,119.599},{257.562,1806.575,119.599},{243.184,1824.940,119.599}, {228.504,1959.680,110.910},{220.508,1956.492,110.910},{212.698,1970.203,110.910},{209.487,1985.344,110.910}, {215.548,1995.240,110.910},{225.763,1993.760,110.910},{232.316,1998.953,110.910},{234.780,2001.322,110.910}, {245.972,1987.149,110.910},{252.476,1979.254,110.910},{248.365,1964.974,110.910},{233.981,1962.450,110.910}, {207.903,1968.078,110.910},{217.503,1985.073,110.910},{227.880,1988.679,110.910},{248.349,1994.920,110.910}, {252.030,1986.290,110.910},{241.609,1943.021,119.599},{230.394,1943.802,119.599},{246.504,1916.398,119.599} }; /* CMD:gotoloot(playerid,params[]) { // new Float:X,Float:Y,Float:Z; // GetDynamicObjectPos(strval(params),X,Y,Z); // SetPlayerPos(playerid, X,Y,Z); SetPlayerPos(playerid, LootSpawnPos[strval(params)][0],LootSpawnPos[strval(params)][1],LootSpawnPos[strval(params)][2]); return 1; } */ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new str[300]; switch(dialogid) { case DIALOG_INV: { if(!response) return 1; switch(listitem) { case 0://weapons { new firstwe[50],secondwe[50],thirdwe[40]; if(GetPlayerGun(playerid,1,1)==0) format(firstwe, sizeof firstwe, "{FF0000}No weapon"); else format(firstwe, sizeof firstwe, "{ffffff}%s\t%d bullets",WeaponName(GetPlayerGun(playerid,1,1)),GetPlayerGun(playerid,1,2)); if(GetPlayerGun(playerid,2,1)==0) format(secondwe,sizeof secondwe,"{FF0000}No weapon"); else format(secondwe,sizeof secondwe,"{ffffff}%s\t%d bullets",WeaponName(GetPlayerGun(playerid,2,1)),GetPlayerGun(playerid,2,2)); if(GetPlayerGun(playerid,3,1)==0) format(thirdwe, sizeof thirdwe, "{FF0000}No weapon"); else format(thirdwe, sizeof thirdwe, "{ffffff}%s\t%d bullets",WeaponName(GetPlayerGun(playerid,3,1)),GetPlayerGun(playerid,3,2)); format(str,sizeof str, "Weapon\tAmmo\n\ %s\n%s\n%s\n%s\n%s",firstwe,secondwe,thirdwe); ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_TABLIST_HEADERS, "Weapons options", str, "Drop", "Cancel"); } case 1://helmet { if(Helmet[playerid]==0) { SendClientMessage(playerid,0xFF0000C8,"You don't have a Helmet!"); cmd_inventory(playerid,""); return 1; } ShowPlayerDialog(playerid, DIALOG_HELM, DIALOG_STYLE_MSGBOX, "Helmet options", "Do you want to drop your Helmet?", "Drop", "Cancel"); } case 2://kevlr { if(Armour[playerid]==0) { SendClientMessage(playerid,0xFF0000C8,"You don't have an Kevlar!"); cmd_inventory(playerid,""); return 1; } ShowPlayerDialog(playerid, DIALOG_ARM, DIALOG_STYLE_MSGBOX, "Kevlar options", "Do you want to drop your Kevlar?", "Drop", "Cancel"); } case 3: { if(FirsAid[playerid]==0) { SendClientMessage(playerid,0xFF0000C8,"You don't have a First Aid kit!"); cmd_inventory(playerid,""); return 1; } ShowPlayerDialog(playerid, DIALOG_KIT, DIALOG_STYLE_LIST, "First Aid options", "Drop\nUse", "Select", "Cancel"); } } } case DIALOG_INF: { if(!response) return 1; format(str,300, "\t\t {FFFFFF}Welcome to Survival Arena\n\ \t\t{FFFFFF}Everyone is an enemy kill or be killed\n\n\ {FFFFFF}Avoid big cities like LS SF and LV, the number of drop is minimum\n\ \t\t\t{FFFFFF}Press {FF0000}F {FFFFFF}to pickup drop\n\ \t\t\t {FFFFFF}Press {FF0000}H {FFFFFF}to heal up"); ShowPlayerDialog(playerid, DIALOG_INF, DIALOG_STYLE_MSGBOX, "Information", str, "Agree", ""); } case DIALOG_REPLWEP: { if(!response) return 1; new gun = GetWeaponIDObject(OBJ[GetClosedLoot(playerid)]); if(GetPlayerGunNum(playerid,gun)==0) return 1; } case DIALOG_WEAPON: { if(!response) return cmd_inventory(playerid,""); new Float:X,Float:Y,Float:Z,loot = FindObj(),ammo,Float:randax,Float:randay; GetPlayerPos(playerid,X,Y,Z); SetTimerEx("ShowWeapons",100,false,"u",playerid); switch(listitem) { case 0: { if(GetPlayerGun(playerid,listitem+1,1)==0) return cmd_inventory(playerid,""); randax = float(random(2000)/1000),randay = float(random(2000)/1000); OBJ[loot] = GetWeaponObjectID(GetPlayerGun(playerid,listitem+1,1)); Loot[loot] = CreateDynamicObject (OBJ[loot], X+randax,Y+randay,Z,0,0,0,9999, -1,-1,100,100); if(GetPlayerGun(playerid,listitem+1,1)<=18) ammo=4; else if(GetPlayerGun(playerid,listitem+1,1)<=15) ammo=1; else ammo=30; format(str,sizeof(str),"You drop your {339999}%s",WeaponName(GetPlayerGun(playerid,listitem+1,1))); SendClientMessage(playerid,-1,str); SpaceInv[playerid]-=ammo; GivePlayerWeapon(playerid,GetPlayerGun(playerid,listitem+1,1),-ammo); SetPlayerPos(playerid,X,Y+0.01,Z); return 1; } case 1: { if(GetPlayerGun(playerid,2,1)==0) return cmd_inventory(playerid,""); randax = float(random(2000)/1000),randay = float(random(2000)/1000); OBJ[loot] = GetWeaponObjectID(GetPlayerGun(playerid,listitem+1,1)); Loot[loot] = CreateDynamicObject (OBJ[loot], X+randax,Y+randay,Z, 0,0,0,9999, -1,-1,100,100); if(GetPlayerGun(playerid,listitem+1,1)<=18) ammo=4; else if(GetPlayerGun(playerid,listitem+1,1)<=15) ammo=10; else ammo=30; format(str,sizeof(str),"You drop your {339999}%s",WeaponName(GetPlayerGun(playerid,listitem+1,1))); SendClientMessage(playerid,-1,str); SpaceInv[playerid]-=ammo; GivePlayerWeapon(playerid,GetPlayerGun(playerid,listitem+1,1),-ammo); SetPlayerPos(playerid,X,Y+0.01,Z); return 1; } case 2: { if(GetPlayerGun(playerid,3,1)==0) return cmd_inventory(playerid,""); randax = float(random(2000)/1000),randay = float(random(2000)/1000); OBJ[loot] = GetWeaponObjectID(GetPlayerGun(playerid,listitem+1,1)); Loot[loot] = CreateDynamicObject (OBJ[loot], X+randax,Y+randay,Z, 0,0,0,9999, -1,-1,100,100); if(GetPlayerGun(playerid,listitem+1,1)<=18) ammo=4; else if(GetPlayerGun(playerid,listitem+1,1)<=15) ammo=10; else ammo=30; format(str,sizeof(str),"You drop your {339999}%s",WeaponName(GetPlayerGun(playerid,listitem+1,1))); SendClientMessage(playerid,-1,str); SpaceInv[playerid]-=ammo; GivePlayerWeapon(playerid,GetPlayerGun(playerid,listitem+1,1),-ammo); SetPlayerPos(playerid,X,Y+0.01,Z); return 1; } } } case DIALOG_KIT: { if(!response) return cmd_inventory(playerid,""); switch(listitem) { case 0: { new Float:X,Float:Y,Float:Z,loot = FindObj(),roty; GetPlayerPos(playerid,X,Y,Z); OBJ[loot] = 11736,roty=0; Loot[loot] = CreateDynamicObject (OBJ[loot], X+0.1,Y+0.1,Z, 0,roty,0,9999, -1,-1,100,100); SendClientMessage(playerid,-1,"You drop your First Aid Kit"); FirsAid[playerid]--; SpaceInv[playerid]-=10; } case 1: cmd_heal(playerid,""); } } case DIALOG_ARM: { if(!response) return cmd_inventory(playerid,""); new Float:X,Float:Y,Float:Z,loot = FindObj(),roty; GetPlayerPos(playerid,X,Y,Z); if(Armour[playerid]==1) OBJ[loot] = 19515,roty=-90; if(Armour[playerid]==2) OBJ[loot] = 19142,roty=-90; Armour[playerid]=0; RemovePlayerAttachedObject(playerid,0); Loot[loot] = CreateDynamicObject (OBJ[loot], X+0.1,Y+0.1,Z, 0,roty,0,9999, -1,-1,100,100); SendClientMessage(playerid,-1,"You drop your Kevlar"); } case DIALOG_HELM: { if(!response) return cmd_inventory(playerid,""); new Float:X,Float:Y,Float:Z,loot = FindObj(),roty; GetPlayerPos(playerid,X,Y,Z); if(Helmet[playerid]==1) OBJ[loot] = 18978,roty=0; if(Helmet[playerid]==2) OBJ[loot] = 19141,roty=-90; Helmet[playerid]=0; RemovePlayerAttachedObject(playerid,1); Loot[loot] = CreateDynamicObject (OBJ[loot], X+0.1,Y+0.1,Z, 0,roty,0,9999, -1,-1,100,100); SendClientMessage(playerid,-1,"You drop your Helmet"); } case DIALOG_REPLHEL: { if(!response) return 1; if(GetClosedLoot(playerid)==-1) return 1; if(GetWeaponIDObject(OBJ[GetClosedLoot(playerid)])<100) return 1; if(OBJ[GetClosedLoot(playerid)]!=18978 && OBJ[GetClosedLoot(playerid)]!=19141) return 1; RemovePlayerAttachedObject(playerid,1); new Float:X,Float:Y,Float:Z,loot = GetClosedLoot(playerid),roty; format(str,sizeof str,"You picked up {339999}%s{FFFFFF}.",LootName(OBJ[GetClosedLoot(playerid)])); SendClientMessage(playerid,-1,str); if(Helmet[playerid] == 1) { SetPlayerAttachedObject(playerid,1,19141,2,0.114999, -0.000000, 0.001999, 0.000000, 0.000000, 0.000000,1.0, 1.307, 1.202); //helmet level 2 Helmet[playerid] = 2; OBJ[loot] = 18978,roty=0; Broke[playerid][1]=1; } else if(Helmet[playerid] == 2) { SetPlayerAttachedObject(playerid,1,18978,2,0.069999, 0.024000, 0.004000, -0.399999, 85.500000, 88.699981,1.08, 1.146, 1.052); //helmet level 1 Helmet[playerid] = 1; OBJ[loot] = 19141,roty=-90; } ApplyAnimation(playerid, "MISC", "Case_pickup", 4.1, 0, 0, 0, 0, 0); DestroyDynamicObject(Loot[GetClosedLoot(playerid)]); GetPlayerPos(playerid,X,Y,Z); Loot[loot] = CreateDynamicObject (OBJ[loot], X+0.1,Y+0.1,Z, 0,roty,0,9999, -1,-1,100,100); } case DIALOG_REPLKEV: { if(!response) return 1; if(GetClosedLoot(playerid)==-1) return 1; if(GetWeaponIDObject(OBJ[GetClosedLoot(playerid)])<100) return 1; if(OBJ[GetClosedLoot(playerid)]!=19515 && OBJ[GetClosedLoot(playerid)]!=19142) return 1; RemovePlayerAttachedObject(playerid,1); new Float:X,Float:Y,Float:Z,loot = GetClosedLoot(playerid),roty; format(str,sizeof str,"You picked up {339999}%s{FFFFFF}.",LootName(OBJ[GetClosedLoot(playerid)])); SendClientMessage(playerid,-1,str); if(Armour[playerid] == 1) { SetPlayerAttachedObject(playerid,0, 19142,1,0.066999, 0.050000, 0.008000, 1.999999,-3.499997,-1.399996, 1.092000, 1.336999, 1.095000);//armour level 2 Armour[playerid] = 2; OBJ[loot] = 19515,roty=-90; Broke[playerid][0]=1; } else if(Armour[playerid] == 2) { SetPlayerAttachedObject(playerid,0,19515,1,0.093998, 0.056998, 0.000000, 0.300000,-1.500000,-3.000003, 1.091000, 1.296998, 1.00000); //armour level 1 Armour[playerid] = 1; OBJ[loot] = 19142,roty=-90; } ApplyAnimation(playerid, "MISC", "Case_pickup", 4.1, 0, 0, 0, 0, 0); DestroyDynamicObject(Loot[GetClosedLoot(playerid)]); GetPlayerPos(playerid,X,Y,Z); Loot[loot] = CreateDynamicObject (OBJ[loot], X+0.1,Y+0.1,Z,0,roty,0,9999, -1,-1,100,100); } } return 0; } CMD:inventory(playerid,params[]) { new strs[100],string[100],hlmtext[50],kevtext[50],medtext[50],guntext[50]; if(Helmet[playerid]==2) format(hlmtext,50,"{40BFA6}Level 2"); else if(Helmet[playerid]==1) format(hlmtext,50,"{40BFA6}Level 1"); else format(hlmtext,50,"{FF0000}No"); if(Armour[playerid]==2) format(kevtext,50,"{40BFA6}Level 2"); else if(Armour[playerid]==1) format(kevtext,50,"{40BFA6}Level 1"); else format(kevtext,50,"{FF0000}No"); if(GetPlayerGuns(playerid)==0) format(guntext,50,"{FF0000}No"); else format(guntext,50,"{40BFA6}%d weapons",GetPlayerGuns(playerid)); if(FirsAid[playerid]==0) format(medtext,50,"{FF0000}No"); else format(medtext,50,"{40BFA6}%d Kits",FirsAid[playerid]); format(string,sizeof(string), "Weapon\t%s\n\ Helmet\t\t%s\n\ Kevlar\t\t%s\n\ First Aid\t%s",guntext,hlmtext,kevtext,medtext); format(strs,sizeof(strs),"{FFFFFF}%d/300 inv space",SpaceInv[playerid]); ShowPlayerDialog(playerid, DIALOG_INV, DIALOG_STYLE_LIST, strs, string, "select", "cancel"); return 1; } new Wallesasd; public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { new str[200]; if (newkeys == KEY_FIRE)// { if(!IsPlayerAdmin(playerid)) return 1; if(Wallesasd==0) return 1; new Float:X,Float:Z,Float:Y; GetPlayerPos(playerid,X,Y,Z); format(str,sizeof str,"{%.3f,%.3f,%.3f},",X,Y,Z); SendClientMessage(playerid,-1,str); logswrite("LootCoord",str); Wallesasd=1; CreatePickup(1239, 1,X,Y,Z, -1); } if(InBG[playerid]!=0&&GetPlayerVirtualWorld(playerid)==9999) { if (HOLDING(KEY_CTRL_BACK))// cmd_heal(playerid,""); if (RELEASED(KEY_CTRL_BACK)) { pLastTick[playerid] = -1; PlayerTextDrawHide(playerid, pPowerTD[playerid]); TextDrawHideForPlayer(playerid, PowerTD); } if (newkeys == KEY_YES) cmd_inventory(playerid,""); if (newkeys == KEY_SECONDARY_ATTACK) { if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT) return 1; { if(GetClosedLoot(playerid)!=-1) { if(GetWeaponIDObject(OBJ[GetClosedLoot(playerid)])<100) { new gun = GetWeaponIDObject(OBJ[GetClosedLoot(playerid)]); if(GetPlayerGunNum(playerid,gun)!=0) { format(str,sizeof(str),"{FFFFFF}Drop your %s first to pickup %s!",WeaponName(GetPlayerGunNum(playerid,gun)),WeaponName(gun)); SendClientMessage(playerid,-1,str); return 1; // format(str,sizeof(str),"{FFFFFF}Are you sure you want to replace your %s with %s!",WeaponName(GetPlayerGunNum(playerid,gun)),WeaponName(gun)); // return ShowPlayerDialog(playerid, DIALOG_REPLWEP, DIALOG_STYLE_MSGBOX, "Weapon Replace",str, "Replace", "Cancel"); } if(GetPlayerGuns(playerid)>=3 && GetPlayerSameGun(playerid,gun)==0) return SendClientMessage(playerid,0xFF0000C8,"You need to drop some weapon, you don't have space for that"); PickupLoot(playerid); } else { if(OBJ[GetClosedLoot(playerid)]==11736) { if(SpaceInv[playerid]+ 10 >=300) return SendClientMessage(playerid,0xFF0000C8,"You need to drop something, you don't have space for that"); if(FirsAid[playerid]>3) return SendClientMessage(playerid,0xFF0000C8,"You already have 4 med kits"); FirsAid[playerid]++; SpaceInv[playerid]+=10; } format(str,sizeof str,"You picked up {339999}%s{FFFFFF}.",LootName(OBJ[GetClosedLoot(playerid)])); if(OBJ[GetClosedLoot(playerid)]==19142) { if(Armour[playerid]==2) return SendClientMessage(playerid,0xFF0000C8,"You already have a Kevlar!"); if(Armour[playerid]==1) return ShowPlayerDialog(playerid, DIALOG_REPLKEV, DIALOG_STYLE_MSGBOX, "Kevlar Replace","Are you sure you want to replace your Kevlar Level 1 with Kevlar level 2?", "Replace", "Cancel"); SetPlayerAttachedObject(playerid,0, 19142,1,0.066999, 0.050000, 0.008000, 1.999999,-3.499997,-1.399996, 1.092000, 1.336999, 1.095000);//armour level 2 Armour[playerid] = 2; } else if(OBJ[GetClosedLoot(playerid)]==19515) { if(Armour[playerid]==1) return SendClientMessage(playerid,0xFF0000C8,"You already have a Kevlar!"); if(Armour[playerid]==2) return ShowPlayerDialog(playerid, DIALOG_REPLKEV, DIALOG_STYLE_MSGBOX, "Kevlar Replace","Are you sure you want to replace your Kevlar Level 2 with Kevlar level 1?", "Replace", "Cancel"); SetPlayerAttachedObject(playerid,0,19515,1,0.093998, 0.056998, 0.000000, 0.300000,-1.500000,-3.000003, 1.091000, 1.296998, 1.00000); //armour level 1 Armour[playerid] = 1; Broke[playerid][0]=1; } else if(OBJ[GetClosedLoot(playerid)]==18978) { if(Helmet[playerid]==1) return SendClientMessage(playerid,0xFF0000C8,"You already have a Helmet!"); if(Helmet[playerid]==2) return ShowPlayerDialog(playerid, DIALOG_REPLHEL, DIALOG_STYLE_MSGBOX, "Helmet Replace","Are you sure you want to replace your Helemt Level 2 with Helmet level 1?", "Replace", "Cancel"); SetPlayerAttachedObject(playerid,1,18978,2,0.069999, 0.024000, 0.004000, -0.399999, 85.500000, 88.699981,1.08, 1.146, 1.052); //helmet level 1 Helmet[playerid] = 1; } else if(OBJ[GetClosedLoot(playerid)]==19141) { if(Helmet[playerid]==2) return SendClientMessage(playerid,0xFF0000C8,"You already have a Helmet!"); if(Helmet[playerid]==1) return ShowPlayerDialog(playerid, DIALOG_REPLHEL, DIALOG_STYLE_MSGBOX, "Helmet Replace","Are you sure you want to replace your Helemt Level 1 with Helmet level 2?", "Replace", "Cancel"); SetPlayerAttachedObject(playerid,1,19141,2,0.114999, -0.000000, 0.001999, 0.000000, 0.000000, 0.000000,1.0, 1.307, 1.202); //helmet level 2 Helmet[playerid] = 2; Broke[playerid][1]=1; } DestroyDynamicObject(Loot[GetClosedLoot(playerid)]); SendClientMessage(playerid,-1,str); ApplyAnimation(playerid, "MISC", "Case_pickup", 4.1, 0, 0, 0, 0, 0); } } } } } return 1; } GetClosedLoot(playerid) { new Float:X,Float:Z,Float:Y; for(new spawn=0;spawn<sizeof(LootSpawnPos);spawn++) { if(IsValidDynamicObject(Loot[spawn])) { GetDynamicObjectPos(Loot[spawn],X,Y,Z); if(IsPlayerInRangeOfPoint(playerid,1,X,Y,Z)) return spawn; } } return -1; } stock logswrite(file[] , text[]) { new File:pp=fopen(file,io_append); fwrite(pp,text); fwrite(pp,"\r\n"); fclose(pp); return 1; } forward PowerBar(i); public PowerBar(i) { new strings[200]; if(GetPlayerSpeed(i)>0) pLastTick = -1; if(pLastTick!=-1) { new tick = GetTickCount(),dif; if(IsPlayerNearContainer(i)==1) SetTimerEx("PowerBar", 70, false,"d",i); else SetTimerEx("PowerBar", 30, false,"d",i); if(pLastTick == -1) { PlayerTextDrawHide(i, pPowerTD); TextDrawHideForPlayer(i, PowerTD); pLastTick = 0; } else if(pLastTick) { dif = tick - pLastTick; if(dif > 980) { if(IsPlayerNearContainer(i)==2) GameTextForPlayer(i, "~n~~n~~n~~n~~y~Container already opened", 5000,5); else if(IsPlayerNearContainer(i)==1) { new loot,Float:randax,Float:randay,Float:PlayerPosX,Float:PlayerPosY,Float:PlayerPosZ; GetPlayerPos(i,PlayerPosX,PlayerPosY,PlayerPosZ); GameTextForPlayer(i, "~n~~n~~n~~n~~g~Container opened", 5000,5),ContainerOpened=1; SendClientMessage(i,-1,"You open the container!"); loot = FindObj(); randax = float(random(2000)/1000),randay = float(random(2000)/1000); OBJ[loot] = GetWeaponObjectID(34); Loot[loot] = (OBJ[loot], PlayerPosX +randax,PlayerPosY+randay,PlayerPosZ, 0,0,0,9999, -1,-1,100,100); loot = FindObj(); randax = float(random(2000)/1000),randay = float(random(2000)/1000); OBJ[loot] = 19142;//armour Loot[loot] = (OBJ[loot], PlayerPosX +randax,PlayerPosY+randay,PlayerPosZ, 0,-90,0,9999, -1,-1,100,100); loot = FindObj(); randax = float(random(2000)/1000),randay = float(random(2000)/1000); OBJ[loot] = 19141;//helmet Loot[loot] = (OBJ[loot], PlayerPosX +randax,PlayerPosY+randay,PlayerPosZ, 0,-90,0,9999, -1,-1,100,100); format(strings,sizeof(strings),"You found a sniper rifle, first aid kit and kevlar!."); SendClientMessage(i,-1,strings); SetPlayerPos(i,PlayerPosX,PlayerPosY+0.01,PlayerPosZ); } else { SetPlayerHealth(i,100); FirsAid--; SpaceInv-=10; SendClientMessage(i,0xFFFF80C8,"You Heal your self!"); } pLastTick = -1, PlayerTextDrawTextSize(i, pPowerTD, 507.0 + ((84.0 * 1000)/1000.0), 0.0); PlayerTextDrawHide(i, pPowerTD); TextDrawHideForPlayer(i, PowerTD); } else PlayerTextDrawTextSize(i, pPowerTD, 507.0 + ((84.0 * dif)/1000.0), 0.0); PlayerTextDrawShow(i, pPowerTD); TextDrawShowForPlayer(i, PowerTD); if(IsPlayerNearContainer(i)==1) GameTextForPlayer(i, "~n~~n~~n~~n~Unlock container...", 300,5); } } else PlayerTextDrawHide(i, pPowerTD), TextDrawHideForPlayer(i, PowerTD); return 1; } GetCity(Float:X,Float:Y) { new str3; if (X > -3000 && X < -444 && Y > -2984 && Y < 1592) str3=1;//sf else if ((X > -440 && X < 3000 && Y > 456 && Y < 3000) || (X > -2964 && X < -424 && Y > 1580 && Y < 3000)) str3=2;//lv else if (X > -440 && X < 3000 && Y > -2836 && Y < 456) str3=3;//ls else str3=0;//no return str3; } public OnFilterScriptInit() { AntiDeAMX();//add this UsePlayerPedAnims(); survivalhelicopter = AddStaticVehicleEx(417, 216.1589, 1875.3392, 119.9458, 143.4601, -1, -1, 100); SetVehicleVirtualWorld(survivalhelicopter,9998); PowerTD = TextDrawCreate(511.000000, 396.000000, "~n~~n~"); TextDrawBackgroundColor(PowerTD, 255); TextDrawFont(PowerTD, 1); TextDrawLetterSize(PowerTD, 0.590000, 0.039999); TextDrawColor(PowerTD, -1); TextDrawSetOutline(PowerTD, 0); TextDrawSetProportional(PowerTD, 1); TextDrawSetShadow(PowerTD, 1); TextDrawUseBox(PowerTD, 1); TextDrawBoxColor(PowerTD, 255); TextDrawTextSize(PowerTD, 592.000000, -10.000000); printf("%d test",sizeof(LootSpawnPos)); SetTimer("timersec", 1000, true); CreatePickup(1254,1, 1043.2, 1011.6, 11.0, -1); new str[200]; if(StepGaz==0) format(str,sizeof(str),"H1Z1 Arena\nType /enter to play"); else if(StepGaz==1) format(str,sizeof(str),"H1Z1 Arena\n%d players{66CCFF} In Lobby",GetPlayersBG()); else format(str,sizeof(str),"H1Z1 Arena\n%d players{FF0000} Alive",GetPlayersBG()); arenatxt = Create3DTextLabel(str, 0xFFFFFFFF, 1043.2, 1011.6, 11.0, 40.0, 0, 0); AliveTD = TextDrawCreate(134.500000, 318.937500, " "); TextDrawLetterSize(AliveTD, 0.252500, 1.512501); TextDrawAlignment(AliveTD, 3); TextDrawColor(AliveTD, -1); TextDrawSetShadow(AliveTD, 0); TextDrawSetOutline(AliveTD, 1); TextDrawBackgroundColor(AliveTD, 51); TextDrawFont(AliveTD, 2); TextDrawSetProportional(AliveTD, 1); BloodTD = TextDrawCreate(200.0, 120.0, "_"); TextDrawFont(BloodTD, TEXT_DRAW_FONT_MODEL_PREVIEW); TextDrawBackgroundColor(BloodTD, 0); TextDrawTextSize(BloodTD, 40.0, 40.0); TextDrawSetPreviewModel(BloodTD, 19836); TextDrawSetPreviewRot(BloodTD, 90.000000, 0.000000, 0.000000, 0.600000);// DeadZoneTD = TextDrawCreate(642.500000, -2.000000, "usebox"); TextDrawLetterSize(DeadZoneTD, 0.000000, 49.822219); TextDrawTextSize(DeadZoneTD, -4.500000, 0.000000); TextDrawUseBox(DeadZoneTD, true); TextDrawBoxColor(DeadZoneTD, 16776977); TextDrawBackgroundColor(DeadZoneTD, -205); //=======survival arena CreateDynamicObject(19382, 214.07190, 1877.30115, 119.50290, 0.00000, 0.00000, -36.84000,9998); CreateDynamicObject(19374, 212.18459, 1872.11108, 119.11550, 0.00000, 0.00000, -143.15984,9998); CreateDynamicObject(19374, 214.79779, 1870.66785, 119.11550, 0.00000, 0.00000, -101.93982,9998); CreateDynamicObject(19374, 218.40749, 1880.82849, 119.11550, 0.00000, 0.00000, -98.33994,9998); CreateDynamicObject(19374, 220.30885, 1879.71606, 119.11550, 0.00000, 0.00000, -136.49995,9998); CreateDynamicObject(19382, 218.87860, 1874.43298, 119.9998, 0.00000, 0.00000, -31.14000,9998); CreateDynamicObject(18690, 261.18500, 1941.53027, 119.08390, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1391, 209.57669, 1976.53284, 138.64912, 10.00000, 0.00000, 81.66000,9998); CreateDynamicObject(1388, 210.40639, 1976.98120, 136.69395, 0.00000, 0.00000, -51.30000,9998); CreateDynamicObject(1391, 263.23962, 1964.28772, 138.84048, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1388, 263.28970, 1964.27234, 150.38147, 10.00000, 0.00000, 94.50000,9998); CreateDynamicObject(1327, 261.40060, 1941.85889, 118.55308, 0.00000, 90.00000, 0.00000,9998); CreateDynamicObject(1327, 261.40060, 1941.85889, 119.22397, 0.00000, 90.00000, 0.00000,9998); CreateDynamicObject(1327, 261.91290, 1940.70752, 119.05270, 0.00000, 40.00000, 99.24001,9998); CreateDynamicObject(935, 263.08786, 1900.40881, 119.08394, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(935, 237.93919, 1820.46326, 119.05000, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(18690, 263.09610, 1900.30701, 118.37210, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(18690, 237.88330, 1820.37793, 118.54370, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(18690, 261.18500, 1941.53027, 119.08390, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(19530, 228.29597, 1884.02173, 118.59991, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(9241, 216.44624, 1876.65857, 118.08702, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(6959, 216.99933, 1876.11804, 118.63267, 0.00000, 0.00000, 0.48000,9998); CreateDynamicObject(19913, 161.22260, 1821.68323, 118.72900, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(10831, 220.40179, 1924.71765, 122.88100, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1683, 181.90590, 1759.92517, 124.50380, 0.00000, 0.00000, 143.22003,9998); CreateDynamicObject(10831, 189.68535, 1924.70020, 122.88100, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1683, 211.31024, 1801.73120, 124.50380, 0.00000, 0.00000, 180.00000,9998); CreateDynamicObject(19530, 213.58904, 1760.16589, 118.59991, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(982, 190.95132, 1891.37097, 119.14588, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(982, 190.93979, 1865.73596, 119.14588, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(3043, 281.18723, 1862.23975, 120.05970, 0.00000, 0.00000, -90.00000,9998); CreateDynamicObject(8335, 173.59550, 1831.69531, 122.03590, 0.00000, 0.00000, 0.06000,9998); CreateDynamicObject(19913, 211.16026, 1821.66370, 118.72903, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(8313, 279.06677, 1877.69702, 122.83733, 0.00000, 0.00000, -72.66003,9998); CreateDynamicObject(8313, 292.17264, 1865.73853, 122.83733, 0.00000, 0.00000, 16.25997,9998); CreateDynamicObject(8313, 278.81363, 1852.58423, 122.83733, 0.00000, 0.00000, 106.92001,9998); CreateDynamicObject(874, 213.40698, 1849.65747, 117.54793, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(874, 210.19289, 1841.09290, 117.54793, 0.00000, 0.00000, 60.12000,9998); CreateDynamicObject(874, 234.56920, 1849.95837, 117.54793, 0.00000, 0.00000, 60.12000,9998); CreateDynamicObject(874, 202.95514, 1904.98157, 117.54793, 0.00000, 0.00000, 60.12000,9998); CreateDynamicObject(874, 211.73685, 1903.59375, 117.54793, 0.00000, 0.00000, 60.12000,9998); CreateDynamicObject(874, 233.89223, 1902.11792, 117.54793, 0.00000, 0.00000, 60.12000,9998); CreateDynamicObject(874, 229.75569, 1901.47168, 117.54793, 0.00000, 0.00000, 143.09998,9998); CreateDynamicObject(874, 229.75569, 1901.47168, 117.54793, 0.00000, 0.00000, 76.49999,9998); CreateDynamicObject(874, 189.68153, 1879.69336, 117.54793, 0.00000, 0.00000, 116.63998,9998); CreateDynamicObject(874, 240.79716, 1854.96826, 117.54793, 0.00000, 0.00000, 116.63998,9998); CreateDynamicObject(800, 186.79121, 1833.85645, 119.89653, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(803, 194.76309, 1904.90356, 119.89650, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(803, 194.63034, 1901.00720, 119.89650, 0.00000, 0.00000, 48.72000,9998); CreateDynamicObject(803, 260.61166, 1868.31360, 118.27464, 0.00000, 0.00000, 48.72000,9998); CreateDynamicObject(803, 258.45621, 1864.23474, 118.27464, 0.00000, 0.00000, 92.16000,9998); CreateDynamicObject(874, 223.68555, 1840.76025, 117.54793, 0.00000, 0.00000, 60.12000,9998); CreateDynamicObject(874, 220.94403, 1850.78748, 117.54793, 0.00000, 0.00000, 60.12000,9998); CreateDynamicObject(874, 189.78450, 1892.97986, 117.54793, 0.00000, 0.00000, 139.98000,9998); CreateDynamicObject(874, 216.30405, 1837.03101, 117.54793, 0.00000, 0.00000, 60.12000,9998); CreateDynamicObject(874, 204.82512, 1847.89124, 117.54793, 0.00000, 0.00000, 60.12000,9998); CreateDynamicObject(874, 228.22491, 1848.03210, 117.54793, 0.00000, 0.00000, 108.17999,9998); CreateDynamicObject(874, 234.71141, 1841.97571, 117.54793, 0.00000, 0.00000, 51.12000,9998); CreateDynamicObject(874, 190.36592, 1886.48547, 117.54793, 0.00000, 0.00000, 139.98000,9998); CreateDynamicObject(874, 190.84476, 1882.38965, 117.54793, 0.00000, 0.00000, 139.98000,9998); CreateDynamicObject(874, 189.80876, 1867.15979, 117.54793, 0.00000, 0.00000, 139.98000,9998); CreateDynamicObject(874, 188.58350, 1871.92749, 117.54793, 0.00000, 0.00000, 139.98000,9998); CreateDynamicObject(874, 190.04575, 1856.89941, 117.54793, 0.00000, 0.00000, 139.98000,9998); CreateDynamicObject(874, 189.38503, 1856.97498, 117.54793, 0.00000, 0.00000, 139.98000,9998); CreateDynamicObject(874, 190.11035, 1862.76221, 117.54793, 0.00000, 0.00000, 139.98000,9998); CreateDynamicObject(5820, 260.16550, 1843.25366, 119.64668, 0.00000, 0.00000, -90.00000,9998); CreateDynamicObject(19868, 239.12009, 1821.70532, 118.49252, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(19868, 244.38010, 1821.70532, 118.49250, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(19868, 249.64011, 1821.70532, 118.49250, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(19791, 266.60425, 1836.57739, 113.20450, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(12932, 288.89059, 1840.14343, 121.95373, 0.00000, 0.00000, -88.98000,9998); CreateDynamicObject(12932, 216.40337, 1758.70276, 121.90692, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(3577, 263.05942, 1821.83801, 119.26556, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(7622, 272.21832, 1803.72644, 114.97426, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(18856, 242.43098, 1812.75781, 120.06200, 0.00000, 0.00000, -1.86000,9998); CreateDynamicObject(18856, 240.91695, 1772.25928, 120.06200, 0.00000, 0.00000, 51.48001,9998); CreateDynamicObject(18856, 249.70587, 1771.56104, 120.06200, 0.00000, 0.00000, 125.16006,9998); CreateDynamicObject(18856, 240.95946, 1784.60718, 120.06200, 0.00000, 0.00000, 175.14000,9998); CreateDynamicObject(18856, 240.29738, 1798.62402, 120.06200, 0.00000, 0.00000, 10.08000,9998); CreateDynamicObject(18260, 245.47527, 1766.43127, 120.04066, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(18260, 238.54495, 1808.14758, 120.04066, 0.00000, 0.00000, -89.04005,9998); CreateDynamicObject(982, 255.01326, 1805.99780, 119.20288, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(19382, 277.60010, 1872.31140, 127.67620, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(19382, 282.54611, 1861.05615, 126.68580, 0.00000, 0.00000, 90.00000,9998); CreateDynamicObject(19382, 277.80811, 1865.88696, 127.67620, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(19382, 282.77829, 1863.84827, 126.60300, 0.00000, 0.00000, 90.00000,9998); CreateDynamicObject(19382, 292.19180, 1863.90735, 126.60300, 0.00000, 0.00000, 90.00000,9998); CreateDynamicObject(982, 255.03026, 1780.42383, 119.20288, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1290, 254.96201, 1818.74500, 124.42239, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1290, 255.02255, 1793.18762, 124.42239, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1290, 255.05025, 1767.55774, 124.42239, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1290, 227.07721, 1837.36292, 124.42239, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1290, 195.40057, 1839.84094, 124.42239, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1290, 207.97095, 1901.49792, 124.42239, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(900, 264.94144, 1765.57007, 115.88796, 0.00000, 0.00000, 133.26004,9998); CreateDynamicObject(900, 160.98834, 1943.43628, 115.88796, 0.00000, 0.00000, 106.62005,9998); CreateDynamicObject(18228, 301.35495, 1842.43713, 117.63522, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(18228, 276.41138, 1807.00696, 117.63522, 0.00000, 0.00000, 59.45999,9998); CreateDynamicObject(18307, 278.50623, 1704.46851, 133.11269, 0.00000, 0.00000, -102.23999,9998); CreateDynamicObject(18307, 366.25760, 1845.80713, 122.75365, 0.00000, 0.00000, -34.91998,9998); CreateDynamicObject(18307, 328.18503, 2011.72839, 122.75365, 0.00000, 0.00000, 5.34002,9998); CreateDynamicObject(18307, 209.09605, 2080.21899, 122.75365, 0.00000, 0.00000, 77.76002,9998); CreateDynamicObject(19530, 102.99918, 1801.42053, 118.59991, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(16201, 55.14877, 1743.81519, 136.79967, 356.85840, 0.00000, 20.36159,9998); CreateDynamicObject(18307, 25.30713, 1648.03333, 133.11269, 0.00000, 0.00000, -163.38004,9998); CreateDynamicObject(19530, 202.69998, 1979.90271, 109.91096, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(8335, 196.36984, 1956.03186, 113.75487, 0.00000, 0.00000, 0.06000,9998); CreateDynamicObject(19382, 176.07790, 1841.36658, 125.31000, 0.00000, 0.00000, 90.00000,9998); CreateDynamicObject(19382, 180.99960, 1836.38733, 125.31000, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(8335, 247.86433, 1942.55737, 113.75490, 0.00000, 0.00000, 90.00000,9998); CreateDynamicObject(8335, 251.68999, 1945.53955, 111.78590, 0.00000, 0.00000, -90.00000,9998); CreateDynamicObject(8335, 247.33101, 1945.59631, 110.10512, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(8335, 260.83539, 1947.09106, 109.45467, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(16121, 217.64586, 1927.41418, 92.09560, 0.00000, 0.00000, 127.26004,9998); CreateDynamicObject(16121, 218.51515, 1923.74915, 92.09560, 0.00000, 0.00000, 151.20004,9998); CreateDynamicObject(16756, 243.35223, 1849.84668, 119.10280, 0.00000, 0.00000, -23.58000,9998); CreateDynamicObject(8335, 246.83073, 1950.71240, 107.26875, 0.00000, 0.00000, -90.00000,9998); CreateDynamicObject(8335, 265.13126, 1951.71631, 107.77572, 0.00000, 0.00000, -90.00000,9998); CreateDynamicObject(18259, 230.81262, 1976.80005, 112.49529, 0.00000, 0.00000, 90.00000,9998); CreateDynamicObject(16097, 202.07469, 1947.05188, 44.74970, 0.00000, 0.00000, -77.39999,9998); CreateDynamicObject(18228, 217.27563, 2021.90210, 109.69235, 0.00000, 0.00000, -27.96000,9998); CreateDynamicObject(18228, 269.18231, 2001.11157, 104.91653, 0.00000, 0.00000, 214.25993,9998); CreateDynamicObject(1290, 215.51353, 1961.65723, 115.80446, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1290, 215.09129, 1980.54956, 115.80446, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1290, 254.69263, 1987.73413, 115.80446, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(1290, 255.50270, 1963.64893, 115.80450, 0.00000, 0.00000, 45.00000,9998); CreateDynamicObject(1290, 231.53891, 1992.36365, 115.80450, 0.00000, 0.00000, 90.00000,9998); CreateDynamicObject(3378, 261.75488, 1922.69250, 119.67995, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(3287, 262.51929, 1971.05933, 114.29308, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(3286, 202.82802, 1987.20105, 114.34804, 0.00000, 0.00000, 0.00000,9998); CreateDynamicObject(8355, 166.65152, 1789.76489, 118.59550, 0.00000, 0.00000, -90.00000,9998); new cort = CreateDynamicObject(16409, 177.20381, 1894.24426, 118.59489, 0.00000, 0.00000, 180.00000,9998); new cort1 = CreateDynamicObject(16409, 177.04271, 1872.80078, 118.59489, 0.00000, 0.00000, 180.00000,9998); new cort2 = CreateDynamicObject(16409, 177.11995, 1851.97913, 118.59489, 0.00000, 0.00000, 180.00000,9998); new cort3 = CreateDynamicObject(16409, 285.08563, 1871.67322, 118.59490, 0.00000, 0.00000, 0.00000,9998); SetDynamicObjectMaterial(CreateDynamicObject(8263, 165.68523, 1881.98254, 123.23447, 0.00000, 0.00000, -90.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(8263, 236.03040, 1761.72131, 123.23447, 0.00000, 0.00000, -90.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(8263, 285.47592, 1764.16675, 123.23450, 0.00000, 0.00000, 0.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(8263, 265.26868, 1792.26221, 123.23450, 0.00000, 0.00000, 90.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(8263, 265.30038, 1937.35779, 123.23450, 0.00000, 0.00000, 90.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(8263, 182.61856, 1939.01550, 123.23450, 0.00000, 0.00000, 180.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(8263, 198.44926, 1999.28772, 123.23447, 0.00000, 0.00000, -90.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(8263, 256.80185, 1999.34326, 123.23450, 0.00000, 0.00000, 168.48004,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(8263, 187.40886, 1946.10510, 116.23580, 0.00000, 0.00000, 180.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(8263, 318.52972, 1946.07153, 116.23580, 0.00000, 0.00000, 0.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(18753, 165.59399, 1884.07410, 63.00387, 0.00000, 90.00000, 0.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(18753, 283.98035, 1764.15576, 63.00390, 0.00000, 90.00000, 90.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(18753, 265.31790, 1939.61194, 63.00390, 0.00000, 90.00000, 0.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(18753, 228.63620, 1946.02673, 56.09930, 0.00000, 90.00000, 90.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(18753, 198.42218, 2001.74158, 63.00390, 0.00000, 90.00000, 0.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(18753, 259.30988, 1998.76038, 63.00390, 0.00000, 90.00000, 78.41995,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(18753, 180.34566, 1938.88635, 63.00390, 0.00000, 90.00000, 90.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(18753, 265.32950, 1790.56274, 63.00390, 0.00000, 90.00000, 0.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(18753, 236.07384, 1759.35156, 63.00390, 0.00000, 90.00000, 0.00000,9998), 0, 8867, "vgsecnstrct01", "concretewall22_256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(18981, 291.25595, 1865.56470, 113.08100, 0.00000, 0.00000, 0.00000,9998), 0, 8671, "vegassland62", "concretenewb256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(18981, 278.28046, 1877.64795, 113.08100, 0.00000, 0.00000, 90.00000,9998), 0, 8671, "vegassland62", "concretenewb256", 0xFFFFFFFF); SetDynamicObjectMaterial(CreateDynamicObject(18981, 278.28125, 1852.59338, 113.08100, 0.00000, 0.00000, 90.00000,9998),0, 8671, "vegassland62", "concretenewb256", 0xFFFFFFFF); SetDynamicObjectMaterial(cort3, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort3, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort3, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort3, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort3, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort3, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort3, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort3, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort2, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort2, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort2, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort2, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort2, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort2, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort2, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort2, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort1, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort1, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort1, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort1, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort1, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort1, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort1, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort1, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort, 4, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); SetDynamicObjectMaterial(cort, 6, 1675, "wshxrefhse", "duskyblue_128", 0xFFFFFFFF); //=======survival arena return 1; } public OnPlayerConnect(playerid) { InBG[playerid] = 0; SafeZonePlayer[playerid]=0; pPowerTD[playerid] = CreatePlayerTextDraw(playerid, 512.000000, 397.000000, "~n~~n~"); PlayerTextDrawBackgroundColor(playerid, pPowerTD[playerid], 255); PlayerTextDrawFont(playerid, pPowerTD[playerid], 1); PlayerTextDrawLetterSize(playerid, pPowerTD[playerid], 0.500000, -0.099999); PlayerTextDrawColor(playerid, pPowerTD[playerid], -1); PlayerTextDrawSetOutline(playerid, pPowerTD[playerid], 0); PlayerTextDrawSetProportional(playerid, pPowerTD[playerid], 1); PlayerTextDrawSetShadow(playerid, pPowerTD[playerid], 1); PlayerTextDrawUseBox(playerid, pPowerTD[playerid], 1); PlayerTextDrawBoxColor(playerid, pPowerTD[playerid], -1359019777); PlayerTextDrawTextSize(playerid, pPowerTD[playerid], 507.000000, 0.000000); TdSafe[playerid] = TextDrawCreate(317.000000, 9.625000, " "); TextDrawLetterSize(TdSafe[playerid], 0.305000, 1.337499); TextDrawAlignment(TdSafe[playerid], 2); TextDrawColor(TdSafe[playerid], -1); TextDrawSetShadow(TdSafe[playerid], 0); TextDrawSetOutline(TdSafe[playerid], -257); TextDrawBackgroundColor(TdSafe[playerid], 51); TextDrawFont(TdSafe[playerid], 2); TextDrawSetProportional(TdSafe[playerid], 1); return 1; } AntiDeAMX() { print("[GAMEMODE]: AntiDeAMX loaded"); new antidamx[][] = {"Unarmed (Fist)","Brass K","Fire Ex"}; #pragma unused antidamx } public OnPlayerDisconnect(playerid, reason) { new strings[200]; InBG[playerid] = 0; TextDrawDestroy(TdSafe[playerid]); if(StepGaz>1) { if(GetPlayersBG()==1) { new winner = GetLastPlayerBG(); format(strings,sizeof strings,"%s won the game with %d kills in %s%d:%s%d.",PlayerName(winner),PlayerKills[winner],(MatchTimer-MatchTimer/60<10)?("0"):(""),MatchTimer/60,(MatchTimer-MatchTimer/60*60<10)?("0"):(""),MatchTimer-MatchTimer/60*60); SendClientMessageToAll(0x00FFFFC8,strings); SendClientMessage(winner,0x00FFFFC8,"You won the game. Congratulations!"); foreach(Player,i) ShowPlayerNameTagForPlayer(winner,i, true); GivePlayerMoney(winner,50000); GameTextForPlayer(winner, "~g~+$50.000", 3000, 1); SpawnPlayer(winner); if(IsValidDynamicObject(LootDrop)) DestroyDynamicObject(LootDrop),LootDrop =INVALID_OBJECT_ID; if(IsValidDynamicObject(NeonAttach)) DestroyDynamicObject(NeonAttach); if(IsValidDynamicObject(ParaAttach)) DestroyDynamicObject(ParaAttach); ContainerOpened=0; InBG[winner]=0; FirsAid[winner] = 0; Armour[winner] = 0; PlayerKills[winner]=0; Helmet[winner] = 0; ResetPlayerWeapons(winner); SetPlayerVirtualWorld(winner,0); SetPlayerInterior(winner,0); TextDrawHideForPlayer(winner,AliveTD); TextDrawHideForPlayer(winner,TdSafe[winner]); GangZoneHideForPlayer(winner,LastSafeZ); GangZoneHideForPlayer(winner,SafeZone); SendDeathMessageToPlayer(winner, 1001, 1001, 200); SendDeathMessageToPlayer(winner, 1001, 1001, 200); SendDeathMessageToPlayer(winner, 1001, 1001, 200); SendDeathMessageToPlayer(winner, 1001, 1001, 200); SendDeathMessageToPlayer(winner, 1001, 1001, 200); AllowClose=0; MatchTimer=0; MatchLobbyTimer =-1; StepGaz=0; GangZoneDestroy(LastSafeZ); GangZoneDestroy(SafeZone); minimumx = 0, maximumx = 0, minimumy = 0, maximumy = 0, Lminimumx = 0, Lmaximumx = 0, Lminimumy = 0, Lmaximumy = 0; format(strings,sizeof(strings),"H1Z1 Arena\nType /enter to play"); Update3DTextLabelText(arenatxt, 0xFFFFFFFF, strings); for(new car;car< MAX_VEHICLES;car++) { if(MatchVeh[car]==1) { DestroyVehicle(car); MatchVeh[car] = 0; } } for(new spawn=0;spawn<sizeof(LootSpawnPos);spawn++) { if(IsValidDynamicObject(Loot[spawn])) DestroyDynamicObject(Loot[spawn]); } } } return 1; } public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) { new string[128],Float:damage,Float:heal; damage = amount; if(bodypart==3) { if(Armour[damagedid]>0) { GetPlayerHealth(damagedid,heal), SetPlayerHealth(damagedid,heal); if(Armour[damagedid]==2 && Broke[damagedid][0]!=0) Broke[damagedid][0]=0; else Armour[damagedid] = 0, RemovePlayerAttachedObject(damagedid,0), damage=amount/2; } } if(bodypart==9) { if(Helmet[damagedid]>0) { GetPlayerHealth(damagedid,heal), SetPlayerHealth(damagedid,heal); if(Helmet[damagedid]==2 && Broke[damagedid][1]!=0) Broke[damagedid][1]=0; else Helmet[damagedid] = 0, RemovePlayerAttachedObject(damagedid,1), damage=amount/2; } } if(InBG[playerid]!=0) { format(string, sizeof(string), "~n~~n~~n~~r~-%.1f",damage); GameTextForPlayer(playerid, string, 400,5); } return 1; } public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { if(InBG[playerid]!=0&&GetPlayerVirtualWorld(playerid)==9999) SpaceInv[playerid]--; return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(survivalhelicopter==vehicleid) TogglePlayerControllable (playerid, 1); return 1; } public OnVehicleSpawn(vehicleid) { if(survivalhelicopter==vehicleid) SetVehicleVirtualWorld(survivalhelicopter,9998); return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER) { if(survivalhelicopter==GetPlayerVehicleID(playerid)) { new Float: PlayerPosX ,Float: PlayerPosY,Float: PlayerPosZ; GetPlayerPos(playerid, PlayerPosX ,PlayerPosY,PlayerPosZ); GetPlayerPos(playerid, PlayerPosX ,PlayerPosY,PlayerPosZ); SetPlayerPos(playerid, PlayerPosX+2 ,PlayerPosY+2,PlayerPosZ+2); } if(IsMatchCar(GetPlayerVehicleID(playerid))) { SendClientMessage(playerid,0xFFFF80C8,"This vehicle have limited fuel for a fair game!"); return 1; } } return 1; } public OnPlayerDeath(playerid, killerid, reason) { new strings[200]; if(InBG[playerid]!=0) { foreach(Player,i) { if(InBG!=0) SendDeathMessageToPlayer(i, killerid, playerid, reason); } if(killerid!=INVALID_PLAYER_ID && InBG[killerid]!=0) PlayerKills[killerid]++; if(InBG[playerid]==1) { format(strings,sizeof(strings),"You left the game on the %d's place with %d kills. You resisted %s%d:%s%d",GetPlayersBG(),PlayerKills[playerid],(MatchTimer-MatchTimer/60<10)?("0"):(""),MatchTimer/60,(MatchTimer-MatchTimer/60*60<10)?("0"):(""),MatchTimer-MatchTimer/60*60); SendClientMessage(playerid,0xFF8000C8,strings); InBG[playerid]=0; TextDrawHideForPlayer(playerid,AliveTD); TextDrawHideForPlayer(playerid,TdSafe[playerid]); GangZoneHideForPlayer(playerid,LastSafeZ); GangZoneHideForPlayer(playerid,SafeZone); SendDeathMessageToPlayer(playerid, 1001, 1001, 200); SendDeathMessageToPlayer(playerid, 1001, 1001, 200); SendDeathMessageToPlayer(playerid, 1001, 1001, 200); SendDeathMessageToPlayer(playerid, 1001, 1001, 200); SendDeathMessageToPlayer(playerid, 1001, 1001, 200); SendClientMessage(playerid,0xFF0000C8,"You left the game."); foreach(Player,i) ShowPlayerNameTagForPlayer(playerid, i, true); ResetPlayerWeapons(playerid); PlayerKills[playerid]=0; FirsAid[playerid]=0; Armour[playerid]=0; Helmet[playerid]=0; format(strings,sizeof(strings),"H1Z1 Arena\n%d players{FF0000} Alive",GetPlayersBG()); Update3DTextLabelText(arenatxt, 0xFFFFFFFF, strings); } } return 1; } forward SpawnPL(playerid); public SpawnPL(playerid) { SetCameraBehindPlayer(playerid); TogglePlayerControllable (playerid,0); SetPlayerVirtualWorld(playerid,9998); new randpos=random(sizeof(RandomSpawnLobby)); SetPlayerPos(playerid,RandomSpawnLobby[randpos][0],RandomSpawnLobby[randpos][1],RandomSpawnLobby[randpos][2]); return 1; } public OnPlayerSpawn(playerid) { if(StepGaz==1&&InBG[playerid] == 2) { SendClientMessage(playerid,0xFFFF80C8,"You have been teleported in the lobby. Waiting..."); TextDrawShowForPlayer(playerid,TdSafe[playerid]); TextDrawSetString(TdSafe[playerid],"Waiting for players..."); TextDrawShowForPlayer(playerid,AliveTD); SetTimerEx("freze", 2000, 0, "i", playerid); SetTimerEx("SpawnPL", 500, 0, "i", playerid); static strong[500]; format(strong,sizeof(strong), "\t\t {FFFFFF}Welcome to H1Z1 Arena\n\ \t\t{FFFFFF}You are on your own! Kill or be killed!\n\n\ {FFFFFF}Avoid big cities like LS, SF and LV. The number of drop is minimum\n\ \t\t\t{FFFFFF}Press {FF0000}F {FFFFFF}to pick up the loot\n\ \t\t\t {FFFFFF}Press {FF0000}H {FFFFFF}to heal\n\ \t\t\t {FFFFFF}Press {FF0000}Y {FFFFFF}to access the inventory"); ShowPlayerDialog(playerid, DIALOG_INF, DIALOG_STYLE_MSGBOX, "Information", strong, "I agree", ""); SetTimerEx("HideD",7000,false,"u",playerid); } return 1; } CMD:steps(playerid,params[]) { StepGaz=strval(params); return 1; } CMD:timers(playerid,params[]) { MatchLobbyTimer =strval(params); return 1; } GetWeaponSlot(weaponid) { new slot; switch(weaponid) { case 0,1: slot = 0; case 2 .. 9: slot = 1; case 10 .. 15: slot = 10; case 16 .. 18, 39: slot = 8; case 22 .. 24: slot =2; case 25 .. 27: slot = 3; case 28, 29, 32: slot = 4; case 30, 31: slot = 5; case 33, 34: slot = 6; case 35 .. 38: slot = 7; case 40: slot = 12; case 41 .. 43: slot = 9; case 44 .. 46: slot = 11; } return slot; } GetPlayerSameGun(playerid,weap) { new ammo,gun; for (new i = 0; i <= 12; i++) { GetPlayerWeaponData(playerid, i, gun, ammo); if(ammo>0) { if(GetWeaponSlot(weap)==i && gun == weap) return 1; } } return 0; } GetPlayerGunNum(playerid,weap) { new ammo,gun; for (new i = 0; i <= 12; i++) { GetPlayerWeaponData(playerid, i, gun, ammo); if(ammo>0) { if(GetWeaponSlot(weap)==i && gun != weap) return gun; } } return 0; } GetPlayerGun(playerid,num,type) { new ammo,gun,counth; for (new i = 0; i <= 12; i++) { GetPlayerWeaponData(playerid, i, gun, ammo); if(ammo>0) counth++; if(type==1) { if(num==counth) return gun; } else if(type==2) { if(num==counth) return ammo; } } return 0; } GetPlayerGuns(playerid) { new ammo,gun,counth; for (new i = 0; i <= 12; i++) { GetPlayerWeaponData(playerid, i, gun, ammo); if(ammo>0) counth++; } return counth; } CMD:loot(playerid,params[]) { if(!IsPlayerAdmin(playerid)) return 1; if(Wallesasd==0) Wallesasd=-1,SendClientMessage(playerid,-1,"Spawn loot activated"); else Wallesasd = 0,SendClientMessage(playerid,0xFF0000C8,"Spawn loot DezActivated"); return 1; } CMD:heal(playerid,params[]) { if(InBG[playerid]==0||GetPlayerVirtualWorld(playerid)!=9999) return 1; if(FirsAid[playerid]<=0) return 1; pLastTick[playerid] = GetTickCount(), SetTimerEx("PowerBar", 30, false,"d",playerid); return 1; } CMD:leavegame(playerid, params[]) return cmd_exitgame(playerid,params); CMD:exitgame(playerid, params[]) { new strings[150]; if(InBG[playerid]!=0) { InBG[playerid]=0; afktime[playerid]= 0; SetPlayerVirtualWorld(playerid,0); SetPlayerInterior(playerid,0); SetPlayerPos(playerid,1043.2, 1011.6, 11.0); TextDrawHideForPlayer(playerid,AliveTD); TextDrawHideForPlayer(playerid,TdSafe[playerid]); GangZoneHideForPlayer(playerid,LastSafeZ); GangZoneHideForPlayer(playerid,SafeZone); SendDeathMessageToPlayer(playerid, 1001, 1001, 200); SendDeathMessageToPlayer(playerid, 1001, 1001, 200); SendDeathMessageToPlayer(playerid, 1001, 1001, 200); SendDeathMessageToPlayer(playerid, 1001, 1001, 200); SendDeathMessageToPlayer(playerid, 1001, 1001, 200); SendClientMessage(playerid,-1,"You exit from Match."); ResetPlayerWeapons(playerid); PlayerKills[playerid]=0; FirsAid[playerid]=0; Armour[playerid]=0; Helmet[playerid]=0; if(GetPlayersBG()==0) format(strings,sizeof(strings),"H1Z1 Arena\nType /enter to play"); else if(StepGaz==1) format(strings,sizeof(strings),"H1Z1 Arena\n%d players{66CCFF} In Lobby",GetPlayersBG()); else format(strings,sizeof(strings),"H1Z1 Arena\n%d players{FF0000} Alive",GetPlayersBG()); Update3DTextLabelText(arenatxt, 0xFFFFFFFF, strings); foreach(Player,o) { ShowPlayerNameTagForPlayer(playerid, o, true); if(InBG[o]!=0) SendDeathMessageToPlayer( o, 1001, playerid,200); } return 1; } SendClientMessage(playerid,-1,"You are not in Arena!"); return 1; } CMD:enter(playerid,params[]) { if(!IsPlayerInRangeOfPoint(playerid,3,1043.2, 1011.6, 11.0)) return SendClientMessage(playerid,-1,"You are not on the Arena entrance!"); if(InBG[playerid]!=0) return SendClientMessage(playerid,0xFF0000C8,"You are in match!"); if(StepGaz>1) return SendClientMessage(playerid,0xFF0000C8,"A match is already in progress!"); InBG[playerid] = 2; SendClientMessage(playerid,0xFFFF80C8," You have been teleported in the lobby. Waiting..."); if(StepGaz==0)StepGaz=1,MatchLobbyTimer =2*60;//start from the first entered new str[300]; if(StepGaz==0) format(str,sizeof(str),"H1Z1 Arena\nType /enter to play"); else if(StepGaz==1) format(str,sizeof(str),"H1Z1 Arena\n%d players{66CCFF} In Lobby",GetPlayersBG()); else format(str,sizeof(str),"H1Z1 Arena\n%d players{FF0000} Alive",GetPlayersBG()); Update3DTextLabelText(arenatxt, 0xFFFFFFFF, str); new randpos=random(sizeof(RandomSpawnLobby)); SetPlayerPos(playerid,RandomSpawnLobby[randpos][0],RandomSpawnLobby[randpos][1],RandomSpawnLobby[randpos][2]); SetPlayerVirtualWorld(playerid,9998); TextDrawShowForPlayer(playerid,TdSafe[playerid]); TextDrawSetString(TdSafe[playerid],"Waiting for players..."); SetCameraBehindPlayer(playerid); TogglePlayerControllable (playerid,0); TextDrawShowForPlayer(playerid,AliveTD); SetTimerEx("freze", 2000, 0, "i", playerid); ResetPlayerWeapons(playerid); static strong[500]; format(strong,sizeof(strong), "\t\t {FFFFFF}Welcome to H1Z1 Arena\n\ \t\t{FFFFFF}You are on your own! Kill or be killed!\n\n\ {FFFFFF}Avoid big cities like LS, SF and LV. The number of drop is minimum\n\ \t\t\t{FFFFFF}Press {FF0000}F {FFFFFF}to pick up the loot\n\ \t\t\t {FFFFFF}Press {FF0000}H {FFFFFF}to heal\n\ \t\t\t {FFFFFF}Press {FF0000}Y {FFFFFF}to access the inventory"); ShowPlayerDialog(playerid, DIALOG_INF, DIALOG_STYLE_MSGBOX, "Information", strong, "I agree", ""); SetTimerEx("HideD",7000,false,"u",playerid); return 1; } forward freze(playerid); public freze(playerid) { TogglePlayerControllable(playerid, 1); return 1; } forward HideD(playerid); public HideD(playerid) { ShowPlayerDialog(playerid, 999999, DIALOG_STYLE_LIST, "info", "", " ", " "); return 1; } public OnPlayerUpdate(playerid) { if(InBG[playerid]>0) { if(StepGaz>1) { if(StepGaz>=11) TextDrawSetString(TdSafe[playerid],"~r~~h~There is no~n~~r~~h~Safezone"),SafeZonePlayer[playerid] = 0; else { if(IsPlayerInFullSafeZone(playerid)&&SafeZonePlayer[playerid]==0) TextDrawSetString(TdSafe[playerid],"~b~~h~~h~SafeZone"),SafeZonePlayer[playerid] = 1; else if(!IsPlayerInFullSafeZone(playerid)&& SafeZonePlayer[playerid]!=0&&InDeadZone[playerid]==0)TextDrawSetString(TdSafe[playerid],"~r~~h~You are not~n~~r~~h~In SafeZone"),SafeZonePlayer[playerid] = 0; } } if(StepGaz>3) { if(InDeadZone[playerid] == 0) { if(!IsPlayerInSafeZone(playerid)|| StepGaz==11) { new Float:pHeal; GetPlayerHealth(playerid,pHeal); SetPlayerHealth(playerid, pHeal-3); PlayerPlaySound(playerid, 6402, 0.0, 0.0, 10.0); TextDrawShowForPlayer(playerid,BloodTD); TextDrawShowForPlayer(playerid,DeadZoneTD); PlayerPlaySound(playerid, 6402, 0.0, 0.0, 0.0); SetTimerEx("HideBlood",500,false,"d",playerid); InDeadZone[playerid]=1; } } if(InDeadZone[playerid] == 1 && IsPlayerInSafeZone(playerid)) InDeadZone[playerid]=0,TextDrawHideForPlayer(playerid,BloodTD); } } return 1; } forward ShowBlood(playerid); public ShowBlood(playerid) { if(InDeadZone[playerid] == 1) InDeadZone[playerid] = 0; } forward HideBlood(playerid); public HideBlood(playerid) { TextDrawHideForPlayer(playerid,DeadZoneTD); TextDrawHideForPlayer(playerid,BloodTD); SetTimerEx("ShowBlood",1000,false,"d",playerid); return 1; } public OnPlayerPause(playerid) { afktime[playerid]=1; return 1; } forward IsPlayerNearContainer(playerid); public IsPlayerNearContainer(playerid) { if(LootDrop!=INVALID_OBJECT_ID) { if(GetPlayerVirtualWorld(playerid)==9999&&InBG[playerid]!=0) { new Float:X,Float:Y,Float:Z; GetDynamicObjectPos(LootDrop,X,Y,Z); if(IsPlayerInRangeOfPoint(playerid,9,X,Y,Z)) { if(ContainerOpened==0) return 1; else return 2; } } } return 0; } forward timersec(); public timersec() { new strings[200]; if(Wallesasd>0) Wallesasd=-1; // SendClientMessageToAll(-1,"H1Z1 Made By Mister(Mr.Zeth)"); if(StepGaz>0) { if(StepGaz==1) format(strings,sizeof(strings),"%d~w~ In lobby~n~~r~%s%d:%s%d",GetPlayersBG(),(MatchLobbyTimer-MatchLobbyTimer/60<10)?("0"):(""),MatchLobbyTimer/60,(MatchLobbyTimer-MatchLobbyTimer/60*60<10)?("0"):(""),MatchLobbyTimer-MatchLobbyTimer/60*60); else MatchTimer++,format(strings,sizeof(strings),"~r~%s%d:%s%d~w~/ ~r~%d~w~ Alive",(MatchTimer-MatchTimer/60<10)?("0"):(""),MatchTimer/60,(MatchTimer-MatchTimer/60*60<10)?("0"):(""),MatchTimer-MatchTimer/60*60,GetPlayersBG()); TextDrawSetString(AliveTD,strings); if(StepGaz>1) { foreach(Player,i) { if(InBG>0) { foreach(Player,o) ShowPlayerNameTagForPlayer (i,o, false); if(afktime>0) { afktime++; if(afktime>60&&InBG>0) { format(strings,sizeof(strings),"H1Z1 Arena\n%d players{FF0000} Alive",GetPlayersBG()); Update3DTextLabelText(arenatxt, 0xFFFFFFFF, strings); format(strings,sizeof(strings),"You left the Match on the %d's place with %d kills. You resisted %s%d:%s%d",GetPlayersBG(),PlayerKills,(MatchTimer-MatchTimer/60<10)?("0"):(""),MatchTimer/60,(MatchTimer-MatchTimer/60*60<10)?("0"):(""),MatchTimer-MatchTimer/60*60); SendClientMessage(i,0xFF8000C8,strings); SendClientMessage(i,0xFF0000C8,"You was afk more then 30seconds!"); InBG=0; afktime= 0; SetPlayerVirtualWorld(i,0); TextDrawHideForPlayer(i,AliveTD); TextDrawHideForPlayer(i,TdSafe); GangZoneHideForPlayer(i,LastSafeZ); GangZoneHideForPlayer(i,SafeZone); SendDeathMessageToPlayer(i, 1001, 1001, 200); SendDeathMessageToPlayer(i, 1001, 1001, 200); SendDeathMessageToPlayer(i, 1001, 1001, 200); SendDeathMessageToPlayer(i, 1001, 1001, 200); SendDeathMessageToPlayer(i, 1001, 1001, 200); SendClientMessage(i,-1,"You exit from Match."); SpawnPlayer(i); ResetPlayerWeapons(i); PlayerKills=0; FirsAid=0; Armour=0; Helmet=0; foreach(Player,o) { ShowPlayerNameTagForPlayer(i, o, true); if(InBG[o]!=0) SendDeathMessageToPlayer( o, 1001, i,200); } } } } } if(GetPlayersBG()==1) { new winner = GetLastPlayerBG(); format(strings,sizeof strings,"%s win the Match with %d kills in %s%d:%s%d.",PlayerName(winner),PlayerKills[winner],(MatchTimer-MatchTimer/60<10)?("0"):(""),MatchTimer/60,(MatchTimer-MatchTimer/60*60<10)?("0"):(""),MatchTimer-MatchTimer/60*60); SendClientMessageToAll(0x00FFFFC8,strings); SendClientMessage(winner,0x00FFFFC8,"You win the match. Congratulations!"); foreach(Player,i) ShowPlayerNameTagForPlayer(winner,i, true); GivePlayerMoney(winner,10000); SpawnPlayer(winner); if(IsValidDynamicObject(LootDrop))DestroyDynamicObject(LootDrop),LootDrop =INVALID_OBJECT_ID; if(IsValidDynamicObject(NeonAttach)) DestroyDynamicObject(NeonAttach); if(IsValidDynamicObject(ParaAttach)) DestroyDynamicObject(ParaAttach); InBG[winner]=0; ContainerOpened=0; FirsAid[winner] = 0; Armour[winner] = 0; PlayerKills[winner]=0; Helmet[winner] = 0; ResetPlayerWeapons(winner); SetPlayerVirtualWorld(winner,0); SetPlayerInterior(winner,0); TextDrawHideForPlayer(winner,AliveTD); TextDrawHideForPlayer(winner,TdSafe[winner]); GangZoneHideForPlayer(winner,LastSafeZ); GangZoneHideForPlayer(winner,SafeZone); SendDeathMessageToPlayer(winner, 1001, 1001, 200); SendDeathMessageToPlayer(winner, 1001, 1001, 200); SendDeathMessageToPlayer(winner, 1001, 1001, 200); SendDeathMessageToPlayer(winner, 1001, 1001, 200); SendDeathMessageToPlayer(winner, 1001, 1001, 200); AllowClose=0; MatchTimer=0; MatchLobbyTimer =-1; StepGaz=0; GangZoneDestroy(LastSafeZ); GangZoneDestroy(SafeZone); minimumx = 0, maximumx = 0, minimumy = 0, maximumy = 0, Lminimumx = 0, Lmaximumx = 0, Lminimumy = 0, Lmaximumy = 0; format(strings,sizeof(strings),"H1Z1 Arena\nType /enter to play"); Update3DTextLabelText(arenatxt, 0xFFFFFFFF, strings); for(new car;car< MAX_VEHICLES;car++) { if(MatchVeh[car]==1) { DestroyVehicle(car); MatchVeh[car] = 0; } } for(new spawn=0;spawn<sizeof(LootSpawnPos);spawn++) { if(IsValidDynamicObject(Loot[spawn])) DestroyDynamicObject(Loot[spawn]); } } } } if(MatchLobbyTimer>=0) { MatchLobbyTimer--; if(StepGaz>2 && StepGaz<11) { foreach(Player,i) { if(InBG>0) { if(MatchLobbyTimer ==60) GameTextForPlayer(i, "~y~restricting the play area~n~~y~in 1 minute", 5000, 3); if(MatchLobbyTimer ==30) GameTextForPlayer(i, "~y~restricting the play area~n~~y~in 30 seconds", 5000, 3); } } } if(MatchLobbyTimer==0) { if(AllowClose==0&&StepGaz>2) AllowClose=1,StepGaz++,SetTimer("DecreasZone", 100, false); if(StepGaz==2)StepGaz++; if(StepGaz==1) StartMatch (); else if(StepGaz==3)//reveal the first safezone { MatchLobbyTimer=60*3;//3min minutes to get on sfezone Range = 1200; RandPosInArea (-1600, -1600, 1600, 1600,GasX,GasY); minimumx = GasX - (Range/2), maximumx = GasX + (Range/2), minimumy = GasY - (Range/2), maximumy = GasY + (Range/2); SafeZone= GangZoneCreate(minimumx-(Range/2),minimumy-(Range/2),maximumx+(Range/2),maximumy+(Range/2)); GangZoneShowForEx(SafeZone, 0x04E2FBC2);////safezone CheckZone(); } else if(StepGaz==10) { AllowClose=0; MatchLobbyTimer =-1; StepGaz++; GangZoneDestroy(LastSafeZ); GangZoneDestroy(SafeZone); minimumx = 0, maximumx = 0, minimumy = 0, maximumy = 0, Lminimumx = 0, Lmaximumx = 0, Lminimumy = 0, Lmaximumy = 0; foreach(Player,i) { if(InBG!=0) GameTextForPlayer(i, "~r~~h~~h~Kill everyone or Die", 5000, 3); } } } } } CMD:cancelmatch(playerid,params[]) { // if(PlayerInfo [playerid][pAdmin]<6) return 1; AllowClose=0; MatchTimer=0; MatchLobbyTimer =-1; StepGaz=0;GangZoneDestroy(LastSafeZ); GangZoneDestroy(SafeZone); minimumx = 0, maximumx = 0, minimumy = 0, maximumy = 0, Lminimumx = 0, Lmaximumx = 0, Lminimumy = 0, Lmaximumy = 0; for(new spawn=0;spawn<sizeof(LootSpawnPos);spawn++) { if(IsValidDynamicObject(Loot[spawn])) DestroyDynamicObject(Loot[spawn]); } for(new car;car< MAX_VEHICLES;car++) { if(MatchVeh[car]==1) DestroyVehicle(car),MatchVeh[car] = 0; } foreach(Player,i) { if(InBG!=0) { SetPlayerPos(i, 1043.2, 1011.6, 11.0); SetPlayerVirtualWorld(i,0); SetPlayerInterior(playerid,0); TextDrawHideForPlayer(i,TdSafe); TextDrawHideForPlayer(i,AliveTD); InBG = 0; SpawnPlayer(i); FirsAid = 0; Armour = 0; Helmet = 0; foreach(Player,a) ShowPlayerNameTagForPlayer(i, a, true); SendClientMessage(i,0xFF0000C8,"The match was cancelled!"); } } if(IsValidDynamicObject(LootDrop)) DestroyDynamicObject(LootDrop),LootDrop =INVALID_OBJECT_ID; if(IsValidDynamicObject(NeonAttach)) DestroyDynamicObject(NeonAttach); if(IsValidDynamicObject(ParaAttach)) DestroyDynamicObject(ParaAttach); ContainerOpened=0; Update3DTextLabelText(arenatxt, 0xFFFFFFFF, "H1Z1 Arena\nType /enter to play"); return 1; } StartMatch() { new str[128],Float:X,Float:Y; if(GetPlayersBG()<2) { SendBGMessage(0xFF0000C8,"Match canceled. Minimum 5 players to start"); foreach(Player,i) { if(InBG!=0) { SetPlayerPos(i, 1043.2, 1011.6, 11.0); SetPlayerVirtualWorld(i,0); SetPlayerInterior(i,0); TextDrawHideForPlayer(i,AliveTD); TextDrawHideForPlayer(i,TdSafe); InBG = 0; PlayerKills=0; afktime = 0; ResetPlayerWeapons(i); SetTimerEx("SetPlayerWeapons" ,2000,0,"i",i); foreach(Player,a) ShowPlayerNameTagForPlayer(i,a, true); } } StepGaz=0; format(str,sizeof(str),"H1Z1 Arena\nType /enter to play"); Update3DTextLabelText(arenatxt, 0xFFFFFFFF, str); return 1; } AllowClose=0; MatchTimer=0; MatchLobbyTimer =60; StepGaz++; SetTimer("SpawnLoot", 4000, false); format(str,sizeof(str),"H1Z1 Arena\n%d players{FF0000} Alive",GetPlayersBG()); Update3DTextLabelText(arenatxt, 0xFFFFFFFF, str); GangZoneDestroy(LastSafeZ); Lminimumx = -3000, Lmaximumx = 3000, Lminimumy = -3000, Lmaximumy = 3000; LastSafeZ = GangZoneCreate(-3500,-3500,3500,3500); for(new spawn=0;spawn<sizeof(CarSpawnPos);spawn++) { randomcar = random(15); vehspawned=random(3); if(vehspawned==1||vehspawned==2) { counthcars++; new car = CreateVehicle(RandomCarSpawn[randomcar],CarSpawnPos[spawn][0],CarSpawnPos[spawn][1],CarSpawnPos[spawn][2], random(360),-1,-1,3600); MatchVeh[car] = 1; SetVehicleToRespawn(car); SetVehicleHealth(car,random(400)+450); SetVehicleVirtualWorld(car,9999); new rand=random(30); if(rand<5)rand+=5; // VehFuel[car] = rand; } } printf("%d cars",counthcars); foreach(Player,i) { if(InBG!=0) { SpaceInv = 0; ResetPlayerWeapons(i); TextDrawShowForPlayer(i,AliveTD); PlayerKills=0; SetPlayerVirtualWorld(i,9999); TextDrawSetString(TdSafe,"~r~~h~You are not~n~~r~~h~In SafeZone"); TogglePlayerControllable(i,1); GivePlayerWeapon(i,46,1); RandPosInArea (-2000, -2000, 2000, 2000,X,Y); SetPlayerPos(i,X,Y,1200); GivePlayerWeapon(i,46,1); afktime = 0; SafeZonePlayer = 1; GameTextForPlayer(i, "~y~SafeZone will be revealed~n~~y~in 1 minute!", 5000, 3); } } GangZoneShowForEx(LastSafeZ, 0x808080C8);//////last-safezone return 1; } FindObj() { for(new x;x<sizeof(LootSpawnPos);x++) { if(!IsValidDynamicObject(Loot[x])) return x; } return 0; } forward SpawnLoot(); public SpawnLoot() { new c1,c2,c3,c4; for(new spawn=0;spawn<sizeof(LootSpawnPos);spawn++) { new lootspawn = random(32),roty=0; if(RandomWeaponSpawn[lootspawn]==19141||RandomWeaponSpawn[lootspawn]==19142||RandomWeaponSpawn[lootspawn]==19515||RandomWeaponSpawn[lootspawn]==19141)roty=-90; if(RandomWeaponSpawn[lootspawn] <100) OBJ[spawn] = GetWeaponObjectID(RandomWeaponSpawn[lootspawn]); else OBJ[spawn] = RandomWeaponSpawn[lootspawn]; if(IsValidDynamicObject(Loot[spawn])) DestroyDynamicObject(Loot[spawn]); Loot[spawn] = CreateDynamicObject (OBJ[spawn], LootSpawnPos[spawn][0],LootSpawnPos[spawn][1],LootSpawnPos[spawn][2], 0,roty,0,9999, -1,-1,100,100); if(GetCity( LootSpawnPos[spawn][0],LootSpawnPos[spawn][1])==1)c1++; if(GetCity( LootSpawnPos[spawn][0],LootSpawnPos[spawn][1])==2)c2++; if(GetCity( LootSpawnPos[spawn][0],LootSpawnPos[spawn][1])==3)c3++; if(GetCity( LootSpawnPos[spawn][0],LootSpawnPos[spawn][1])==0)c4++; } print(" "); printf("[LOOT] %d loot s pawned on map %d",sizeof(LootSpawnPos),CountDynamicObjects()); printf("[LOOT] LS %d LV %d SF %d else %d",c3,c2,c1,c4); print(" "); } forward ShowWeapons(playerid); public ShowWeapons(playerid) { new str[200],firstwe[50],secondwe[50],thirdwe[40]; if(GetPlayerGun(playerid,1,1)==0) format(firstwe, sizeof firstwe, "{FF0000}No weapon"); else format(firstwe, sizeof firstwe, "{ffffff}%s\t%d bullets",WeaponName(GetPlayerGun(playerid,1,1)),GetPlayerGun(playerid,1,2)); if(GetPlayerGun(playerid,2,1)==0) format(secondwe,sizeof secondwe,"{FF0000}No weapon"); else format(secondwe,sizeof secondwe,"{ffffff}%s\t%d bullets",WeaponName(GetPlayerGun(playerid,2,1)),GetPlayerGun(playerid,2,2)); if(GetPlayerGun(playerid,3,1)==0) format(thirdwe, sizeof thirdwe, "{FF0000}No weapon"); else format(thirdwe, sizeof thirdwe, "{ffffff}%s\t%d bullets",WeaponName(GetPlayerGun(playerid,3,1)),GetPlayerGun(playerid,3,2)); format(str,sizeof str, "Weapon\tAmmo\n\ %s\n%s\n%s\n%s\n%s",firstwe,secondwe,thirdwe); ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_TABLIST_HEADERS, "Weapons options", str, "Drop", "Cancel"); } forward DecreasZone(); public DecreasZone() { if(AllowClose==1) { SetTimer("DecreasZone", 100, false); if(!IsClosedSafe()) { if(Lminimumx != minimumx-(Range/2)) { if(Lminimumy-minimumy>Lminimumx-minimumx) { if(Lminimumx>minimumx-(Range/2)) Lminimumx= minimumx-(Range/2); else Lminimumx= Lminimumx+ranges; } } if(Lminimumy != minimumy-(Range/2)) { if(Lminimumx-minimumx>Lminimumy-minimumy) { if(Lminimumy>minimumy-(Range/2)) Lminimumy= minimumy-(Range/2); else Lminimumy= Lminimumy+ranges; } } //up right if(Lmaximumx != maximumx+(Range/2)) { if(Lmaximumx-maximumx>Lmaximumy-maximumy) { if(Lmaximumx<maximumx+(Range/2)) Lmaximumx= maximumx+(Range/2); else Lmaximumx= Lmaximumx-ranges; } } if(Lmaximumy != maximumy+(Range/2)) { if(Lmaximumy-maximumy>Lmaximumx-maximumx) { if(Lmaximumy<maximumy+(Range/2)) Lmaximumy= maximumy+(Range/2); else Lmaximumy= Lmaximumy-ranges; } } GangZoneDestroy(LastSafeZ); LastSafeZ = GangZoneCreate(Lminimumx,Lminimumy,Lmaximumx,Lmaximumy); GangZoneShowForEx(LastSafeZ, 0x808080C8);//////last-safezone } else if(StepGaz==4) { AllowClose=0; Range=600; StepGaz++, MatchLobbyTimer=61, GangZoneDestroy(SafeZone); RandPosInArea(minimumx, minimumy, maximumx, maximumy,GasX,GasY); minimumx = GasX - (Range/2); maximumx = GasX + (Range/2); minimumy = GasY - (Range/2); maximumy = GasY + (Range/2); SafeZone= GangZoneCreate(minimumx-(Range/2),minimumy-(Range/2),maximumx+(Range/2),maximumy+(Range/2)); GangZoneShowForEx(SafeZone, 0x04E2FBC2);/////safezone SpawnLootDrop(); } else if(StepGaz==6) { AllowClose=0; MatchLobbyTimer =61; StepGaz++; GangZoneDestroy(SafeZone); Range=250; RandPosInArea(minimumx, minimumy, maximumx, maximumy,GasX,GasY); minimumx = GasX - (Range/2); maximumx = GasX + (Range/2); minimumy = GasY - (Range/2); maximumy = GasY + (Range/2); SafeZone= GangZoneCreate(minimumx-(Range/2),minimumy-(Range/2),maximumx+(Range/2),maximumy+(Range/2)); GangZoneShowForEx(SafeZone, 0x04E2FBC2);/////safezone SpawnLootDrop(); } else if(StepGaz==8) { AllowClose=0; MatchLobbyTimer =61; StepGaz++; GangZoneDestroy(LastSafeZ); GangZoneShowForEx(SafeZone, 0x808080C8);/////safezone showed like lastsafezone SendClientMessage(0,0xFFFF80C8,"Entire map will be infested. Kill or be killed!"); SpawnLootDrop(); } } } public OnPlayerStreamIn(playerid, forplayerid) { if(InBG[playerid]==1) ShowPlayerNameTagForPlayer(forplayerid, playerid, 0); else ShowPlayerNameTagForPlayer(forplayerid, playerid, 1); return 1; } GetLastPlayerBG() { new player=INVALID_PLAYER_ID; foreach(Player,i) { if(InBG != 0) player=i; } return player; } GetPlayersBG() { new counth=0; foreach(Player,i) { if(InBG != 0) counth++; } return counth; } SendBGMessage(color,mes[]) { foreach(Player,i) { if(InBG != 0) SendClientMessage(i,color,mes); } return 1; } CheckZone() { foreach(Player,i) { if(InBG!=0) { if(IsPlayerInFullSafeZone(i)&&SafeZonePlayer==0) TextDrawSetString(TdSafe,"~b~~h~~h~SafeZone"),SafeZonePlayer = 1; else TextDrawSetString(TdSafe,"~r~~h~You are not~n~~r~~h~In SafeZone"),SafeZonePlayer = 0; GameTextForPlayer(i, "~r~proceed to the marked area~n~~r~in 3 minutes", 5000, 3); } } } IsClosedSafe() { if( IsPointInRangeOfPoint(Lminimumx,Lminimumy,0 ,minimumx-(Range/2),minimumy-(Range/2),0,15)&& IsPointInRangeOfPoint(Lmaximumx,Lmaximumy,0, maximumx+(Range/2),maximumy+(Range/2),0,15)) return 1; return 0; } IsPlayerInFullSafeZone(playerid) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); if (x > minimumx-(Range/2) && x < maximumx+(Range/2) && y > minimumy-(Range/2) && y < maximumy+(Range/2)) return 1; return 0; } IsPlayerInSafeZone(playerid) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); if (x > minimumx && x < maximumx && y > minimumy && y < maximumy) return 1; if (x > Lminimumx && x < Lmaximumx && y > Lminimumy && y < Lmaximumy) return 1; return 0; } GangZoneShowForEx(zone,color) { foreach(Player,i) { if(InBG!=0) GangZoneShowForPlayer(i,zone,color); } return 1; } IsMatchCar(veh) { if(MatchVeh[veh]==1) return 1; return 0; } LootName(id) { new named[50]; if(id<100) GetWeaponName(id, named, sizeof(named)); else if(id == 11736) format(named,sizeof named,"First Aid kit"); else if(id == 18978) format(named,sizeof named,"Helmet level 1"); else if(id == 19515) format(named,sizeof named,"Armour level 1"); else if(id == 19141) format(named,sizeof named,"Helmet level 2");//police helmet else if(id == 19142) format(named,sizeof named,"Armour level 2");//police armour return named; } PickupLoot(playerid) { new str[200],ammo; GetPlayerWeaponData(playerid, GetWeaponSlot(GetWeaponIDObject(OBJ[GetClosedLoot(playerid)])), ammo, ammo); if(ammo>0)ammo=0; if(GetWeaponIDObject(OBJ[GetClosedLoot(playerid)])<=15) { if(SpaceInv[playerid]+ 10 >=300) return SendClientMessage(playerid,0xFF0000C8,"You need to drop something, you don't have space for that"); SpaceInv[playerid]+=10; GivePlayerWeapon(playerid,GetWeaponIDObject(OBJ[GetClosedLoot(playerid)]),1); format(str,sizeof str,"You picked up {339999}%s{FFFFFF}.",LootName(GetWeaponIDObject(OBJ[GetClosedLoot(playerid)]))); } else if(GetWeaponIDObject(OBJ[GetClosedLoot(playerid)])<=18) { if(SpaceInv[playerid]+ 4 >=300) return SendClientMessage(playerid,0xFF0000C8,"You need to drop something, you don't have space for that"); SpaceInv[playerid]+=4; GivePlayerWeapon(playerid,GetWeaponIDObject(OBJ[GetClosedLoot(playerid)]),4); format(str,sizeof str,"You picked up %d {339999}%s{FFFFFF}.",ammo+4,LootName(GetWeaponIDObject(OBJ[GetClosedLoot(playerid)]))); } else { if(SpaceInv[playerid]+ 30 >=300) return SendClientMessage(playerid,0xFF0000C8,"You need to drop something, you don't have space for that"); SpaceInv[playerid]+=30; GivePlayerWeapon(playerid,GetWeaponIDObject(OBJ[GetClosedLoot(playerid)]),30); format(str,sizeof str,"You picked up {339999}%s{FFFFFF} with {339999}%d{FFFFFF} bullets.",LootName(GetWeaponIDObject(OBJ[GetClosedLoot(playerid)])),ammo+30); } DestroyDynamicObject(Loot[GetClosedLoot(playerid)]); SendClientMessage(playerid,-1,str); ApplyAnimation(playerid, "MISC", "Case_pickup", 4.1, 0, 0, 0, 0, 0); return 1; } PlayerName(playa) { new named[MAX_PLAYER_NAME]; // format(named,sizeof(named),PlayerInfo [playa][pNormalName]); GetPlayerName(playa, named, sizeof (named)); return named; } GetWeaponIDObject(gunid) { new iObjectID=999; switch(gunid) { case 335: iObjectID = 4; case 339: iObjectID = 8; case 342: iObjectID = 16; case 343: iObjectID = 17; case 344: iObjectID = 18; case 346: iObjectID = 22; case 347: iObjectID = 23; case 348: iObjectID = 24; case 349: iObjectID = 25; case 350: iObjectID = 26; case 351: iObjectID = 27; case 352: iObjectID = 28; case 353: iObjectID = 29; case 355: iObjectID = 30; case 356: iObjectID = 31; case 372: iObjectID = 32; case 357: iObjectID = 33; case 358: iObjectID = 34; case 359: iObjectID = 35; case 360: iObjectID = 36; case 361: iObjectID = 37; case 362: iObjectID = 38; } return iObjectID; } GetWeaponObjectID(gunid) { new iObjectID; switch(gunid) { case 4: iObjectID = 335; case 8: iObjectID = 339; case 16: iObjectID = 342; case 17: iObjectID = 343; case 18: iObjectID = 344; case 22: iObjectID = 346; case 23: iObjectID = 347; case 24: iObjectID = 348; case 25: iObjectID = 349; case 26: iObjectID = 350; case 27: iObjectID = 351; case 28: iObjectID = 352; case 29: iObjectID = 353; case 30: iObjectID = 355; case 31: iObjectID = 356; case 32: iObjectID = 372; case 33: iObjectID = 357; case 34: iObjectID = 358; case 35: iObjectID = 359; case 36: iObjectID = 360; case 37: iObjectID = 361; case 38: iObjectID = 362; } return iObjectID; } GetPlayerSpeed(playerid) { new Float:Vx, Float:Vy, Float:Vz; GetPlayerVelocity(playerid, Vx, Vy, Vz); new Float:rtn; rtn = floatsqroot(floatpower(Vx*100,2) + floatpower(Vy*100,2)); rtn = floatsqroot(floatpower(rtn,2) + floatpower(Vz*100,2)); return floatround(rtn); } WeaponName(id) { new named[50]; GetWeaponName(id, named, sizeof(named)); return named; } IsPointInRangeOfPoint(Float:x, Float:y, Float:z, Float:x2, Float:y2, Float:z2, Float:range) { x2 -= x; y2 -= y; z2 -= z; return ((x2 * x2) + (y2 * y2) + (z2 * z2)) < (range * range); } RandPosInArea( Float: minimumxx, Float: minimumyy, Float: maximumxx, Float: maximumyy, &Float:fDestX, &Float:fDestY ) { new iMin, iMax,Float:mul = floatpower(10.0, 4); iMin = floatround(minimumxx * mul); iMax = floatround(maximumxx * mul); fDestX = float(random(iMax - iMin) + iMin) / mul; iMin = floatround(minimumyy * mul); iMax = floatround(maximumyy * mul); fDestY = float(random(iMax - iMin) + iMin) / mul; }
-
Este sistemul tau din cate am observat, am vazut ca s-a mai 'plans' un baiat de chestia asta..
-
Salut, am o problema. Cand moare cineva, le da respawn, numai ca nu in VirtualWorld 0, iar meciul continua la infinit. VirusTotal: https://www.virustotal.com/ro/file/eab2739a6f6fefbf1629dc78f851270bf36ef8174693bc4f41e6182641465144/analysis/1523908126/ Link: https://www.dropbox.com/s/gowblpzv2y84mvj/pubgh1z1.rar?dl=0 Ma poate ajuta cineva?
-
Am reusit sa rezolv problema. Am facut return-ul separat, si am facut si chestia cu string-ul. CMD:shop(playerid, params[]) { ShowShop(playerid); return 1; } si function ShowShop(playerid) { new gold = PlayerInfo[playerid][pPremiumPoints], string[128], szDialog[3000]; Multumesc de ajutor, cer t/c
-
Acelasi bug ca in amandoua exemple.
-
Ok, revin cu EDIT.
-
O sa incerc si chestia asta.
-
Salut, comanda este CMD:shop(playerid,params[]) return ShowShop(playerid);
-
#define DIALOG_SHOP 67 #define DIALOG_SHOP1 68
-
Doresc daca poate sa ma ajute cineva...? Tastez comanda /shop si-mi spune ca este invalida comanda, insa ea exista in GameMode. (gamemode burned).
-
Ai la locatie Localhost:7777 in pula mea si tu nu stii cum sa modifici coordonatele, lasa-te.
-
GameMode Ruby Nephrite [BIG UPDATED] Edited by AndreiGB
Tentacion replied to AndreiGB's topic in Gamemode-uri
Lasa-te de scripting daca nu stii nici macar asta.