hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.03.29. 11:42



Jelenlévő felhasználók

Jelenleg 325 felhasználó van jelen :: 0 regisztrált, 0 rejtett és 325 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: nincs regisztrált felhasználó az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 4 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Fegyver csik, masik szinnel
HozzászólásElküldve: 2013.10.13. 17:30 
Offline
Beavatott

Csatlakozott: 2013.08.02. 14:53
Hozzászólások: 91
Megköszönt másnak: 16 alkalommal
Megköszönték neki: 3 alkalommal
Hello ugye van ez a fegyo csik:
http://amxmodx.crys.hu/site/?p=pluginz&c=l&f=tracerfire

Hogy lehet azt beallitani hogy: kék csikott huzzon? Vagyis mi a cvar? :D


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Fegyver csik, masik szinnel
HozzászólásElküldve: 2013.10.13. 17:41 
Offline
Fanatikus
Avatar

Csatlakozott: 2013.03.23. 14:55
Hozzászólások: 162
Megköszönt másnak: 2 alkalommal
Megköszönték neki: 27 alkalommal
cvar:
amx_tracers_colors 0 0 255

R G B
RED GREEN BLUE
RED = 0 GREEN= 0 BLUE=255

_________________
Fehér lányra nézni fault,fehér lányhoz szólni technikai fault,fehér lányhoz érni,na azért lincselés jár!


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Fegyver csik, masik szinnel
HozzászólásElküldve: 2013.11.03. 01:35 
Offline
Tud valamit
Avatar

Csatlakozott: 2013.10.02. 16:50
Hozzászólások: 116
Megköszönt másnak: 5 alkalommal
Megköszönték neki: 78 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. /* Descarcat de pe http://www.eXtreamCS.com !! */
  2. /* AMX Mod X script.
  3. *
  4. * tracer_fire by jon
  5. *
  6. * based on war weapon tracers.
  7. *
  8. * latest fixes:
  9. * - found get_user_origin mode 4, for cs only.
  10. * this allows us to draw the tracer to where the bullet actually
  11. * went instead of where the player was aiming.
  12. *
  13. * features solid, random, weapon class, and team color(s)
  14. * and a new option to prevent player from seeing their own tracer.
  15. *
  16. * *******************************************************************************
  17. *
  18. * Ported By KingPin( kingpin@onexfx.com ). I take no responsibility
  19. * for this file in any way. Use at your own risk. No warranties of any kind.
  20. *
  21. * *******************************************************************************
  22. *
  23. *
  24. * TODO:
  25. * - read default colors from a cfg or ini or something
  26. * - save colors/mode between map changes instead of loading defaults
  27. */
  28.  
  29.  
  30. #include <amxconst>
  31. #include <amxmodx>
  32. #include <amxmisc>
  33. #include <string>
  34.  
  35. /* current version */
  36. static const CURR_VERSION[] = "1.6"
  37.  
  38. /* mode nomenclature */
  39. static const modenames[5][] = { "disabled", "uniform", "random", "weapon-class", "player-team" }
  40.  
  41.  
  42. /***************** some shiz *****************/
  43.  
  44.  
  45. /* color tables. */
  46. static weap_colors[31][3]
  47. static rand_colors[23][3]
  48.  
  49. /* table[playerid] stores ammo count and last weapon id. */
  50. new lastammo[33]
  51. new lastweap[33]
  52.  
  53. /* cached beam sprite */
  54. new spriteidx
  55.  
  56.  
  57. /***************** more shiz *****************/
  58.  
  59.  
  60. /* gamemode:
  61. * 0 - disabled
  62. * 1 - use nCOLOR vars for color (defaults to pink 255,0,204)
  63. * 2 - random color from fixed table for every shot
  64. * 3 - use weapon table for colors
  65. * 4 - team based. CT=blue, T=red
  66. */
  67. new gamemode
  68.  
  69. /* option_all
  70. * 0 - send individual messages. player does not 'see' his/her own tracer. bots do not 'see' tracers.
  71. * 1 - MSG_ALL every tracer.
  72. */
  73. new option_all = 1
  74.  
  75.  
  76. /* nCOLOR: [0-255] - store rgb values for solid tracer. */
  77. new nred
  78. new ngreen
  79. new nblue
  80.  
  81.  
  82. /***************** still more shiz *****************/
  83.  
  84.  
  85. public tracer_setmode(id, level, cid)
  86. {
  87. if (!cmd_access(id,level,cid,1))
  88. return PLUGIN_HANDLED
  89.  
  90. new bool:nochange = false
  91. new args[1]
  92.  
  93. read_argv(1, args, 1)
  94.  
  95. if (equal(args,"0")) gamemode = 0
  96. else if (equal(args,"1")) gamemode = 1
  97. else if (equal(args,"2")) gamemode = 2
  98. else if (equal(args,"3")) gamemode = 3
  99. else if (equal(args,"4")) gamemode = 4
  100. else nochange = true
  101.  
  102. console_print(id, "tracer mode is: %s", modenames[gamemode])
  103.  
  104. // didn't change gamemode, don't display anything.
  105. if (nochange) {
  106. console_print(id, "usage: 'amx_tracers <0-4>' where: 0=off, 1=uniform, 2=random, 3=weapons, 4=teams")
  107. return PLUGIN_HANDLED
  108. }
  109.  
  110. set_hudmessage(0, 255, 255, 0.05, 0.65, 0, 0.00, 6.0, 0.01, 4.0, 3)
  111. show_hudmessage(0, "tracer mode is: %s", modenames[gamemode])
  112.  
  113. return PLUGIN_HANDLED
  114. }
  115.  
  116.  
  117. public tracer_setall(id, level, cid)
  118. {
  119. if (!cmd_access(id,level,cid,1))
  120. return PLUGIN_HANDLED
  121.  
  122. new bool:nochange = false
  123. new args[1]
  124.  
  125. read_argv(1, args, 1)
  126.  
  127. if (equal(args,"0")) option_all = 0
  128. else if (equal(args,"1")) option_all = 1
  129. else nochange = true
  130.  
  131. console_print(id, "tracer option_all is: %s", ((option_all==1) ? "on" : "off"))
  132.  
  133. // didn't change option_all, don't display anything.
  134. if (nochange) {
  135. console_print(id, "usage: 'amx_tracers_all <0-1>' where 0=dont draw own tracer, 1=draw all tracers")
  136. return PLUGIN_HANDLED
  137. }
  138.  
  139. set_hudmessage(0, 255, 255, 0.05, 0.65, 0, 0.00, 6.0, 0.01, 4.0, 3)
  140. show_hudmessage(0, "tracer option_all is: %s", ((option_all==1) ? "on" : "off"))
  141.  
  142. return PLUGIN_HANDLED
  143. }
  144.  
  145.  
  146.  
  147. public tracer_setcolor(id, level, cid)
  148. {
  149. if (!cmd_access(id,level,cid,3))
  150. return PLUGIN_HANDLED
  151.  
  152. new ared[4], agreen[4], ablue[4]
  153. new tnred, tngreen, tnblue
  154.  
  155. // get args
  156. read_argv(1, ared, 3)
  157. read_argv(2, agreen, 3)
  158. read_argv(3, ablue, 3)
  159.  
  160. // convert to int
  161. tnred = str_to_num(ared)
  162. tngreen = str_to_num(agreen)
  163. tnblue = str_to_num(ablue)
  164.  
  165. // check bounds
  166. if (tnred < 0) tnred = 0
  167. if (tngreen < 0) tngreen = 255
  168. if (tnblue < 0) tnblue = 255
  169. if (tnred > 255) tnred = 0
  170. if (tngreen > 255) tngreen = 255
  171. if (tnblue > 255) tnblue = 255
  172.  
  173. // values ok, update application
  174. nred = tnred
  175. ngreen = tngreen
  176. nblue = tnblue
  177.  
  178. return PLUGIN_HANDLED
  179. }
  180.  
  181.  
  182. public draw_tracer_for(pl, pteam[], vec1[3], vec2[3], weap)
  183. {
  184. new rval
  185.  
  186. message_begin(((pl==0) ? MSG_ALL : MSG_ONE), SVC_TEMPENTITY, vec1, pl)
  187. write_byte(0) // TE_BEAMPOINTS
  188. write_coord(vec1[0]) // start point
  189. write_coord(vec1[1])
  190. write_coord(vec1[2])
  191. write_coord(vec2[0]) // end point
  192. write_coord(vec2[1])
  193. write_coord(vec2[2])
  194. write_short(spriteidx) // sprite to draw (precached below)
  195. write_byte(0) // starting frame
  196. write_byte(0) // frame rate
  197. write_byte(4) // life in 0.1s
  198. write_byte(1) // line width in 0.1u
  199. write_byte(0) // noise in 0.1u
  200.  
  201. switch (gamemode) {
  202. case 4: {
  203. if (equali(pteam,"CT")) write_byte(0); else write_byte(255)
  204. write_byte(0)
  205. if (equali(pteam,"CT")) write_byte(255); else write_byte(0)
  206. }
  207. case 3: {
  208. write_byte(weap_colors[weap][0])
  209. write_byte(weap_colors[weap][1])
  210. write_byte(weap_colors[weap][2])
  211. }
  212. case 2: {
  213. rval = random_num(0, 22)
  214. write_byte(rand_colors[rval][0])
  215. write_byte(rand_colors[rval][1])
  216. write_byte(rand_colors[rval][2])
  217. }
  218. default: {
  219. write_byte(nred)
  220. write_byte(ngreen)
  221. write_byte(nblue)
  222. }
  223. }
  224.  
  225. write_byte(120) // brightness
  226. write_byte(50) // scroll speed
  227. message_end()
  228.  
  229. return PLUGIN_CONTINUE
  230. }
  231.  
  232.  
  233. public make_tracer(id)
  234. {
  235.  
  236. if (gamemode == 0) return PLUGIN_CONTINUE
  237.  
  238. new weap = read_data(2) // id of the weapon
  239. new ammo = read_data(3) // ammo left in clip
  240. new pteam[16]
  241. new players[32]
  242. new i, n
  243.  
  244. get_user_team(id, pteam, 15)
  245.  
  246. /* if no lastweap is set, you'll miss the first tracer!
  247. weap is never zero.
  248. */
  249. if (lastweap[id] == 0) { lastweap[id] = weap; }
  250.  
  251. /* fire this event only if the ammo has changed but the weapon has not.
  252. this prevents a tracer from being drawn when you switch from a weapon
  253. with a larger clip to one with a smaller clip.
  254.  
  255. also, new ammo setting must be less.. otherwise a tracer is fired on reload.
  256. */
  257. if ((lastammo[id] > ammo) && (lastweap[id] == weap)) {
  258.  
  259. new vec1[3], vec2[3]
  260. get_user_origin(id, vec1, 1) // origin; your camera point.
  261. get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
  262.  
  263. vec1[2] -= 6
  264.  
  265. if (option_all==1)
  266. {
  267. // MSG_ALL
  268. draw_tracer_for(0, pteam, vec1, vec2, weap)
  269. }
  270. else
  271. {
  272. // MSG_ONE
  273. get_players(players, n, "c")
  274. for(i = 0; i < n; i++)
  275. if ((id != players[i]) && (is_user_connected(players[i])))
  276. draw_tracer_for(players[i], pteam, vec1, vec2, weap)
  277. }
  278. }
  279.  
  280. lastammo[id] = ammo
  281. lastweap[id] = weap
  282.  
  283. return PLUGIN_CONTINUE
  284. }
  285.  
  286.  
  287. public plugin_init()
  288. {
  289. gamemode = 1
  290. nred = 255
  291. ngreen = 0
  292. nblue = 204
  293.  
  294. rand_colors[0] = {0, 255, 255} // cyan
  295. rand_colors[1] = {0, 255, 255} // magenta
  296.  
  297. rand_colors[2] = {0, 255, 255} // lt yellow
  298. rand_colors[3] = {0, 255, 255} // yellow
  299. rand_colors[4] = {0, 255, 255} // dark yellow/gold
  300.  
  301. rand_colors[5] = {0, 255, 255} // lt blue
  302. rand_colors[6] = {0, 255, 255} // blue
  303. rand_colors[7] = {0, 255, 255} // dark blue
  304.  
  305. rand_colors[8] = {0, 255, 255} // lt purple
  306. rand_colors[9] = {0, 255, 255} // purple
  307. rand_colors[10] = {0, 255, 255} // dark purple
  308.  
  309. rand_colors[11] = {0, 255, 255} // lt red
  310. rand_colors[12] = {0, 255, 255} // red
  311. rand_colors[13] = {0, 255, 255} // dark red
  312.  
  313. rand_colors[14] = {0, 255, 255} // lt green
  314. rand_colors[15] = {0, 255, 255} // green
  315. rand_colors[16] = {0, 255, 255} // dark green
  316.  
  317. rand_colors[17] = {0, 255, 255} // lt orange
  318. rand_colors[18] = {0, 255, 255} // orange
  319. rand_colors[19] = {0, 255, 255} // brown
  320. rand_colors[20] = {0, 255, 255} // gray
  321. rand_colors[21] = {0, 255, 255} // lt gray
  322. rand_colors[22] = {0, 255, 255} // white
  323.  
  324.  
  325. weap_colors[CSW_USP] = { 0, 0, 255 } // blue
  326. weap_colors[CSW_GLOCK18] = { 0, 0, 255 }
  327. weap_colors[CSW_P228] = { 0, 0, 255 }
  328. weap_colors[CSW_ELITE] = { 0, 0, 255 }
  329. weap_colors[CSW_FIVESEVEN] = { 0, 0, 255 }
  330. weap_colors[CSW_DEAGLE] = { 0, 0, 255 }
  331.  
  332. weap_colors[CSW_XM1014] = { 255, 255, 0 } // yellow
  333. weap_colors[CSW_M3] = { 255, 255, 0 }
  334.  
  335. weap_colors[CSW_MP5NAVY] = { 255, 153, 0 } // orange
  336. weap_colors[CSW_TMP] = { 255, 153, 0 }
  337. weap_colors[CSW_MAC10] = { 255, 153, 0 }
  338. weap_colors[CSW_UMP45] = { 255, 153, 0 }
  339. weap_colors[CSW_P90] = { 255, 153, 0 }
  340.  
  341. weap_colors[CSW_M4A1] = { 102, 0, 0 } // dark red
  342. weap_colors[CSW_AUG] = { 102, 0, 0 }
  343. weap_colors[CSW_SG552] = { 102, 0, 0 }
  344. weap_colors[CSW_AK47] = { 102, 0, 0 }
  345. weap_colors[CSW_G3SG1] = { 102, 0, 0 }
  346. weap_colors[CSW_SG550] = { 102, 0, 0 }
  347.  
  348. weap_colors[CSW_SCOUT] = { 102, 102, 102 } // lt gray
  349. weap_colors[CSW_AWP] = { 204, 204, 204 } // gray
  350.  
  351. weap_colors[CSW_M249] = { 0, 255, 0 } // lt green
  352.  
  353.  
  354. register_concmd("amx_tracers", "tracer_setmode", ADMIN_LEVEL_B, "<0-4> - 0:off,1:uniform,2:random,3:weapons,4:teams")
  355. register_concmd("amx_tracers_all", "tracer_setall", ADMIN_LEVEL_B, "<0-1> - 0:dont draw own tracer,1:draw all tracers")
  356. register_concmd("amx_tracers_colors", "tracer_setcolor", ADMIN_LEVEL_B, "<0-255> <0-255> <0-255> - RGB color values")
  357. register_plugin("tracer_fire", CURR_VERSION, "jon")
  358. register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
  359. return PLUGIN_CONTINUE
  360. }
  361.  
  362. public plugin_precache()
  363. {
  364. spriteidx = precache_model("sprites/laserbeam.spr");
  365. return PLUGIN_CONTINUE
  366. }
  367.  


Tessék :)

Ők köszönték meg johnny nek ezt a hozzászólást: mldpapa (2015.07.18. 02:46)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Fegyver csik, masik szinnel
HozzászólásElküldve: 2013.11.03. 01:39 
Offline
Őskövület
Avatar

Csatlakozott: 2011.09.26. 20:33
Hozzászólások: 2105
Megköszönt másnak: 28 alkalommal
Megköszönték neki: 33 alkalommal
A kérdés már rég választ kapott. A skype nevedre szerintem meg senki sem kíváncsi.


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 4 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 12 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole