Benevolence Posted October 2, 2011 Posted October 2, 2011 (edited) How would I go on about making bullets more visible when they are shot? For example, bullets with flares. It's possible because I've seen it on a zombie server. Skip video to 1:47 Edited October 2, 2011 by Guest
Ignition Posted October 2, 2011 Posted October 2, 2011 If you've seen it on a server on Mta it probably is possible
Benevolence Posted October 2, 2011 Author Posted October 2, 2011 If you've seen it on a server on Mta it probably is possible It is possible. And I want to know how to do it.
Ignition Posted October 2, 2011 Posted October 2, 2011 I'm not really sure. Its probably a function on the Wiki or something. Btw nice video.
Benevolence Posted October 2, 2011 Author Posted October 2, 2011 I'm not really sure. Its probably a function on the Wiki or something.Btw nice video. Indeed. I respect FPSRussia for all his videos and because he's been paintballing to the place I always go . On-Topic: I'd really like to know how to do this.
Benevolence Posted October 2, 2011 Author Posted October 2, 2011 onClientPlayerWeaponFirePaintBall script This makes the mark on the wall where you shoot. That's not what I want. See the video...
Ignition Posted October 2, 2011 Posted October 2, 2011 onClientPlayerWeaponFirePaintBall script Tank wants to know how to Have the bullets Glow/flare when they are fired.
Einheit-101 Posted October 2, 2011 Posted October 2, 2011 onClientPlayerWeaponFire(hitX, hitY, hitZ)--->x,y,z = getPedWeaponMuzzlePosition----> createMarker(corona, x,y,z) MoveObject(marker, hitX,hitY,hitZ) Something like that^^ You move a Marker very fast from your Muzzle Position to hit position.
codeluaeveryday Posted October 3, 2011 Posted October 3, 2011 You mean like this: https://community.multitheftauto.com/index.php?p= ... ls&id=2002, maybe using a timer lol.
Benevolence Posted October 3, 2011 Author Posted October 3, 2011 You mean like this: https://community.multitheftauto.com/index.php?p= ... ls&id=2002, maybe using a timer lol. Yeah like that but I'd like the tracers to dissapear after they reach they're destination.. just like a bullet would like. But this resource is compiled, can't edit it.
codeluaeveryday Posted October 3, 2011 Posted October 3, 2011 You mean like this: https://community.multitheftauto.com/index.php?p= ... ls&id=2002, maybe using a timer lol. Yeah like that but I'd like the tracers to dissapear after they reach they're destination.. just like a bullet would like. But this resource is compiled, can't edit it. im thinking dxDrawLine3D https://wiki.multitheftauto.com/wiki/DxDrawLine3D
myonlake Posted October 3, 2011 Posted October 3, 2011 Or then script some shaders like many servers do.
NotAvailable Posted October 3, 2011 Posted October 3, 2011 Attach 3 / 4 red Corona's to each other and make e'm move to it's destination. You could use Vik's laser resource for the aim stuff and put your scripted code in the code down here. function fireFunc() end addEventHandler("onClientPlayerWeaponFire", getRootElement(), fireFunc) EDIT: I like the russian guy, he sounds badass ^^
karlis Posted October 3, 2011 Posted October 3, 2011 getPedTargetCollision getPedWeaponMuzzlePosition dxDrawLine3D
karlis Posted October 4, 2011 Posted October 4, 2011 if player has shot lately then draw 3dline from one of returns pos to other on client render.
Castillo Posted October 4, 2011 Posted October 4, 2011 local weaponsThatCantFireBullets = {[0] = true, [1] = true, [2] = true, [3] = true, [4] = true, [5] = true, [6] = true, [7] = true, [8] = true, [9] = true, [10] = true, [11] = true, [12] = true, [13] = true, [14] = true, [15] = true, [16] = true, [40] = true, [44] = true, [45] = true, [46] = true} local lines = {} function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if weaponsThatCantFireBullets[weapon] then return end local mx, my, mz = getPedWeaponMuzzlePosition(source) lines[#lines +1] = {mx, my, mz, hitX, hitY, hitZ} end addEventHandler("onClientPlayerWeaponFire", root, onClientPlayerWeaponFireFunc) addEventHandler("onClientRender",root, function () for index, line in pairs(lines) do dxDrawLine3D(line[1],line[2],line[3],line[4],line[5],line[6],tocolor(255,0,0,255)) end end) Should be enough for a start.
karlis Posted October 4, 2011 Posted October 4, 2011 local weaponsThatCantFireBullets = {[0] = true, [1] = true, [2] = true, [3] = true, [4] = true, [5] = true, [6] = true, [7] = true, [8] = true, [9] = true, [10] = true, [11] = true, [12] = true, [13] = true, [14] = true, [15] = true, [16] = true, [40] = true, [44] = true, [45] = true, [46] = true} local lines = {} function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if weaponsThatCantFireBullets[weapon] then return end local mx, my, mz = getPedWeaponMuzzlePosition(source) lines[#lines +1] = {mx, my, mz, hitX, hitY, hitZ} end addEventHandler("onClientPlayerWeaponFire", root, onClientPlayerWeaponFireFunc) addEventHandler("onClientRender",root, function () for index, line in pairs(lines) do dxDrawLine3D(line[1],line[2],line[3],line[4],line[5],line[6],tocolor(255,0,0,255)) end end) Should be enough for a start. they wont destroy. u need to set timer to remove the subtable after a set ammount of time(imo 2sec would be good) also fading out would be good, but i guess thats out of basic help.
Castillo Posted October 4, 2011 Posted October 4, 2011 I wasn't trying to give him the full script, karlis, I'm trying to give him a code where to start of.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now