Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <fun>
- #include <cstrike>
- #include <fakemeta>
- #include <engine>
- #include <hamsandwich>
- #include <nvault>
- #include <colorchat>
- #define PLUGIN "Call of Duty: MW Mod"
- #define VERSION "0.8.0"
- #define AUTHOR "QTM_Peyote"
- #define STANDARDNA_brzina 250.0
- #define ZADATAK_POKAZI_INFORMACIJE 672
- #define ZADATAK_PROVERA 704
- #define ZADATAK_POKAZI_REKLAME 768
- #define ZADATAK_POSTAVI_brzinu 832
- #define weapon
- //#define BOTY 1
- new za_hejtere[] = "MARS U PICKU MATERINU I TI I DISASSEMBLER, BOTINO RASPALA" // hvala desikac
- new SyncHudObj;
- new SyncHudObj3;
- new g_msg_screenfade;
- new cvar_xp_za_ubistvo;
- new sprite_white;
- new sprite_blast;
- new sprite_beam;
- new g_vault;
- new iskustvo_za_pare;
- new iskustvo_za_mnogopara;
- new Ubrania_CT[4][]={"sas","gsg9","urban","gign"};
- new Ubrania_Terro[4][]={"arctic","leet","guerilla","terror"};
- new const maxAmmo[31]={0,52,0,90,1,32,1,100,90,1,120,100,100,90,90,90,100,120,30,120,200,32,90,120,90,2,35,90,90,0,100};
- new const maxClip[31] = { -1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20,
- 10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 };
- new informacije_predmet_igraca[33][2];
- new const naziv_predmeta[][] = {"Nema",
- "Necujne Cizme", //1
- "Dupli Pancir", //2
- "Ojacani Pancir", //3
- "Veteran sa nozem", //4
- "Iznenadi neprijatelje", //5
- "Nevidljivost", //6
- "Respawn", //7
- "Noz Marinca", //8
- "Kamuflaza", //9
- "HE Expert", //10
- "Dupli Skok", //11
- "Vojna tajna", //12
- "AWP Master",//13
- "Adrenalin",//14
- "Rambova tajna",//15
- "Deagle Manijak",//16
- "Super Pancir",//17
- "Extra HP++",//18
- "Komplet za prvu pomoc",//19
- "No Recoil",//20
- "Titanijumski metci",//21
- "Pukovnikovi metci",//22
- "Ogranicen no-recoil",//23
- "SWAT Stit",//24
- "50 HP++",//25
- "Nano Oklop",//26
- "BulletProof",//27
- "Jetpack",
- "Gravitacija",
- "Speed",
- "Scout Expert",
- "Elixir",
- "Madjionicar",
- "Dupli XP",
- "Assassinov plast"
- };
- new const opis_predmet[][] = {"Ubi nekog i dobices predmet",
- "Necujno trcanje",
- "Smanjuje stetu za LW %",
- "Smanjuje stetu za LW %",
- "Brze ubijas nozem",
- "Kada pogodite nekog od pozadi, povrede su dva puta vece",
- "Imate LW % nevidljivosti",
- "1/LW sanse da se respawn posle smrti",
- "Brzo ubijanje nozem",
- "Imate 1/LW sanse da odmah ubijete sa HE. Takodje izgledate kao neprijatelj",
- "Instant kill sa granatom (HE). Zadajes LW % dodatne stete",
- "Dupli skok",
- "Vase povrede su smanjene za 5. Imate 1/LW sanse da oslepite neprijatelja",
- "Instant kill sa AWP",
- "Za svaki kill dobijate 50hp",
- "Za svaki kill dobijate pun sarzer i 20hp",
- "Dobijate Deagle",
- "Imate 500 stita",
- "Dobijate +100hp svake runde, ali zato ste sporiji",
- "Koristite da regeneriste maximalni HP",
- "Nema trzanja puske kad pucate",
- "Zadajete protivnicima +10 vise stete",
- "Zadajete protivnicima +20 vise stete",
- "Smanjeno trazanje puske",
- "Ni jedan predmet nece uticati na vas",
- "Dobijate +50hp svake runde, ali zato ste sporiji",
- "Imate 1/LW sanse da izbegnete stetu",
- "Otporni ste na 3 metka u svakom krugu",
- "Pritisnite CRTL i SPACE da koristite jetpack, jetpack se obnavlja svake 4 sec",
- "Smanjena gravitacija",
- "Povecana Brzina",
- "Dodaje vam 200HP",
- "Kad cucite sa nozem nevidljivi ste",
- "Dobijate duplo vise XP za kill",
- "Nevidljivi ste dok drzite noz"
- };
- new klasa_igraca[33];
- new level_igraca[33] = 1;
- new iskustvo_igraca[33];
- new nova_klasa_igraca[33];
- new const iskustvo_levelu[] = {0,7,28,63,112,175,252,343,448,567,700,847,1008,1183,1372,1575,1792,2023,2268,2527,
- 2800,3087,3388,3703,4032,4375,4732,5103,5488,5887,6300,6727,7168,7623,8092,8575,9072,9583,10108,10647,
- 11200,11767,12348,12943,13552,14175,14812,15463,16128,16807,17500,18207,18928,19663,20412,21175,21952,22743,23548,24367,
- 25200,26047,26908,27783,28672,29575,30492,31423,32368,33327,34300,35287,36288,37303,38332,39375,40432,41503,42588,43687,
- 44800,45927,47068,48223,49392,50575,51772,52983,54208,55447,56700,57967,59248,60543,61852,63175,64512,65863,67228,68607,
- 70000,71407,72828,74263,75712,77175,78652,80143,81648,83167,84700,86247,87808,89383,90972,92575,94192,95823,97468,99127,
- 100800,102487,104188,105903,107632,109375,111132,112903,114688,116487,118300,120127,121968,123823,125692,127575,129472,131383,133308,135247,
- 137200,139167,141148,143143,145152,147175,149212,151263,153328,155407,157500,159607,161728,163863,166012,168175,170352,172543,174748,176967,
- 179200,181447,183708,185983,188272,190575,192892,195223,197568,199927,202300,204687,207088,209503,211932,214375,216832,219303,221788,224287,
- 226800,229327,231868,234423,236992,239575,242172,244783,247408,250047,252700,255367,258048,260743,263452,266175,268912,271663,274428,277207,
- 280000,282807,285628,288463,291312,294175,297052,299943,302848,305767,308700,311647,314608,317583,320572,323575,326592,329623,332668,335727,
- 338800,341887,344988,348103,351232,354375,357532,360703,363888,367087,370300,373527,376768,380023,383292,386575,389872,393183,396508,399847,
- 403200,406567,409948,413343,416752,420175,423612,427063,430528,434007,437500,441007,444528,448063,451612,455175,458752,462343,465948,469567,
- 473200,476847,480508,484183,487872,491575,495292,499023,502768,506527,510300,514087,517888,521703,525532,529375,533232,537103,540988,544887,
- 548800,552727,556668,560623,564592,568575,572572,576583,580608,584647,588700,592767,596848,600943,605052,609175,613312,617463,621628,625807,
- 630000,634207,638428,642663,646912,651175,655452,659743,664048,668367,672700,677047,681408,685783,690172,694575,698992,703423,707868,712327,
- 716800,721287,725788,730303,734832,739375,743932,748503,753088,757687,762300,766927,771568,776223,780892,785575,790272,794983,799708,804447,
- 809200,813967,818748,823543,828352,833175,838012,842863,847728,852607,857500,862407,867328,872263,877212,882175,887152,892143,897148,902167,
- 907200,912247,917308,922383,927472,932575,937692,942823,947968,953127,958300,963487,968688,973903,979132,984375,989632,994903,1000188,1005487,
- 1010800,1016127,1021468,1026823,1032192,1037575,1042972,1048383,1053808,1059247,1064700,1070167,1075648,1081143,1086652,1092175,1097712,1103263,1108828,1114407,
- 1120000,1125607,1131228,1136863,1142512,1148175,1153852,1159543,1165248,1170967,1176700,1182447,1188208,1193983,1199772,1205575,1211392,1217223,1223068,1228927,
- 1234800,1240687,1246588,1252503,1258432,1264375,1270332,1276303,1282288,1288287,1294300,1300327,1306368,1312423,1318492,1324575,1330672,1336783,1342908,1349047,
- 1355200,1361367,1367548,1373743,1379952,1386175,1392412,1398663,1404928,1411207,1417500,1423807,1430128,1436463,1442812,1449175,1455552,1461943,1468348,1474767,
- 1481200,1487647,1494108,1500583,1507072,1513575,1520092,1526623,1533168,1539727,1546300,1552887,1559488,1566103,1572732,1579375,1586032,1592703,1599388,1606087,
- 1612800,1619527,1626268,1633023,1639792,1646575,1653372,1660183,1667008,1673847,1680700,1687567,1694448,1701343,1708252,1715175,1722112,1729063,1736028,1743007,
- 1750000,1757007,1764028,1771063,1778112,1785175,1792252,1799343,1806448,1813567,1820700,1827847,1835008,1842183,1849372,1856575,1863792,1871023,1878268,1885527,
- 1892800,1900087,1907388,1914703,1922032,1929375,1936732,1944103,1951488,1958887,1966300,1973727,1981168,1988623,1996092,2003575,2011072,2018583,2026108,2033647,
- 2041200,2048767,2056348,2063943,2071552,2079175,2086812,2094463,2102128,2109807,2117500,2125207,2132928,2140663,2148412,2156175,2163952,2171743,2179548,2187367,
- 2195200,2203047,2210908,2218783,2226672,2234575,2242492,2250423,2258368,2266327,2274300,2282287,2290288,2298303,2306332,2314375,2322432,2330503,2338588,2346687,
- 2354800,2362927,2371068,2379223,2387392,2395575,2403772,2411983,2420208,2428447,2436700,2444967,2453248,2461543,2469852,2478175,2486512,2494863,2503228,2511607,
- 2520000,2528407,2536828,2545263,2553712,2562175,2570652,2579143,2587648,2596167,2604700,2613247,2621808,2630383,2638972,2647575,2656192,2664823,2673468,2682127,
- 2690800,2699487,2708188,2716903,2725632,2734375,2743132,2751903,2760688,2769487,2778300,2787127,2795968,2804823,2813692,2822575,2831472,2840383,2849308,2858247,
- 2867200,2876167,2885148,2894143,2903152,2912175,2921212,2930263,2939328,2948407,2957500,2966607,2975728,2984863,2994012,3003175,3012352,3021543,3030748,3039967,
- 3049200,3058447,3067708,3076983,3086272,3095575,3104892,3114223,3123568,3132927,3142300,3151687,3161088,3170503,3179932,3189375,3198832,3208303,3217788,3227287,
- 3236800,3246327,3255868,3265423,3274992,3284575,3294172,3303783,3313408,3323047,3332700,3342367,3352048,3361743,3371452,3381175,3390912,3400663,3410428,3420207,
- 3430000,3439807,3449628,3459463,3469312,3479175,3489052,3498943,3508848,3518767,3528700,3538647,3548608,3558583,3568572,3578575,3588592,3598623,3608668,3618727,
- 3628800,3638887,3648988,3659103,3669232,3679375,3689532,3699703,3709888,3720087,3730300,3740527,3750768,3761023,3771292,3781575,3791872,3802183,3812508,3822847,
- 3833200,3843567,3853948,3864343,3874752,3885175,3895612,3906063,3916528,3927007,3937500,3948007,3958528,3969063,3979612,3990175,4000752,4011343,4021948,4032567,
- 4043200,4053847,4064508,4075183,4085872,4096575,4107292,4118023,4128768,4139527,4150300,4161087,4171888,4182703,4193532,4204375,4215232,4226103,4236988,4247887,
- 4258800,4269727,4280668,4291623,4302592,4313575,4324572,4335583,4346608,4357647,4368700,4379767,4390848,4401943,4413052,4424175,4435312,4446463,4457628,4468807,
- 4480000,4491207,4502428,4513663,4524912,4536175,4547452,4558743,4570048,4581367,4592700,4604047,4615408,4626783,4638172,4649575,4660992,4672423,4683868,4695327,
- 4706800,4718287,4729788,4741303,4752832,4764375,4775932,4787503,4799088,4810687,4822300,4833927,4845568,4857223,4868892,4880575,4892272,4903983,4915708,4927447,
- 4939200,4950967,4962748,4974543,4986352,4998175,5010012,5021863,5033728,5045607,5057500,5069407,5081328,5093263,5105212,5117175,5129152,5141143,5153148,5165167,
- 5177200,5189247,5201308,5213383,5225472,5237575,5249692,5261823,5273968,5286127,5298300,5310487,5322688,5334903,5347132,5359375,5371632,5383903,5396188,5408487,
- 5420800,5433127,5445468,5457823,5470192,5482575,5494972,5507383,5519808,5532247,5544700,5557167,5569648,5582143,5594652,5607175,5619712,5632263,5644828,5657407,
- 5670000,5682607,5695228,5707863,5720512,5733175,5745852,5758543,5771248,5783967,5796700,5809447,5822208,5834983,5847772,5860575,5873392,5886223,5899068,5911927,
- 5924800,5937687,5950588,5963503,5976432,5989375,6002332,6015303,6028288,6041287,6054300,6067327,6080368,6093423,6106492,6119575,6132672,6145783,6158908,6172047,
- 6185200,6198367,6211548,6224743,6237952,6251175,6264412,6277663,6290928,6304207,6317500,6330807,6344128,6357463,6370812,6384175,6397552,6410943,6424348,6437767,
- 6451200,6464647,6478108,6491583,6505072,6518575,6532092,6545623,6559168,6572727,6586300,6599887,6613488,6627103,6640732,6654375,6668032,6681703,6695388,6709087,
- 6722800,6736527,6750268,6764023,6777792,6791575,6805372,6819183,6833008,6846847,6860700,6874567,6888448,6902343,6916252,6930175,6944112,6958063,6972028,6986007,
- 7000000,7014007,7028028,7042063,7056112,7070175,7084252,7098343,7112448,7126567,7140700,7154847,7169008,7183183,7197372,7211575,7225792,7240023,7254268,7268527,
- 7282800,7297087,7311388,7325703,7340032,7354375,7368732,7383103,7397488,7411887,7426300,7440727,7455168,7469623,7484092,7498575,7513072,7527583,7542108,7556647,
- 7571200,7585767,7600348,7614943,7629552,7644175,7658812,7673463,7688128,7702807,7717500,7732207,7746928,7761663,7776412,7791175,7805952,7820743,7835548,7850367,
- 7865200,7880047,7894908,7909783,7924672,7939575,7954492,7969423,7984368,7999327,8014300,8029287,8044288,8059303,8074332,8089375,8104432,8119503,8134588,8149687,
- 8164800,8179927,8195068,8210223,8225392,8240575,8255772,8270983,8286208,8301447,8316700,8331967,8347248,8362543,8377852,8393175,8408512,8423863,8439228,8454607,
- 8470000,8485407,8500828,8516263,8531712,8547175,8562652,8578143,8593648,8609167,8624700,8640247,8655808,8671383,8686972,8702575,8718192,8733823,8749468,8765127,
- 8780800,8796487,8812188,8827903,8843632,8859375,8875132,8890903,8906688,8922487,8938300,8954127,8969968,8985823,9001692,9017575,9033472,9049383,9065308,9081247,
- 9097200,9113167,9129148,9145143,9161152,9177175,9193212,9209263,9225328,9241407,9257500,9273607,9289728,9305863,9322012,9338175,9354352,9370543,9386748,9402967,
- 9419200,9435447,9451708,9467983,9484272,9500575,9516892,9533223,9549568,9565927,9582300,9598687,9615088,9631503,9647932,9664375,9680832,9697303,9713788,9730287,
- 9746800,9763327,9779868,9796423,9812992,9829575,9846172,9862783,9879408,9896047,9912700,9929367,9946048,9962743,9979452,9996175,10012912,10029663,10046428,10063207,
- 10080000,10096807,10113628,10130463,10147312,10164175,10181052,10197943,10214848,10231767,10248700,10265647,10282608,10299583,10316572,10333575,10350592,10367623,10384668,10401727,
- 10418800,10435887,10452988,10470103,10487232,10504375,10521532,10538703,10555888,10573087,10590300,10607527,10624768,10642023,10659292,10676575,10693872,10711183,10728508,10745847,
- 10763200,10780567,10797948,10815343,10832752,10850175,10867612,10885063,10902528,10920007,10937500,10955007,10972528,10990063,11007612,11025175,11042752,11060343,11077948,11095567,
- 11113200,11130847,11148508,11166183,11183872,11201575,11219292,11237023,11254768,11272527,11290300,11308087,11325888,11343703,11361532,11379375,11397232,11415103,11432988,11450887,
- 11468800,11486727,11504668,11522623,11540592,11558575,11576572,11594583,11612608,11630647,11648700,11666767,11684848,11702943,11721052,11739175,11757312,11775463,11793628,11811807,
- 11830000,11848207,11866428,11884663,11902912,11921175,11939452,11957743,11976048,11994367,12012700,12031047,12049408,12067783,12086172,12104575,12122992,12141423,12159868,12178327,
- 12196800,12215287,12233788,12252303,12270832,12289375,12307932,12326503,12345088,12363687,12382300,12400927,12419568,12438223,12456892,12475575,12494272,12512983,12531708,12550447,
- 12569200,12587967,12606748,12625543,12644352,12663175,12682012,12700863,12719728,12738607,12757500,12776407,12795328,12814263,12833212,12852175,12871152,12890143,12909148,12928167,
- 12947200,12966247,12985308,13004383,13023472,13042575,13061692,13080823,13099968,13119127,13138300,13157487,13176688,13195903,13215132,13234375,13253632,13272903,13292188,13311487,
- 13330800,13350127,13369468,13388823,13408192,13427575,13446972,13466383,13485808,13505247,13524700,13544167,13563648,13583143,13602652,13622175,13641712,13661263,13680828,13700407,
- 13720000,13739607,13759228,13778863,13798512,13818175,13837852,13857543,13877248,13896967,13916700,13936447,13956208,13975983,13995772,14015575,14035392,14055223,14075068,14094927,
- 14114800,14134687,14154588,14174503,14194432,14214375,14234332,14254303,14274288,14294287,14314300,14334327,14354368,14374423,14394492,14414575,14434672,14454783,14474908,14495047,
- 14515200,14535367,14555548,14575743,14595952,14616175,14636412,14656663,14676928,14697207,14717500,14737807,14758128,14778463,14798812,14819175,14839552,14859943,14880348,14900767,
- 14921200,14941647,14962108,14982583,15003072,15023575,15044092,15064623,15085168,15105727,15126300,15146887,15167488,15188103,15208732,15229375,15250032,15270703,15291388,15312087,
- 15332800,15353527,15374268,15395023,15415792,15436575,15457372,15478183,15499008,15519847,15540700,15561567,15582448,15603343,15624252,15645175,15666112,15687063,15708028,15729007};
- new poeni_igraca[33];
- new energija_igraca[33];
- new inteligencija_igraca[33];
- new snaga_igraca[33];
- new Float:smanjene_povrede_igraca[33];
- new kondicija_igraca[33];
- new maximalna_energija_igraca[33];
- new Float:brzina_igraca[33];
- enum { NONE = 0, Snajperista, Marinac, Pro_Strelac, Mitraljezac, Doktor, Vatrena_Podrska, Miner, Demolitions, Rusher, Rambo, Partizan, Spijun, Bombarder, Gunner, Pesadinac, Pobunjenik, Assassin, SWAT, Crysis, Warrior, Super_Miner, Predator, General, Revolveras, Univerzalni_Vojnik, Joker, Cyrax, Jason_Bourne, Hunter, Destroyer, Cetnik, Steven_Seagal, SAS};
- new const energija_klasa[] = { 0, 120, 140, 110, 120, 110, 100, 100, 110, 100, 130, 100, 70, 140, 125, 100, 125, 10, 100, 80, 120, 105, 100, 100, 120, 220, 180, 120, 210, 250, 100, 110, 230, 120};
- new const Float:brzina_klasa[] = {0.0, 1.2, 1.35, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0, 1.3 , 1.15, 1.1, 1.2, 0.9, 0.9, 1.35, 1.2, 2.0, 0.8, 1.35, 0.9, 1.0, 1.1, 1.0, 1.1, 1.1, 0.9, 1.0, 1.1, 1.2, 1.0, 1.0, 1.1, 1.1};
- new const oklop_klase[] = { 0, 100, 100, 100, 150, 100, 0, 100, 100, 0, 150, 0, 0, 150, 50, 0, 25, 100, 0, 100, 100, 100, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100};
- new const naziv_klase[][] = {"Nema",
- "Snajperista",
- "Marinac",
- "Pro-Strelac",
- "Mitraljezac",
- "Doktor",
- "Vatrena podrska",
- "Miner",
- "Demolitions",
- "Rusher",
- "Rambo (Premium)",
- "Partizan",
- "Spijun",
- "Bombarder",
- "Gunner(Premium)",
- "Pesadinac",
- "Pobunjenik",
- "Assassin (Premium)",
- "SWAT",
- "Crysis",
- "Warrior",
- "Super Miner",
- "Predator",
- "General",
- "Revolveras",
- "Univerzalni Vojnik (Premium)",
- "Joker (Premium)",
- "Cyrax",
- "Jason Bourne (Premium)",
- "Hunter (Super)",
- "Destroyer",
- "Cetnik",
- "Steven Seagal (Super)",
- "SAS"
- };
- new const frakcije[][] = {
- "Nema",
- "\yObicne Klase",
- "\yPremium Klase",
- "\ySuper Klase"
- }
- enum {
- NONE = 0,
- obicna,
- premium,
- super
- }
- new const pripada[] = {
- NONE, // Nema 0
- obicna, // Snajperista 1
- obicna, // Marinac 2
- obicna, // Pro Strelac 3
- obicna, // Mitraljezac 4
- obicna, // Doktor 5
- obicna, // Vatrena Podrska 6
- obicna, // Miner 7
- obicna, // Demolitions 8
- obicna, // Rusher 9
- premium, // Rambo (Premium) 10
- obicna, // Partizan 11
- obicna, // Spijun 12
- obicna, // Bomberder 13
- obicna, // Gunner (Premium) 14
- obicna, // Pesadinac 15
- obicna, // Pobunjenik 16
- obicna, // terorista 17
- premium, // Assassin (Premium) 18
- obicna, // SWAT 19
- obicna, // Crysis 20
- obicna, // Warrior 21
- obicna, // Super Miner 22
- obicna, // Predator 23
- obicna, // General 24
- obicna, // Revolveras 25
- premium, // Univerzalni Vojnik (Premium) 26
- premium, // Joker (Premium) 27
- obicna, // Cyrax 28
- premium, // Jason Bourne (Premium) 29
- super, // Hunter (Super) 30
- obicna, // Destroyer 31
- obicna, // Cetnik 32
- super, // Steven Seagal (Super) 33
- obicna, // SAS 34
- }
- new frakcija_igraca[33]
- new const opis_klase[][] = {"Nema",
- "\yOruzije:\w AWP, Deagle, Scout^n\yEnergija:\w 120 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 120%^n\ySpecijalne moci:\w 1:3 sansa za brzo ubijanje nozem",
- "\yOruzije:\w Deagle^n\yEnergija:\w 140 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 135%^n\ySpecijalne moci:\w Odma ubija nozem",
- "\yOruzije:\w AK47, M4A1^n\yEnergija:\w 110 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 80%^n\ySpecijalne moci:\w Nema",
- "\yOruzije:\w M249(krmaca)^n\yEnergija:\w 120 HP^n\yArmor:\w 150 AP^n\yBrzina:\w 80%^n\ySpecijalne moci:\w Otporan na mine, ima sve bombe",
- "\yOruzije:\w UMP45, TMP^n\yEnergija:\w 110 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 100%^n\ySpecijalne moci:\w Ima komplet za prvu pomoc i otporan na noz",
- "\yOruzije:\w MP5^n\yEnergija:\w 100 HP^n\yArmor:\w 0 AP^n\yBrzina:\w 100%^n\ySpecijalne moci:\w Ima dve rakete",
- "\yOruzije:\w P90^n\yEnergija:\w 100 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 100%^n\ySpecijalne moci:\w Dobija 3 mine",
- "\yOruzije:\w AUG^n\yEnergija:\w 110 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 100%^n\ySpecijalne moci:\w Ima sve bombe, dobija dinamit, koji ubija sve u krugu od 1m",
- "\yOruzije:\w M3(pumparica)^n\yEnergija:\w 100 HP^n\yArmor:\w 0 AP^n\yBrzina:\w 130%^n\ySpecijalne moci:\w Nema",
- "\yOruzije:\w FAMAS^n\yEnergija:\w 130 HP^n\yArmor:\w 150 AP^n\yBrzina:\w 115%^n\ySpecijalne moci:\w Za svako ubistvo dobija 20 HP i pun sanzer, dupli skok^n\yKontakt:\w vaske.va08@hotmail.com",
- "\yOruzije:\w P90, FLASHBANG^n\yEnergija:\w 100 HP^n\yArmor:\w 0 AP^n\yBrzina:\w 110%^n\ySpecijalne moci:\w Manje je vidljiv",
- "\yOruzije:\w Deagle^n\yEnergija:\w 70 HP^n\yArmor:\w 0 AP^n\yBrzina:\w 120%^n\ySpecijalne moci:\w Kamuflaza (izgleda kao neprijatelj)",
- "\yOruzije:\w M4A1, Deagle, HE-Grenade^n\yEnergija:\w 140 HP^n\yArmor:\w 150 AP^n\yBrzina:\w 90%^n\ySpecijalne moci:\w Nema",
- "\yOruzije:\w G3/SG-1(rafalni snajper)^n\yEnergija:\w 125 HP^n\yArmor:\w 50 AP^n\yBrzina:\w 90%^n\ySpecijalne moci:\w Ima 1 raketu^n\yKontakt:\w vaske.va08@hotmail.com",
- "\yOruzije:\w GAIL + P228,^n\yEnergija:\w 100 HP^n\yArmor:\w 0 AP^n\yBrzina:\w 135%^n\ySpecijalne moci:\w Nema",
- "\yOruzije:\w SG552, HE-Grenade^n\yEnergija:\w 100 HP^n\yArmor:\w 25 AP^n\yBrzina:\w 120%^n\ySpecijalne moci:\w Ima 1 minu",
- "\yOruzije:\w Noz, USP^n\yEnergija:\w 10 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 200%^n\ySpecijalne moci:\w Nevidljiv kad ima noz^n\yKontakt:\w vaske.va08@hotmail.com",
- "\yOruzije:\w M4a1^n\yEnergija:\w 100 HP^n\yArmor:\w 0 AP^n\yBrzina:\w 80%^n\ySpecijalne moci:\w Otporan na noz",
- "\yOruzije:\w M4a1, Sig 552^n\yEnergija:\w 80 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 135%^n\ySpecijalne moci:\w Ima jednu raketu",
- "\yOruzije:\w FAMAS^n\yEnergija:\w 120 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 90%^n\ySpecijalne moci:\w Nema",
- "\yOruzije:\w P90^n\yEnergija:\w 105 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 100%^n\ySpecijalne moci:\w Ima 5 mina",
- "\yOruzije:\w Deagle^n\yEnergija:\w 100 HP^n\yArmor:\w 50 AP^n\yBrzina:\w 110%^n\ySpecijalne moci:\w Manje je vidljiv i ima jednu raketu i instant nozem",
- "\yOruzije:\w AWP, M4a1, HE^n\yEnergija:\w 100 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 100%^n\ySpecijalne moci:\w Ima 1 / 5 sanse za instant kill AWP-om",
- "\yOruzije:\w Svi pistolji^n\yEnergija:\w 120 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 110%^n\ySpecijalne moci:\w Nema",
- "\yOruzije:\w M4a1^n\yEnergija:\w 220 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 110%^n\ySpecijalne moci:\w Ima Komplet za prvu pomoc i otporan je na noz",
- "\yOruzije:\w M3, XM 1014^n\yEnergija:\w 180 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 90%^n\ySpecijalne moci:\w Ima JetPack, otporan na noz i ima 2 dinamita",
- "\yOruzije:\w AUG, SCOUT, 2FB^n\yEnergija:\w 120 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 100%^n\ySpecijalne moci:\w Ima 1 dinamit",
- "\yOruzije:\w M4a1, TMP, DEAGLE^n\yEnergija:\w 210 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 110%^n\ySpecijalne moci:\w Otporan na noz i ima 1 / 7 sanse za instant sa DEAGLE-om",
- "\yOruzije:\w TMP, AWP^n\yEnergija:\w 250 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 120%^n\ySpecijalne moci:\w Ima 1 / 3 sa AWP, otporan na noz i nevidljiv je kad cuci sa nozem",
- "\yOruzije:\w AK47, DEAGLE^n\yEnergija:\w 100 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 100%^n\ySpecijalne moci:\w Duplo se brze leveluje",
- "\yOruzije:\w Galil^n\yEnergija:\w 110 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 100%^n\ySpecijalne moci:\w Nema",
- "\yOruzije:\w M4a1, TMP^n\yEnergija:\w 230 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 110%^n\ySpecijalne moci:\w Komplet za prvu pomoc, otporan na noz i ima bulletproof",
- "\yOruzije:\w M4a1^n\yEnergija:\w 120 HP^n\yArmor:\w 100 AP^n\yBrzina:\w 110%^n\ySpecijalne moci:\w Nema"
- };
- new broj_medkit_igraca[33];
- new broj_raketa_igraca[33];
- new Float:prethodna_raketa_igraca[33];
- new broj_min_igraca[33];
- new broj_dinamita_igraca[33];
- new broj_skokova_igraca[33];
- new bool:freezetime = true;
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR);
- g_vault = nvault_open("CodMod");
- register_think("MedKit","MedKitThink");
- RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
- RegisterHam(Ham_Spawn, "player", "Pocetak", 1);
- RegisterHam(Ham_Touch, "armoury_entity", "DodirOruzija");
- RegisterHam(Ham_Touch, "weapon_shield", "DodirOruzija");
- RegisterHam(Ham_Touch, "weaponbox", "DodirOruzija");
- register_forward(FM_CmdStart, "CmdStart");
- register_forward(FM_EmitSound, "EmitSound");
- register_logevent("PocetakRunde", 2, "1=Round_Start");
- register_event("DeathMsg", "Death", "ade");
- register_event("Damage", "Damage", "b", "2!=0");
- register_event("CurWeapon","CurWeapon","be", "1=1");
- register_event("HLTV", "novaRunda", "a", "1=0", "2=0");
- register_touch("Rocket", "*" , "DodirRakete");
- register_touch("Mine", "player", "DodirMine");
- cvar_xp_za_ubistvo = register_cvar("cod_killxp", "70");
- register_clcmd("say /klasa", "IzaberiKlasu");
- register_clcmd("say /opis", "OpisKlase");
- register_clcmd("say /predmet", "OpisPredmeta");
- register_clcmd("say /item", "OpisPredmeta");
- register_clcmd("say /drop", "IzbaciPredmet");
- register_clcmd("say /izbaci", "IzbaciPredmet");
- register_clcmd("say /reset", "KomandaResetujPoene");
- register_clcmd("say /shop", "Shop");
- register_clcmd("say /pomoc", "Pomoc");
- register_clcmd("say /help", "Pomoc");
- register_clcmd("fullupdate", "BlokirajKomande");
- g_msg_screenfade = get_user_msgid("ScreenFade");
- SyncHudObj = CreateHudSyncObj();
- SyncHudObj3 = CreateHudSyncObj();
- register_menucmd(register_menuid("Klasa:"), 1023, "OpisKlase");
- iskustvo_za_pare = 400;
- iskustvo_za_mnogopara = 1000;
- format(za_hejtere, 10, "1")
- }
- public plugin_cfg()
- {
- server_cmd("sv_maxspeed 9999");
- }
- public plugin_precache()
- {
- new Entity = create_entity( "info_map_parameters" );
- DispatchKeyValue( Entity, "buying", "3" );
- DispatchSpawn( Entity );
- sprite_white = precache_model("sprites/white.spr") ;
- sprite_blast = precache_model("sprites/dexplo.spr");
- sprite_beam = precache_model("sprites/zbeam4.spr")
- precache_sound("QTM_CodMod/select.wav");
- precache_sound("QTM_CodMod/start.wav");
- precache_sound("QTM_CodMod/start2.wav");
- precache_sound("QTM_CodMod/levelup.wav");
- precache_model("models/w_medkit.mdl");
- precache_model("models/rpgrocket.mdl");
- precache_model("models/mine.mdl");
- }
- public pfn_keyvalue( Entity )
- {
- new ClassName[ 20 ], Dummy[ 2 ];
- copy_keyvalue( ClassName, charsmax( ClassName ), Dummy, charsmax( Dummy ), Dummy, charsmax( Dummy ) );
- if( equal( ClassName, "info_map_parameters" ) )
- {
- remove_entity( Entity );
- return PLUGIN_HANDLED ;
- }
- return PLUGIN_CONTINUE;
- }
- public CmdStart(id, uc_handle)
- {
- if(!is_user_alive(id))
- return FMRES_IGNORED;
- new button = get_uc(uc_handle, UC_Buttons);
- new flags = pev(id, pev_flags);
- if(informacije_predmet_igraca[id][0] == 11 || klasa_igraca[id] == Rambo)
- {
- new oldbutton = pev(id, pev_oldbuttons);
- if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && broj_skokova_igraca[id] > 0)
- {
- broj_skokova_igraca[id]--;
- new Float:velocity[3];
- pev(id, pev_velocity,velocity);
- velocity[2] = random_float(265.0,285.0);
- set_pev(id, pev_velocity,velocity);
- }
- else if(flags & FL_ONGROUND)
- {
- broj_skokova_igraca[id] = 0;
- if(informacije_predmet_igraca[id][0] == 11)
- broj_skokova_igraca[id]++;
- if(klasa_igraca[id] == Rambo)
- broj_skokova_igraca[id]++;
- }
- }
- if(button & IN_ATTACK)
- {
- new Float:punchangle[3];
- if(informacije_predmet_igraca[id][0] == 20)
- set_pev(id, pev_punchangle, punchangle);
- if(informacije_predmet_igraca[id][0] == 23)
- {
- set_pev(id, pev_punchangle, punchangle);
- for(new i=0; i<3;i++)
- punchangle[i]*=0.9;
- set_pev(id, pev_punchangle, punchangle);
- }
- }
- if((informacije_predmet_igraca[id][0] == 33 || klasa_igraca[id] == Hunter) && weapon == CSW_KNIFE)
- {
- if(button & IN_DUCK)
- set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 1);
- else
- set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 255);
- }
- if((informacije_predmet_igraca[id][0] == 28 || klasa_igraca[id] == Joker) && button & IN_JUMP && button & IN_DUCK && flags & FL_ONGROUND && get_gametime() > informacije_predmet_igraca[id][1]+4.0)
- {
- informacije_predmet_igraca[id][1] = floatround(get_gametime());
- new Float:velocity[3];
- VelocityByAim(id, 700, velocity);
- velocity[2] = random_float(265.0,285.0);
- set_pev(id, pev_velocity, velocity);
- }
- return FMRES_IGNORED;
- }
- public Shop(id)
- {
- new menu = menu_create("Shop:", "Shop_Handle");
- menu_additem(menu, "Aspirin \r[Dodaje 50 HP] \yCena: \r3000$");
- menu_additem(menu, "Morfijum \r[Dodaje 100 HP] \yCena: \r5000$");
- menu_additem(menu, "RedBull \r[Veci Skok + Veca Brzina] \yCena: \r7500$");
- menu_additem(menu, "Iskustvo \r[Dodaje 400 XP] \yCena: \r5000$");
- menu_additem(menu, "Super iskustvo \r[Dodaje 1000 XP] \yCena: \r10000$");
- menu_additem(menu, "Slucajni Izbor \r[Predmet] \yCena: \r3000$");
- menu_additem(menu, "Mine \r[Dobijate 2 Mine] \yCena: \r10000$");
- menu_display(id, menu);
- }
- public Shop_Handle(id, menu, item)
- {
- client_cmd(id, "spk QTM_CodMod/select");
- if(item == MENU_EXIT)
- {
- menu_destroy(menu);
- return PLUGIN_CONTINUE;
- }
- menu_display(id, menu);
- new pare_igraca = cs_get_user_money(id);
- new hp = get_user_health(id);
- switch(item)
- {
- case 0:
- {
- new cena = 3000;
- if (pare_igraca<cena)
- {
- ColorChat(id,GREEN,"[Shop] ^1Nemas dovoljno para.");
- return PLUGIN_CONTINUE;
- }
- if(hp >= maximalna_energija_igraca[id] || klasa_igraca[id] == Assassin)
- {
- ColorChat(id,GREEN,"[Shop] ^1Vec imate maximalnu energiju.");
- return PLUGIN_CONTINUE;
- }
- new ammount=50;
- new nova_energija = (hp+ammount<maximalna_energija_igraca[id])? hp+ammount: maximalna_energija_igraca[id];
- set_user_health(id, nova_energija);
- ColorChat(id,GREEN,"[Shop] ^1kupio si ^3Aspirin");
- cs_set_user_money(id, pare_igraca-cena);
- }
- case 1:
- {
- new cena = 5000;
- if (pare_igraca<cena)
- {
- ColorChat(id,GREEN,"[Shop] ^1Nemas dovoljno para.");
- return PLUGIN_CONTINUE;
- }
- if(hp >= maximalna_energija_igraca[id] || klasa_igraca[id] == Assassin)
- {
- ColorChat(id,GREEN,"[Shop] ^1Vec imate maximalnu energiju.");
- return PLUGIN_CONTINUE;
- }
- new ammount=100;
- new nova_energija = (hp+ammount<maximalna_energija_igraca[id])? hp+ammount: maximalna_energija_igraca[id];
- set_user_health(id, nova_energija);
- ColorChat(id,GREEN,"[Shop] ^1Kupio si^3 Morfijum");
- cs_set_user_money(id, pare_igraca-cena);
- }
- case 2:
- {
- new cena = 7500;
- if (pare_igraca<cena)
- {
- ColorChat(id,GREEN,"[Shop] ^1Nemas dovoljno para.");
- return PLUGIN_CONTINUE;
- }
- set_user_gravity(id,get_user_gravity(id) - 0.3);
- set_user_maxspeed(id,get_user_maxspeed(id) + 10.0);
- ColorChat(id,GREEN,"[Shop]^1 Kupio si^3 RedBull");
- cs_set_user_money(id, pare_igraca-cena)
- }
- case 3:
- {
- new cena = 5000;
- if (pare_igraca<cena)
- {
- ColorChat(id,GREEN,"[Shop]^1 Nemas dovoljno para.");
- return PLUGIN_CONTINUE;
- }
- iskustvo_igraca[id] += iskustvo_za_pare;
- ColorChat(id,GREEN,"[Shop] ^1Kupio si ^3Iskustvo");
- cs_set_user_money(id, pare_igraca-cena)
- ProveriNivo(id);
- }
- case 4:
- {
- new cena = 10000;
- if (pare_igraca<cena)
- {
- ColorChat(id,GREEN,"[Shop]^1 Nemas dovoljno para.");
- return PLUGIN_CONTINUE;
- }
- iskustvo_igraca[id] += iskustvo_za_mnogopara;
- ColorChat(id,GREEN,"[Shop]^1Kupio si ^3Super Iskustvo");
- cs_set_user_money(id, pare_igraca-cena)
- ProveriNivo(id);
- }
- case 5:
- {
- new cena = 3000;
- if (pare_igraca<cena)
- {
- ColorChat(id,RED,"[Shop]^1 Nemas dovoljno para!");
- return PLUGIN_CONTINUE;
- }
- cs_set_user_money(id, pare_igraca-cena)
- DajPredmet(id, random_num(1, sizeof naziv_predmeta-1));
- }
- case 6:
- {
- new cena = 10000;
- if (pare_igraca<cena)
- {
- ColorChat(id,RED,"[Shop]^1 Nemas dovoljno para!");
- return PLUGIN_HANDLED;
- }
- else if(klasa_igraca[id] == Vatrena_Podrska || klasa_igraca[id] == Marinac || klasa_igraca[id] == Miner || klasa_igraca[id] == Demolitions || klasa_igraca[id] == Gunner)
- {
- ColorChat(id,GREEN,"[Shop]^1 Vasa klasa ne moze da kupi mine");
- return PLUGIN_CONTINUE;
- }
- broj_min_igraca[id] +=2;
- ColorChat(id,GREEN,"[Shop]^1 Kupio si^3 2 ^1mine");
- cs_set_user_money(id, pare_igraca-cena)
- }
- }
- return PLUGIN_CONTINUE;
- }
- public Pocetak(id)
- {
- if(!is_user_alive(id) || !is_user_connected(id))
- return PLUGIN_CONTINUE;
- if(nova_klasa_igraca[id])
- {
- klasa_igraca[id] = nova_klasa_igraca[id];
- nova_klasa_igraca[id] = 0;
- strip_user_weapons(id);
- give_item(id, "weapon_knife");
- UcitajPodatke(id, klasa_igraca[id]);
- }
- if(!klasa_igraca[id])
- {
- IzaberiKlasu(id);
- return PLUGIN_CONTINUE;
- }
- switch(klasa_igraca[id])
- {
- case Snajperista:
- {
- give_item(id, "weapon_awp");
- give_item(id, "weapon_scout");
- give_item(id, "weapon_deagle");
- }
- case Marinac:
- {
- give_item(id, "weapon_deagle");
- }
- case Pro_Strelac:
- {
- give_item(id, "weapon_m4a1");
- give_item(id, "weapon_ak47");
- }
- case Mitraljezac:
- {
- give_item(id, "weapon_m249");
- give_item(id, "weapon_hegrenade");
- give_item(id, "weapon_flashbang");
- give_item(id, "weapon_smokegrenade");
- }
- case Doktor:
- {
- give_item(id, "weapon_ump45");
- give_item(id, "weapon_tmp");
- broj_medkit_igraca[id] = 2;
- }
- case Vatrena_Podrska:
- {
- give_item(id, "weapon_mp5navy");
- broj_raketa_igraca[id] = 3;
- }
- case Miner:
- {
- give_item(id, "weapon_p90");
- broj_min_igraca[id] = 3;
- }
- case Demolitions:
- {
- give_item(id, "weapon_aug");
- give_item(id, "weapon_hegrenade");
- give_item(id, "weapon_flashbang");
- give_item(id, "weapon_smokegrenade");
- broj_dinamita_igraca[id] = 1;
- }
- case Rusher:
- {
- give_item(id, "weapon_m3");
- }
- case Rambo:
- {
- give_item(id, "weapon_famas");
- }
- case Partizan:
- {
- give_item(id, "weapon_p90");
- give_item(id, "weapon_flashbang");
- set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 70);
- }
- case Spijun:
- {
- give_item(id, "weapon_deagle");
- PromeniModel(id, 0);
- }
- case Bombarder:
- {
- give_item(id, "weapon_m4a1");
- give_item(id, "weapon_deagle");
- give_item(id, "weapon_hegrenade");
- }
- case Gunner:
- {
- give_item(id, "weapon_g3sg1");
- broj_raketa_igraca[id] = 1 ;
- }
- case Pesadinac:
- {
- give_item(id, "weapon_galil");
- give_item(id, "weapon_p228");
- }
- case Pobunjenik:
- {
- give_item(id, "weapon_sg552");
- give_item(id, "weapon_hegrenade");
- broj_min_igraca[id] = 1 ;
- }
- case Assassin:
- {
- give_item(id, "weapon_knife");
- give_item(id, "weapon_usp");
- }
- case SWAT:
- {
- give_item(id, "weapon_m4a1");
- }
- case Crysis:
- {
- give_item(id, "weapon_m4a1");
- give_item(id, "weapon_sg552");
- broj_raketa_igraca[id] = 1;
- }
- case Warrior:
- {
- give_item(id, "weapon_famas");
- }
- case Super_Miner:
- {
- give_item(id, "weapon_p90");
- broj_min_igraca[id] = 5;
- }
- case Predator:
- {
- give_item(id, "weapon_deagle");
- set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 70);
- broj_raketa_igraca[id] = 1 ;
- }
- case General:
- {
- give_item(id, "weapon_awp");
- give_item(id, "weapon_m4a1");
- give_item(id, "weapon_hegrenade");
- }
- case Revolveras:
- {
- give_item(id, "weapon_deagle");
- give_item(id, "weapon_elite");
- give_item(id, "weapon_fiveseven");
- give_item(id, "weapon_glock18");
- give_item(id, "weapon_p228");
- give_item(id, "weapon_usp");
- }
- case Univerzalni_Vojnik:
- {
- give_item(id, "weapon_m4a1");
- }
- case Joker:
- {
- give_item(id, "weapon_m3");
- give_item(id, "weapon_xm1014");
- broj_dinamita_igraca[id] = 2;
- }
- case Cyrax:
- {
- give_item(id, "weapon_aug");
- give_item(id, "weapon_scout");
- give_item(id, "weapon_flashbang");
- give_item(id, "weapon_flashbang");
- broj_dinamita_igraca[id] = 1;
- }
- case Jason_Bourne:
- {
- give_item(id, "weapon_m4a1");
- give_item(id, "weapon_tmp");
- give_item(id, "weapon_deagle");
- }
- case Hunter:
- {
- give_item(id, "weapon_tmp");
- give_item(id, "weapon_awp");
- }
- case Destroyer:
- {
- give_item(id, "weapon_ak47");
- give_item(id, "weapon_deagle");
- }
- case Steven Seagal:
- {
- give_item(id, "weapon_m4a1");
- give_item(id, "weapon_tmp");
- }
- case SAS
- {
- give_item(id, "weapon_m4a1");
- }
- }
- if(poeni_igraca[id]>0)
- DodelaPoena(id);
- if(informacije_predmet_igraca[id][0] == 10 || informacije_predmet_igraca[id][0] == 9)
- give_item(id, "weapon_hegrenade");
- if(informacije_predmet_igraca[id][0] == 9)
- PromeniModel(id, 0);
- if(informacije_predmet_igraca[id][0] == 1)
- set_user_footsteps(id, 1);
- else
- set_user_footsteps(id, 0);
- if(informacije_predmet_igraca[id][0] == 13)
- give_item(id, "weapon_awp");
- if(informacije_predmet_igraca[id][0] == 16)
- give_item(id, "weapon_deagle");
- if(informacije_predmet_igraca[id][0] == 31)
- give_item(id, "weapon_scout");
- if(((informacije_predmet_igraca[id][0] == 19) || (klasa_igraca[id] == Univerzalni_Vojnik) || (klasa_igraca[id] == Steven_Seagal)
- informacije_predmet_igraca[id][1] = 1;
- if((informacije_predmet_igraca[id][0] == 27) || klasa_igraca[id] == Steven_Seagal)
- informacije_predmet_igraca[id][1] = 3;
- if(informacije_predmet_igraca[id][0] == 29)
- set_user_gravity(id,get_user_gravity(id) - 0.4);
- new weapons[32];
- new weaponsnum;
- get_user_weapons(id, weapons, weaponsnum);
- for(new i=0; i<weaponsnum; i++)
- if(is_user_alive(id))
- if(maxAmmo[weapons[i]] > 0)
- cs_set_user_bpammo(id, weapons[i], maxAmmo[weapons[i]]);
- PostaviAtribute(id)
- return PLUGIN_CONTINUE;
- }
- public PostaviAtribute(id)
- {
- smanjene_povrede_igraca[id] = (0.7*(1.0-floatpower(1.1, -0.112311341*float(snaga_igraca[id]))));
- maximalna_energija_igraca[id] = energija_klasa[klasa_igraca[id]]+energija_igraca[id]*2;
- brzina_igraca[id] = STANDARDNA_brzina*brzina_klasa[klasa_igraca[id]]+floatround(kondicija_igraca[id]*1.3);
- if(informacije_predmet_igraca[id][0] == 18 && klasa_igraca[id] != Assassin)
- {
- maximalna_energija_igraca[id] += 100;
- brzina_igraca[id] -= 0.4;
- }
- if(informacije_predmet_igraca[id][0] == 32)
- {
- maximalna_energija_igraca[id] += 200;
- }
- if(informacije_predmet_igraca[id][0] == 25 && klasa_igraca[id] != Assassin)
- {
- maximalna_energija_igraca[id] += 50;
- brzina_igraca[id] -= 0.3;
- }
- if(informacije_predmet_igraca[id][0] == 30)
- {
- brzina_igraca[id] += 1.2;
- }
- set_user_armor(id, oklop_klase[klasa_igraca[id]]);
- if(informacije_predmet_igraca[id][0] == 17)
- set_user_armor(id, 500);
- set_user_health(id, maximalna_energija_igraca[id]);
- if(klasa_igraca[id] == Partizan)
- set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 70);
- else
- set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 255);
- }
- public PocetakRunde()
- {
- freezetime = false;
- for(new id=0;id<=32;id++)
- {
- if(!is_user_alive(id))
- continue;
- set_task(0.1, "PostaviBrzinu", id+ZADATAK_POSTAVI_brzinu);
- switch(get_user_team(id))
- {
- case 1: client_cmd(id, "spk QTM_CodMod/start2");
- case 2: client_cmd(id, "spk QTM_CodMod/start");
- }
- }
- }
- public novaRunda()
- {
- freezetime = true;
- new iEnt = find_ent_by_class(-1, "Mine");
- while(iEnt > 0)
- {
- remove_entity(iEnt);
- iEnt = find_ent_by_class(iEnt, "Mine");
- }
- }
- public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
- {
- if(!is_user_alive(this) || !is_user_connected(this) || informacije_predmet_igraca[this][0] == 24 || !is_user_connected(idattacker) || get_user_team(this) == get_user_team(idattacker) || !klasa_igraca[idattacker])
- return HAM_IGNORED;
- new health = get_user_health(this);
- new weapon = get_user_weapon(idattacker);
- if(health < 2)
- return HAM_IGNORED;
- if((informacije_predmet_igraca[this][0] == 27 && informacije_predmet_igraca[this][1]>0) || klasa_igraca[id] == Steven_Seagal)
- {
- informacije_predmet_igraca[this][1]--;
- return HAM_SUPERCEDE;
- }
- if(snaga_igraca[this]>0)
- damage -= smanjene_povrede_igraca[this]*damage;
- if(informacije_predmet_igraca[this][0] == 2 || informacije_predmet_igraca[this][0] == 3)
- damage-=(float(informacije_predmet_igraca[this][1])<damage)? float(informacije_predmet_igraca[this][1]): damage;
- if(informacije_predmet_igraca[idattacker][0] == 5 && !UTIL_In_FOV(this, idattacker) && UTIL_In_FOV(idattacker, this))
- damage*=2.0;
- if(informacije_predmet_igraca[idattacker][0] == 10)
- damage+=informacije_predmet_igraca[idattacker][1];
- if(informacije_predmet_igraca[this][0] == 12)
- damage-=(5.0<damage)? 5.0: damage;
- if(weapon == CSW_AWP && informacije_predmet_igraca[idattacker][0] == 13)
- damage=float(health);
- if(informacije_predmet_igraca[idattacker][0] == 21)
- damage+=10;
- if(informacije_predmet_igraca[idattacker][0] == 22)
- damage+=20;
- if(idinflictor != idattacker && entity_get_int(idinflictor, EV_INT_movetype) != 5)
- {
- if((informacije_predmet_igraca[idattacker][0] == 9 && random_num(1, informacije_predmet_igraca[idattacker][1]) == 1) || informacije_predmet_igraca[idattacker][0] == 10)
- damage = float(health);
- }
- if(weapon == CSW_KNIFE)
- {
- if(klasa_igraca[idattacker] == Predator)
- damage = float(health);
- if(klasa_igraca[idattacker] == Assassin)
- damage = float(health);
- if(klasa_igraca[this] == SWAT)
- return HAM_SUPERCEDE;
- if(klasa_igraca[this] == Doktor)
- return HAM_SUPERCEDE;
- if(klasa_igraca[this] == Univerzalni_Vojnik)
- return HAM_SUPERCEDE;
- if(klasa_igraca[this] == Joker)
- return HAM_SUPERCEDE;
- if(klasa_igraca[this] == Jason_Bourne)
- return HAM_SUPERCEDE;
- if(klasa_igraca[this] == Hunter)
- return HAM_SUPERCEDE;
- if(klasa_igraca[this] == Steven_Seagal)
- return HAM_SUPERCEDE;
- if(informacije_predmet_igraca[this][0] == 4)
- damage=damage*1.4+inteligencija_igraca[idattacker];
- if(informacije_predmet_igraca[idattacker][0] == 8 || (klasa_igraca[idattacker] == Snajperista && random_num(1,2) == 1) || klasa_igraca[idattacker] == Marinac || klasa_igraca[idattacker] == Assassin && !(get_user_button(idattacker) & IN_ATTACK))
- damage = float(health);
- }
- if(klasa_igraca[idattacker] == General)
- {
- if(weapon == CSW_AWP && !random(5))
- damage = float(health);
- }
- if(klasa_igraca[idattacker] == Hunter)
- {
- if(weapon == CSW_AWP && !random(3))
- damage = float(health);
- }
- if(klasa_igraca[idattacker] == Jason_Bourne)
- {
- if(weapon == CSW_DEAGLE && !random(7))
- damage = float(health);
- }
- if(informacije_predmet_igraca[idattacker][0] == 30)
- {
- if(weapon == CSW_SCOUT && !random(2))
- damage = float(health);
- }
- if(informacije_predmet_igraca[this][0] == 26 && random_num(1, informacije_predmet_igraca[this][1]) == 1)
- {
- SetHamParamEntity(3, this);
- SetHamParamEntity(1, idattacker);
- }
- SetHamParamFloat(4, damage);
- return HAM_IGNORED;
- }
- public Damage(id)
- {
- new attacker = get_user_attacker(id);
- new damage = read_data(2);
- if(!is_user_alive(attacker) || !is_user_connected(attacker) || id == attacker || !klasa_igraca[attacker])
- return PLUGIN_CONTINUE;
- if(informacije_predmet_igraca[attacker][0] == 12 && random_num(1, informacije_predmet_igraca[id][1]) == 1)
- Display_Fade(id,1<<14,1<<14 ,1<<16,255,155,50,230);
- if(get_user_team(id) != get_user_team(attacker))
- {
- while(damage>20)
- {
- damage-=20;
- iskustvo_igraca[attacker]++;
- }
- }
- ProveriNivo(attacker);
- return PLUGIN_CONTINUE;
- }
- public Death()
- {
- new id = read_data(2);
- new attacker = read_data(1);
- if(!is_user_alive(attacker) || !is_user_connected(attacker))
- return PLUGIN_CONTINUE;
- new weapon = get_user_weapon(attacker);
- new energija = get_user_health(attacker);
- if(get_user_team(id) != get_user_team(attacker) && klasa_igraca[attacker])
- {
- new iskustvo_za_ubistvo = get_pcvar_num(cvar_xp_za_ubistvo);
- new novo_iskustvo = get_pcvar_num(cvar_xp_za_ubistvo);
- if(klasa_igraca[id] == Rambo && klasa_igraca[attacker] != Rambo)
- novo_iskustvo += iskustvo_za_ubistvo*2;
- if(klasa_igraca[id] == Destroyer && klasa_igraca[attacker] != Destroyer)
- novo_iskustvo += iskustvo_za_ubistvo*2;
- if(informacije_predmet_igraca[attacker][0] == 34)
- {
- novo_iskustvo += iskustvo_za_ubistvo;
- }
- if(informacije_predmet_igraca[id][0] == 34 && informacije_predmet_igraca[attacker][0] != 34)
- novo_iskustvo += iskustvo_za_ubistvo*2;
- if(level_igraca[id] > level_igraca[attacker])
- novo_iskustvo += (level_igraca[id]-level_igraca[attacker])*(iskustvo_za_ubistvo/10);
- if(klasa_igraca[attacker] == Rambo || informacije_predmet_igraca[attacker][0] == 15 && maxClip[weapon] != -1)
- {
- new nova_energija = (energija+20<maximalna_energija_igraca[attacker])? energija+20: maximalna_energija_igraca[attacker];
- set_user_clip(attacker, maxClip[weapon]);
- set_user_health(attacker, nova_energija);
- }
- #if defined BOTY
- if(is_user_bot2(attacker) && random(9) == 0)
- IzbaciPredmet(id);
- #endif
- if(!informacije_predmet_igraca[attacker][0])
- DajPredmet(attacker, random_num(1, sizeof naziv_predmeta-1));
- if(informacije_predmet_igraca[attacker][0] == 14)
- {
- new nova_energija = (energija+50<maximalna_energija_igraca[attacker])? energija+50: maximalna_energija_igraca[attacker];
- set_user_health(attacker, nova_energija);
- }
- iskustvo_igraca[attacker] += novo_iskustvo;
- }
- ProveriNivo(attacker);
- if(informacije_predmet_igraca[id][0] == 7 && random_num(1, informacije_predmet_igraca[id][1]) == 1)
- set_task(0.1, "Provera", id+ZADATAK_PROVERA);
- return PLUGIN_CONTINUE;
- }
- public client_putinserver(id)
- {
- DeleteSkills(id);
- ObrisiZadatke(id);
- Obrisipredmet(id);
- set_task(3.0, "PokaziInformacije", id+ZADATAK_POKAZI_INFORMACIJE);
- set_task(10.0, "PokaziReklame", id+ZADATAK_POKAZI_REKLAME);
- }
- public client_disconnect(id)
- {
- SacuvajPodatke(id);
- DeleteSkills(id);
- ObrisiZadatke(id);
- Obrisipredmet(id);
- }
- public DeleteSkills(id)
- {
- klasa_igraca[id] = 0;
- level_igraca[id] = 0;
- iskustvo_igraca[id] = 0;
- poeni_igraca[id] = 0;
- energija_igraca[id] = 0;
- inteligencija_igraca[id] = 0;
- snaga_igraca[id] = 0;
- kondicija_igraca[id] = 0;
- maximalna_energija_igraca[id] = 0;
- brzina_igraca[id] = 0.0;
- }
- public ObrisiZadatke(id)
- {
- remove_task(id+ZADATAK_POKAZI_INFORMACIJE);
- remove_task(id+ZADATAK_POKAZI_REKLAME);
- remove_task(id+ZADATAK_POSTAVI_brzinu);
- remove_task(id+ZADATAK_PROVERA);
- }
- public OpisKlase(id)
- {
- new menu = menu_create("Izaberi Klasu:", "OpisKlase_Handle");
- for(new i=1; i <sizeof naziv_klase; i++)
- menu_additem(menu, naziv_klase[i]);
- menu_setprop(menu, MPROP_EXITNAME, "Izlaz");
- menu_setprop(menu, MPROP_BACKNAME, "Prethodna strana");
- menu_setprop(menu, MPROP_NEXTNAME, "Sledeca strana");
- menu_display(id, menu);
- client_cmd(id, "spk QTM_CodMod/select");
- }
- public OpisKlase_Handle(id, menu, item)
- {
- client_cmd(id, "spk QTM_CodMod/select");
- if(item++ == MENU_EXIT)
- {
- menu_destroy(menu);
- return PLUGIN_CONTINUE;
- }
- new opis[512];
- format(opis, charsmax(opis), "\yKlasa: \w%s^n%s", naziv_klase[item], opis_klase[item]);
- show_menu(id, 1023, opis);
- return PLUGIN_CONTINUE;
- }
- public IzaberiKlasu(id)
- {
- new menu = menu_create("\rIzaberi Klase:", "IzaberiFrakciju_Handle");
- for(new i = 1;i<sizeof(frakcije);i++)
- {
- menu_additem(menu, frakcije[i]);
- }
- menu_display(id, menu);
- menu_setprop(menu, MPROP_EXITNAME, "Izadji");
- }
- public IzaberiFrakciju_Handle(id, menu2, item)
- {
- if(item == MENU_EXIT)
- {
- menu_destroy(menu2);
- return PLUGIN_CONTINUE;
- }
- item++;
- frakcija_igraca[id] = item;
- new menu = menu_create("\rIzaberi Klase:", "IzaberiKlasu_Handle");
- new klasa[50];
- for(new i=1; i<sizeof naziv_klase; i++)
- {
- if(pripada[i] == item)
- {
- UcitajPodatke(id, i);
- format(klasa, 49, "\y%s \rLevel: %i", naziv_klase[i], level_igraca[id]);
- menu_additem(menu, klasa);
- }
- }
- UcitajPodatke(id, klasa_igraca[id]);
- menu_setprop(menu, MPROP_EXITNAME, "Izadji");
- menu_setprop(menu, MPROP_BACKNAME, "Predhodna Strana");
- menu_setprop(menu, MPROP_NEXTNAME, "Sledeca Strana");
- menu_display(id, menu);
- client_cmd(id, "spk QTM_CodMod/select");
- return PLUGIN_CONTINUE;
- }
- public IzaberiKlasu_Handle(id, menu, item)
- {
- client_cmd(id, "spk QTM_CodMod/select");
- if(item == MENU_EXIT)
- {
- menu_destroy(menu);
- return PLUGIN_CONTINUE;
- }
- item++;
- new ile = 0;
- for(new i=1; i<sizeof naziv_klase; i++)
- {
- if(pripada[i] == frakcija_igraca[id])
- {
- ile++;
- }
- if(ile == item)
- {
- item = i;
- break;
- }
- }
- if(item == klasa_igraca[id])
- return PLUGIN_CONTINUE;
- if(item == Assassin && !(get_user_flags(id) & ADMIN_LEVEL_A))
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Nemate dozvolu za Premium Klasu.");
- IzaberiKlasu(id);
- return PLUGIN_CONTINUE;
- }
- if(item == Rambo && !(get_user_flags(id) & ADMIN_LEVEL_H))
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Nemate dozvolu za Premium Klasu.");
- IzaberiKlasu(id);
- return PLUGIN_CONTINUE;
- }
- if(item == Gunner && !(get_user_flags(id) & ADMIN_LEVEL_H))
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Nemate dozvolu za Premium Klasu.");
- IzaberiKlasu(id);
- return PLUGIN_CONTINUE;
- }
- if(item == Univerzalni_Vojnik && !(get_user_flags(id) & ADMIN_LEVEL_B))
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Nemate dozvolu za Premium Klasu.");
- IzaberiKlasu(id);
- return PLUGIN_CONTINUE;
- }
- if(item == Joker && !(get_user_flags(id) & ADMIN_LEVEL_C))
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Nemate dozvolu za Premium Klasu.");
- IzaberiKlasu(id);
- return PLUGIN_CONTINUE;
- }
- if(item == Jason_Bourne && !(get_user_flags(id) & ADMIN_LEVEL_D))
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Nemate dozvolu za Premium Klasu.");
- IzaberiKlasu(id);
- return PLUGIN_CONTINUE;
- }
- if(item == Hunter && !(get_user_flags(id) & ADMIN_LEVEL_E))
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Nemate dozvolu za Premium Klasu.");
- IzaberiKlasu(id);
- return PLUGIN_CONTINUE;
- }
- if(klasa_igraca[id])
- {
- nova_klasa_igraca[id] = item;
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Klasa ce biti izmenjena u sledecoj rundi.");
- }
- else
- {
- klasa_igraca[id] = item;
- UcitajPodatke(id, klasa_igraca[id]);
- Pocetak(id);
- }
- return PLUGIN_CONTINUE;
- }
- public DodelaPoena(id)
- {
- new inteligencija[65], inteligencija10[65];
- new energija[60], energija10[60];
- new snaga[60], snaga10[60];
- new kondicija[60], kondicija10[60];
- new naslov[25];
- format(inteligencija, 64, "Inteligencija: \r%i \y(Povecava napad)", inteligencija_igraca[id]);
- format(energija, 59, "Energija: \r%i \y(Povecaca energiju)", energija_igraca[id]);
- format(snaga, 59, "Snaga: \r%i \y(Smanjuje povrede)", snaga_igraca[id]);
- format(kondicija, 59, "Kondicija: \r%i \y(Povecava tempo hodanja)", kondicija_igraca[id]);
- format(inteligencija10, 64, "Dodaj 10 poena na inteligenciju");
- format(energija10, 59, "Dodaj 10 poena na energiju");
- format(snaga10, 59, "Dodaj 10 poena na snagu");
- format(kondicija10, 59, "Dodaj 10 poena na kondiciju");
- format(naslov, 24, "Dodeli poena(%i):", poeni_igraca[id]);
- new menu = menu_create(naslov, "DodelaPoena_Handler");
- menu_additem(menu, inteligencija);
- menu_additem(menu, energija);
- menu_additem(menu, snaga);
- menu_additem(menu, kondicija);
- menu_additem(menu, inteligencija10);
- menu_additem(menu, energija10);
- menu_additem(menu, snaga10);
- menu_additem(menu, kondicija10);
- menu_display(id, menu);
- #if defined BOTY
- if(is_user_bot2(id))
- DodelaPoena_Handler(id, menu, random(4));
- #endif
- }
- public DodelaPoena_Handler(id, menu, item)
- {
- client_cmd(id, "spk QTM_CodMod/select");
- if(item == MENU_EXIT)
- {
- menu_destroy(menu);
- return PLUGIN_CONTINUE;
- }
- if(poeni_igraca[id] < 1)
- return PLUGIN_CONTINUE;
- switch(item)
- {
- case 0:
- {
- if(inteligencija_igraca[id]<4001)
- {
- inteligencija_igraca[id]++;
- poeni_igraca[id]--;
- }
- else
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Dostigli ste maximalni nivo inteligencije");
- }
- case 1:
- {
- if(energija_igraca[id]<4001)
- {
- energija_igraca[id]++;
- poeni_igraca[id]--;
- }
- else
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Dostigli ste maximalni nivo energije");
- }
- case 2:
- {
- if(snaga_igraca[id]<4001)
- {
- snaga_igraca[id]++;
- poeni_igraca[id]--;
- }
- else
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Dostigli ste maximalni nivo snage");
- }
- case 3:
- {
- if(kondicija_igraca[id]<4001)
- {
- kondicija_igraca[id]++;
- poeni_igraca[id]--;
- }
- else
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Dostigli ste maximalni nivo kondicije");
- }
- case 4:
- {
- if(poeni_igraca[id] < 10)
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Nemate dovoljno poena");
- }
- else if(inteligencija_igraca[id]<4001)
- {
- inteligencija_igraca[id]+=10;
- poeni_igraca[id]-=10
- }
- else
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Dostigli ste maximalni nivo inteligencije");
- }
- case 5:
- {
- if(poeni_igraca[id] < 10)
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Nemate dovoljno poena");
- }
- else if(energija_igraca[id]<4001)
- {
- energija_igraca[id]+=10;
- poeni_igraca[id]-=10;
- }
- else
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Dostigli ste maximalni nivo energije");
- }
- case 6:
- {
- if(poeni_igraca[id] < 10)
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Nemate dovoljno poena");
- }
- else if(snaga_igraca[id]<4001)
- {
- snaga_igraca[id]+=10;
- poeni_igraca[id]-=10;
- }
- else
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Dostigli ste maximalni nivo snage");
- }
- case 7:
- {
- if(poeni_igraca[id] < 10)
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Nemate dovoljno poena");
- }
- else if(kondicija_igraca[id]<4001)
- {
- kondicija_igraca[id]+=10;
- poeni_igraca[id]-=10;
- }
- else
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Dostigli ste maximalni nivo kondicije");
- }
- }
- if(poeni_igraca[id]>0)
- DodelaPoena(id);
- return PLUGIN_CONTINUE;
- }
- public KomandaResetujPoene(id)
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Poeni su resetovani");
- client_cmd(id, "spk QTM_CodMod/select");
- ResetujPoene(id)
- }
- public ResetujPoene(id)
- {
- poeni_igraca[id] = level_igraca[id]*2-2;
- inteligencija_igraca[id] = 0;
- energija_igraca[id] = 0;
- kondicija_igraca[id] = 0;
- snaga_igraca[id] = 0;
- if(poeni_igraca[id])
- DodelaPoena(id);
- }
- public KreirajMedKit(id)
- {
- if (!broj_medkit_igraca[id])
- {
- client_print(id, print_center, "Imate samo 2 paketa za prvu pomoc u jednoj rundi!");
- return PLUGIN_CONTINUE;
- }
- if(inteligencija_igraca[id] < 1)
- client_print(id, print_center, "Da koristite paket za prvu pomoc, morate povecati inteligenciju");
- broj_medkit_igraca[id]--;
- new Float:origin[3];
- entity_get_vector(id, EV_VEC_origin, origin);
- new ent = create_entity("info_target");
- entity_set_string(ent, EV_SZ_classname, "MedKit");
- entity_set_edict(ent, EV_ENT_owner, id);
- entity_set_int(ent, EV_INT_solid, SOLID_NOT);
- entity_set_vector(ent, EV_VEC_origin, origin);
- entity_set_float(ent, EV_FL_ltime, halflife_time() + 7 + 0.1);
- entity_set_model(ent, "models/w_medkit.mdl");
- set_rendering ( ent, kRenderFxGlowShell, 255,0,0, kRenderFxNone, 255 ) ;
- drop_to_floor(ent);
- entity_set_float(ent, EV_FL_nextthink, halflife_time() + 0.1);
- return PLUGIN_CONTINUE;
- }
- public MedKitThink(ent)
- {
- new id = entity_get_edict(ent, EV_ENT_owner);
- new totem_dist = 300;
- new totem_heal = 5+floatround(inteligencija_igraca[id]*0.5);
- if (entity_get_edict(ent, EV_ENT_euser2) == 1)
- {
- new Float:forigin[3], origin[3];
- entity_get_vector(ent, EV_VEC_origin, forigin);
- FVecIVec(forigin,origin);
- new entlist[33];
- new numfound = find_sphere_class(0,"player",totem_dist+0.0,entlist, 32,forigin);
- for (new i=0; i < numfound; i++)
- {
- new pid = entlist[i];
- if (get_user_team(pid) != get_user_team(id))
- continue;
- new energija = get_user_health(pid);
- new nova_energija = (energija+totem_heal<maximalna_energija_igraca[pid])?energija+totem_heal:maximalna_energija_igraca[pid];
- if (is_user_alive(pid)) set_user_health(pid, nova_energija);
- }
- entity_set_edict(ent, EV_ENT_euser2, 0);
- entity_set_float(ent, EV_FL_nextthink, halflife_time() + 1.5);
- return PLUGIN_CONTINUE;
- }
- if (entity_get_float(ent, EV_FL_ltime) < halflife_time() || !is_user_alive(id))
- {
- remove_entity(ent);
- return PLUGIN_CONTINUE;
- }
- if (entity_get_float(ent, EV_FL_ltime)-2.0 < halflife_time())
- set_rendering ( ent, kRenderFxNone, 255,255,255, kRenderTransAlpha, 100 ) ;
- new Float:forigin[3], origin[3];
- entity_get_vector(ent, EV_VEC_origin, forigin);
- FVecIVec(forigin,origin);
- //Find people near and give them health
- message_begin( MSG_BROADCAST, SVC_TEMPENTITY, origin );
- write_byte( TE_BEAMCYLINDER );
- write_coord( origin[0] );
- write_coord( origin[1] );
- write_coord( origin[2] );
- write_coord( origin[0] );
- write_coord( origin[1] + totem_dist );
- write_coord( origin[2] + totem_dist );
- write_short( sprite_white );
- write_byte( 0 ); // startframe
- write_byte( 0 ); // framerate
- write_byte( 10 ); // life
- write_byte( 10 ); // width
- write_byte( 255 ); // noise
- write_byte( 255 ); // r, g, b
- write_byte( 100 );// r, g, b
- write_byte( 100 ); // r, g, b
- write_byte( 128 ); // brightness
- write_byte( 5 ); // speed
- message_end();
- entity_set_edict(ent, EV_ENT_euser2 ,1);
- entity_set_float(ent, EV_FL_nextthink, halflife_time() + 0.5);
- return PLUGIN_CONTINUE;
- }
- public KreirajRakete(id)
- {
- if (!broj_raketa_igraca[id])
- {
- client_print(id, print_center, "Vec ste iskoristili sve rakete!");
- return PLUGIN_CONTINUE;
- }
- if(prethodna_raketa_igraca[id] + 2.0 > get_gametime())
- {
- client_print(id, print_center, "Mozate da koristite raketu za 2 sekunde!");
- return PLUGIN_CONTINUE;
- }
- if (is_user_alive(id))
- {
- if(inteligencija_igraca[id] < 1)
- client_print(id, print_center, "Da koristite rakete, morate povecati inteligenciju!");
- prethodna_raketa_igraca[id] = get_gametime();
- broj_raketa_igraca[id]--;
- new Float: Origin[3], Float: vAngle[3], Float: Velocity[3];
- entity_get_vector(id, EV_VEC_v_angle, vAngle);
- entity_get_vector(id, EV_VEC_origin , Origin);
- new Ent = create_entity("info_target");
- entity_set_string(Ent, EV_SZ_classname, "Rocket");
- entity_set_model(Ent, "models/rpgrocket.mdl");
- vAngle[0] *= -1.0;
- entity_set_origin(Ent, Origin);
- entity_set_vector(Ent, EV_VEC_angles, vAngle);
- entity_set_int(Ent, EV_INT_effects, 2);
- entity_set_int(Ent, EV_INT_solid, SOLID_BBOX);
- entity_set_int(Ent, EV_INT_movetype, MOVETYPE_FLY);
- entity_set_edict(Ent, EV_ENT_owner, id);
- VelocityByAim(id, 1000 , Velocity);
- entity_set_vector(Ent, EV_VEC_velocity ,Velocity);
- message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
- write_byte(22)
- write_short(Ent)
- write_short(sprite_beam)
- write_byte(45)
- write_byte(4)
- write_byte(255)
- write_byte(105)
- write_byte(180)
- write_byte(25)
- message_end()
- }
- return PLUGIN_CONTINUE;
- }
- public KreirajDinamit(id)
- {
- if(!broj_dinamita_igraca[id])
- {
- client_print(id, print_center, "Vec ste iskoristili sav dinamit!");
- return PLUGIN_CONTINUE;
- }
- if(inteligencija_igraca[id] < 1)
- client_print(id, print_center, "Da koristite dinamit, morate povecati inteligenciju!");
- broj_dinamita_igraca[id]--;
- new Float:fOrigin[3];
- entity_get_vector(id, EV_VEC_origin, fOrigin);
- new iOrigin[3];
- for(new i=0;i<3;i++)
- iOrigin[i] = floatround(fOrigin[i]);
- message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin);
- write_byte(TE_EXPLOSION);
- write_coord(iOrigin[0]);
- write_coord(iOrigin[1]);
- write_coord(iOrigin[2]);
- write_short(sprite_blast);
- write_byte(32);
- write_byte(20);
- write_byte(0);
- message_end();
- message_begin( MSG_BROADCAST, SVC_TEMPENTITY, iOrigin );
- write_byte( TE_BEAMCYLINDER );
- write_coord( iOrigin[0] );
- write_coord( iOrigin[1] );
- write_coord( iOrigin[2] );
- write_coord( iOrigin[0] );
- write_coord( iOrigin[1] + 300 );
- write_coord( iOrigin[2] + 300 );
- write_short( sprite_white );
- write_byte( 0 ); // startframe
- write_byte( 0 ); // framerate
- write_byte( 10 ); // life
- write_byte( 10 ); // width
- write_byte( 255 ); // noise
- write_byte( 255 ); // r, g, b
- write_byte( 100 );// r, g, b
- write_byte( 100 ); // r, g, b
- write_byte( 128 ); // brightness
- write_byte( 8 ); // speed
- message_end();
- new entlist[33];
- new numfound = find_sphere_class(id, "player", 300.0 , entlist, 32);
- for (new i=0; i < numfound; i++)
- {
- new pid = entlist[i];
- if (!is_user_alive(pid) || get_user_team(id) == get_user_team(pid) || informacije_predmet_igraca[pid][0] == 24)
- continue;
- ExecuteHam(Ham_TakeDamage, pid, 0, id, 90.0+float(inteligencija_igraca[id]) , 1);
- }
- return PLUGIN_CONTINUE;
- }
- public PostaviMine(id)
- {
- if (!broj_min_igraca[id])
- {
- client_print(id, print_center, "Vec ste iskoristili sve mine!");
- return PLUGIN_CONTINUE;
- }
- if(inteligencija_igraca[id] < 1)
- client_print(id, print_center, "Da koristite mine, morate povecati inteligenciju!");
- broj_min_igraca[id]--;
- new Float:origin[3];
- entity_get_vector(id, EV_VEC_origin, origin);
- new ent = create_entity("info_target");
- entity_set_string(ent ,EV_SZ_classname, "Mine");
- entity_set_edict(ent ,EV_ENT_owner, id);
- entity_set_int(ent, EV_INT_movetype, MOVETYPE_TOSS);
- entity_set_origin(ent, origin);
- entity_set_int(ent, EV_INT_solid, SOLID_BBOX);
- entity_set_model(ent, "models/mine.mdl");
- entity_set_size(ent,Float:{-16.0,-16.0,0.0},Float:{16.0,16.0,2.0});
- drop_to_floor(ent);
- entity_set_float(ent,EV_FL_nextthink,halflife_time() + 0.01) ;
- set_rendering(ent,kRenderFxNone, 0,0,0, kRenderTransTexture,50) ;
- return PLUGIN_CONTINUE;
- }
- public DodirMine(ent, id)
- {
- new attacker = entity_get_edict(ent, EV_ENT_owner);
- if (get_user_team(attacker) != get_user_team(id))
- {
- new Float:fOrigin[3];
- entity_get_vector( ent, EV_VEC_origin, fOrigin);
- new iOrigin[3];
- for(new i=0;i<3;i++)
- iOrigin[i] = floatround(fOrigin[i]);
- message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin);
- write_byte(TE_EXPLOSION);
- write_coord(iOrigin[0]);
- write_coord(iOrigin[1]);
- write_coord(iOrigin[2]);
- write_short(sprite_blast);
- write_byte(32); // scale
- write_byte(20); // framerate
- write_byte(0);// flags
- message_end();
- new entlist[33];
- new numfound = find_sphere_class(ent,"player", 90.0 ,entlist, 32);
- for (new i=0; i < numfound; i++)
- {
- new pid = entlist[i];
- if (!is_user_alive(pid) || get_user_team(attacker) == get_user_team(pid) || informacije_predmet_igraca[pid][0] == 24 || klasa_igraca[id] == Mitraljezac)
- continue;
- ExecuteHam(Ham_TakeDamage, pid, ent, attacker, 90.0+float(inteligencija_igraca[attacker]) , 1);
- }
- remove_entity(ent);
- }
- }
- public DodirRakete(ent)
- {
- if ( !is_valid_ent(ent))
- return;
- new attacker = entity_get_edict(ent, EV_ENT_owner);
- new Float:fOrigin[3];
- entity_get_vector(ent, EV_VEC_origin, fOrigin);
- new iOrigin[3];
- for(new i=0;i<3;i++)
- iOrigin[i] = floatround(fOrigin[i]);
- message_begin(MSG_BROADCAST,SVC_TEMPENTITY, iOrigin);
- write_byte(TE_EXPLOSION);
- write_coord(iOrigin[0]);
- write_coord(iOrigin[1]);
- write_coord(iOrigin[2]);
- write_short(sprite_blast);
- write_byte(32); // scale
- write_byte(20); // framerate
- write_byte(0);// flags
- message_end();
- new entlist[33];
- new numfound = find_sphere_class(ent, "player", 230.0, entlist, 32);
- for (new i=0; i < numfound; i++)
- {
- new pid = entlist[i];
- if (!is_user_alive(pid) || get_user_team(attacker) == get_user_team(pid) || informacije_predmet_igraca[pid][0] == 24)
- continue;
- ExecuteHam(Ham_TakeDamage, pid, ent, attacker, 55.0+float(inteligencija_igraca[attacker]) , 1);
- }
- remove_entity(ent);
- }
- public CurWeapon(id)
- {
- if(freezetime || !klasa_igraca[id])
- return PLUGIN_CONTINUE;
- new weapon = get_user_weapon(id);
- if(klasa_igraca[id] == Assassin && weapon == CSW_KNIFE)
- set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 10);
- else if(klasa_igraca[id] == Assassin && weapon != CSW_KNIFE)
- set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 255);
- if(informacije_predmet_igraca[id][0] == 35 && weapon == CSW_KNIFE)
- set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 10);
- else if(informacije_predmet_igraca[id][0] == 35 && weapon != CSW_KNIFE)
- set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 255);
- new weapons[32];
- new weaponsnum;
- get_user_weapons(id, weapons, weaponsnum);
- for(new i=0; i<weaponsnum; i++)
- if(is_user_alive(id))
- if(maxAmmo[weapons[i]] > 0)
- cs_set_user_bpammo(id, weapons[i], maxAmmo[weapons[i]]);
- PostaviBrzinu(id);
- return PLUGIN_CONTINUE;
- }
- public EmitSound(id, iChannel, szSound[], Float:fVol, Float:fAttn, iFlags, iPitch )
- {
- if(!is_user_alive(id))
- return FMRES_IGNORED;
- if(equal(szSound, "common/wpn_denyselect.wav"))
- {
- KoristiPredmet(id);
- return FMRES_SUPERCEDE;
- }
- return FMRES_IGNORED;
- }
- public KoristiPredmet(id)
- {
- if((informacije_predmet_igraca[id][0] == 19 && informacije_predmet_igraca[id][1]>0) || (klasa_igraca[id] == Univerzalni_Vojnik) || (klasa_igraca[id] == Steven_Seagal)
- {
- set_user_health(id, maximalna_energija_igraca[id]);
- informacije_predmet_igraca[id][1]--;
- }
- if(broj_medkit_igraca[id]>0)
- KreirajMedKit(id);
- if(broj_raketa_igraca[id]>0)
- KreirajRakete(id);
- if(broj_min_igraca[id]>0)
- PostaviMine(id);
- if(broj_dinamita_igraca[id]>0)
- KreirajDinamit(id);
- return PLUGIN_HANDLED;
- }
- public SacuvajPodatke(id)
- {
- if(!klasa_igraca[id])
- return PLUGIN_CONTINUE;
- new vaultkey[128],vaultdata[256], ID_igraca[64];
- format(vaultdata, charsmax(vaultdata),"#%i#%i#%i#%i#%i#%i", iskustvo_igraca[id], level_igraca[id], inteligencija_igraca[id], energija_igraca[id], snaga_igraca[id], kondicija_igraca[id]);
- get_user_authid(id, ID_igraca, charsmax(ID_igraca))
- format(vaultkey, charsmax(vaultkey),"%s-%i-cod", ID_igraca, klasa_igraca[id]);
- nvault_set(g_vault,vaultkey,vaultdata);
- return PLUGIN_CONTINUE;
- }
- public UcitajPodatke(id, klasa)
- {
- new vaultkey[128],vaultdata[256], ID_igraca[64];
- get_user_authid(id, ID_igraca, charsmax(ID_igraca))
- format(vaultkey, charsmax(vaultkey),"%s-%i-cod", ID_igraca, klasa);
- nvault_get(g_vault,vaultkey,vaultdata,255);
- replace_all(vaultdata, 255, "#", " ");
- new playerdata[6][32];
- parse(vaultdata, playerdata[0], 31, playerdata[1], 31, playerdata[2], 31, playerdata[3], 31, playerdata[4], 31, playerdata[5], 31);
- iskustvo_igraca[id] = str_to_num(playerdata[0]);
- level_igraca[id] = str_to_num(playerdata[1])>0?str_to_num(playerdata[1]):1;
- inteligencija_igraca[id] = str_to_num(playerdata[2]);
- energija_igraca[id] = str_to_num(playerdata[3]);
- snaga_igraca[id] = str_to_num(playerdata[4]);
- kondicija_igraca[id] = str_to_num(playerdata[5]);
- poeni_igraca[id] = (level_igraca[id]-1)*2-inteligencija_igraca[id]-energija_igraca[id]-snaga_igraca[id]-kondicija_igraca[id];
- return PLUGIN_CONTINUE;
- }
- public IzbaciPredmet(id)
- {
- if(informacije_predmet_igraca[id][0])
- {
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Bacio si ^3%s.", naziv_predmeta[informacije_predmet_igraca[id][0]]);
- Obrisipredmet(id);
- }
- else
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Nemate nijedan predmet.", naziv_predmeta[informacije_predmet_igraca[id][0]]);
- }
- public Obrisipredmet(id)
- {
- informacije_predmet_igraca[id][0] = 0;
- informacije_predmet_igraca[id][1] = 0;
- if(is_user_alive(id))
- {
- set_user_footsteps(id, 0);
- set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 255);
- PromeniModel(id, 1);
- }
- }
- public DajPredmet(id, predmet)
- {
- Obrisipredmet(id);
- informacije_predmet_igraca[id][0] = predmet;
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Dobio si ^3%s.", naziv_predmeta[informacije_predmet_igraca[id][0]]);
- switch(predmet)
- {
- case 1:
- {
- set_user_footsteps(id, 1);
- }
- case 2:
- {
- informacije_predmet_igraca[id][1] = random_num(3,6);
- }
- case 3:
- {
- informacije_predmet_igraca[id][1] = random_num(6, 11);
- }
- case 5:
- {
- informacije_predmet_igraca[id][1] = random_num(6, 9);
- }
- case 6:
- {
- if(klasa_igraca[id] == Partizan || klasa_igraca[id] == Assassin )
- {
- DajPredmet(id, random_num(1, sizeof naziv_predmeta-1));
- }
- else
- {
- informacije_predmet_igraca[id][1] = random_num(100, 150);
- set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, informacije_predmet_igraca[id][1]);
- }
- }
- case 7:
- {
- informacije_predmet_igraca[id][1] = random_num(2, 4);
- }
- case 8:
- {
- if(klasa_igraca[id] == Marinac || klasa_igraca[id] == Assassin)
- DajPredmet(id, random_num(1, sizeof naziv_predmeta-1));
- }
- case 9:
- {
- informacije_predmet_igraca[id][1] = random_num(1, 3);
- PromeniModel(id, 0);
- give_item(id, "weapon_hegrenade");
- }
- case 10:
- {
- informacije_predmet_igraca[id][1] = random_num(4, 8);
- give_item(id, "weapon_hegrenade");
- }
- case 12:
- {
- informacije_predmet_igraca[id][1] = random_num(1, 4);
- }
- case 13:
- {
- give_item(id, "weapon_awp");
- }
- case 15:
- {
- if(klasa_igraca[id] == Rambo)
- DajPredmet(id, random_num(1, sizeof naziv_predmeta-1));
- }
- case 19:
- {
- informacije_predmet_igraca[id][1] = 1;
- }
- case 26:
- {
- informacije_predmet_igraca[id][1] = random_num(3, 6);
- }
- case 27:
- {
- informacije_predmet_igraca[id][1] = 3;
- }
- case 31:
- {
- give_item(id, "weapon_scout");
- }
- }
- }
- public OpisPredmeta(id)
- {
- new opis_predmeta[128];
- new slucajne_vrednosti[3];
- num_to_str(informacije_predmet_igraca[id][1], slucajne_vrednosti, 2);
- format(opis_predmeta, 127, opis_predmet[informacije_predmet_igraca[id][0]]);
- replace_all(opis_predmeta, 127, "LW", slucajne_vrednosti);
- ColorChat(id, NORMAL, "^4Predmet: ^1%s.", naziv_predmeta[informacije_predmet_igraca[id][0]]);
- ColorChat(id, NORMAL, "^4Opis: ^1%s.", opis_predmeta);
- }
- public Provera(id)
- {
- id-=ZADATAK_PROVERA;
- ExecuteHamB(Ham_CS_RoundRespawn, id);
- }
- public ProveriNivo(id)
- {
- if(level_igraca[id] < 1200)
- {
- while(iskustvo_igraca[id] >= iskustvo_levelu[level_igraca[id]])
- {
- level_igraca[id]++;
- set_hudmessage(60, 200, 25, -1.0, 0.25, 0, 1.0, 2.0, 0.1, 0.2, 2);
- ShowSyncHudMsg(id, SyncHudObj3, "Dobrodosao na %i level!", level_igraca[id]);
- client_cmd(id, "spk QTM_CodMod/levelup");
- }
- poeni_igraca[id] = (level_igraca[id]-1)*2-inteligencija_igraca[id]-energija_igraca[id]-snaga_igraca[id]-kondicija_igraca[id];
- }
- SacuvajPodatke(id);
- }
- public PokaziInformacije(id)
- {
- id -= ZADATAK_POKAZI_INFORMACIJE;
- set_task(0.1, "PokaziInformacije", id+ZADATAK_POKAZI_INFORMACIJE);
- if(is_user_connected(id) && !is_user_alive(id))
- {
- new target = entity_get_int(id, EV_INT_iuser2);
- if(!target)
- return PLUGIN_CONTINUE;
- set_hudmessage(255, 255, 255, 0.6, -1.0, 0, 0.0, 0.3, 0.0, 0.0, 2);
- ShowSyncHudMsg(id, SyncHudObj, "Klasa : %s^nIskustvo : %i / %i^nLevel : %i^nPredmet : %s^nEnergija %d", naziv_klase[klasa_igraca[target]], iskustvo_igraca[target], iskustvo_levelu[level_igraca[target]], level_igraca[target], naziv_predmeta[informacije_predmet_igraca[target][0]], get_user_health(target));
- return PLUGIN_CONTINUE;
- }
- set_hudmessage(0, 255, 0, 0.02, 0.23, 0, 0.0, 0.3, 0.0, 0.0, -1);
- ShowSyncHudMsg(id, SyncHudObj, "[Klasa : %s]^n[Iskustvo : %i / %i]^n[Level : %i]^n[Predmet : %s]^n[Energija: %d]", naziv_klase[klasa_igraca[id]], iskustvo_igraca[id], iskustvo_levelu[level_igraca[id]], level_igraca[id], naziv_predmeta[informacije_predmet_igraca[id][0]], get_user_health(id));
- return PLUGIN_CONTINUE;
- }
- public PokaziReklame(id)
- {
- id-=ZADATAK_POKAZI_REKLAME;
- ColorChat(id, NORMAL, "^4[COD:MW] ^1Za vise informacija kucajte ^3/pomoc.");
- }
- public Pomoc(id)
- show_menu(id, 1023, "\y/reset\w - Resetuje poene^n\y/klasa\w - Promeni klasu^n\y/drop\w - Izbaci predmet^n\y/perk\w - Pokazuje opis vaseg predmeta^n\y/opis\w - Pokazuje opis klase^n\y+use\w - Koristi specijalne moci klase", -1, "Pomoc");
- public PostaviBrzinu(id)
- {
- id -= id>32? ZADATAK_POSTAVI_brzinu: 0;
- if(klasa_igraca[id])
- set_user_maxspeed(id, brzina_igraca[id]);
- }
- public PromeniModel(id,reset)
- {
- if (id<1 || id>32 || !is_user_connected(id))
- return PLUGIN_CONTINUE;
- if (reset)
- cs_reset_user_model(id);
- else
- {
- new num = random_num(0,3);
- switch(get_user_team(id))
- {
- case 1: cs_set_user_model(id, Ubrania_CT[num]);
- case 2:cs_set_user_model(id, Ubrania_Terro[num]);
- }
- }
- return PLUGIN_CONTINUE;
- }
- public DodirOruzija(weapon,id)
- {
- if(!is_user_connected(id))
- return HAM_IGNORED;
- new model[23];
- pev(weapon, pev_model, model, 22);
- if (pev(weapon, pev_owner) == id || containi(model, "w_backpack") != -1)
- return HAM_IGNORED;
- return HAM_SUPERCEDE;
- }
- stock bool:UTIL_In_FOV(id,target)
- {
- if (Find_Angle(id,target,9999.9) > 0.0)
- return true;
- return false;
- }
- #if defined BOTY
- public is_user_bot2(id)
- {
- new ping, loss
- get_user_ping(id, ping, loss)
- if(ping > 0 && loss > 0)
- return false
- return true
- }
- #endif
- stock Float:Find_Angle(Core,Target,Float:dist)
- {
- new Float:vec2LOS[2];
- new Float:flDot;
- new Float:CoreOrigin[3];
- new Float:TargetOrigin[3];
- new Float:CoreAngles[3];
- pev(Core,pev_origin,CoreOrigin);
- pev(Target,pev_origin,TargetOrigin);
- if (get_distance_f(CoreOrigin,TargetOrigin) > dist)
- return 0.0;
- pev(Core,pev_angles, CoreAngles);
- for ( new i = 0; i < 2; i++ )
- vec2LOS[i] = TargetOrigin[i] - CoreOrigin[i];
- new Float:veclength = Vec2DLength(vec2LOS);
- //Normalize V2LOS
- if (veclength <= 0.0)
- {
- vec2LOS[0] = 0.0;
- vec2LOS[1] = 0.0;
- }
- else
- {
- new Float:flLen = 1.0 / veclength;
- vec2LOS[0] = vec2LOS[0]*flLen;
- vec2LOS[1] = vec2LOS[1]*flLen;
- }
- //Do a makevector to make v_forward right
- engfunc(EngFunc_MakeVectors,CoreAngles);
- new Float:v_forward[3];
- new Float:v_forward2D[2];
- get_global_vector(GL_v_forward, v_forward);
- v_forward2D[0] = v_forward[0];
- v_forward2D[1] = v_forward[1];
- flDot = vec2LOS[0]*v_forward2D[0]+vec2LOS[1]*v_forward2D[1];
- if ( flDot > 0.5 )
- {
- return flDot;
- }
- return 0.0;
- }
- stock Float:Vec2DLength( Float:Vec[2] )
- {
- return floatsqroot(Vec[0]*Vec[0] + Vec[1]*Vec[1] );
- }
- stock Display_Fade(id,duration,holdtime,fadetype,red,green,blue,alpha)
- {
- message_begin( MSG_ONE, g_msg_screenfade,{0,0,0},id );
- write_short( duration ); // Duration of fadeout
- write_short( holdtime ); // Hold time of color
- write_short( fadetype ); // Fade type
- write_byte ( red ); // Red
- write_byte ( green ); // Green
- write_byte ( blue ); // Blue
- write_byte ( alpha ); // Alpha
- message_end();
- }
- stock set_user_clip(id, ammo)
- {
- new weaponname[32], weaponid = -1, weapon = get_user_weapon(id, _, _);
- get_weaponname(weapon, weaponname, 31);
- while ((weaponid = find_ent_by_class(weaponid, weaponname)) != 0)
- if(entity_get_edict(weaponid, EV_ENT_owner) == id)
- {
- set_pdata_int(weaponid, 51, ammo, 4);
- return weaponid;
- }
- return 0;
- }
- public BlokirajKomande()
- return PLUGIN_HANDLED;
- public plugin_end()
- nvault_close( g_vault )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement