Sam Fisher
Members-
Posts
46 -
Joined
-
Last visited
Everything posted by Sam Fisher
-
I've tried to replace both in one function but this way none of them worked. I'm sure it's possible to do it but I'm not a good scripter yet. I'll try the model replacing with different resources. Thanx for the help!
-
That's great. It functions well now. But the projectile still useless. If I use simple rocket (19) it can be fired different directions by changing the 0's. But these rockets can't do anything with the intruders. If I change the projectile to heatseeker (20) than it will be fired and immediately disapperars if I'm right. Maybe we are close now but still need help. I would be glad to see a clientside script by Ace_Gambit to help us out.
-
That's great. It functions well now. But the projectile still useless. If I use simple rocket (19) it can be fired different directions by changing the 0's. But these rockets can't do anything with the intruders. If I change the projectile to heatseeker (20) than it will be fired and immediately disapperars if I'm right. Maybe we are close now but still need help. I would be glad to see a clientside script by Ace_Gambit to help us out.
-
They are in the same resource. Just different lua file. Both are running. If I remove the seasparrow from the resource the hydra is functioning. But the 2 together not.
-
They are in the same resource. Just different lua file. Both are running. If I remove the seasparrow from the resource the hydra is functioning. But the 2 together not.
-
Is it possible to replace more than one vehicle models in the game? I replaced the hydra and it worked perfectly. But when I made another lua to replace the seasparrow the original hydra got back to the game and only the new seasparrow works well now. Any ideas?
-
Is it possible to replace more than one vehicle models in the game? I replaced the hydra and it worked perfectly. But when I made another lua to replace the seasparrow the original hydra got back to the game and only the new seasparrow works well now. Any ideas?
-
Would you be so kind to post your script when you finished? I'm will be happy if I can try this out with my friends! Thx
-
Would you be so kind to post your script when you finished? I'm will be happy if I can try this out with my friends! Thx
-
function fireMiniGun () if guiColorProgressBarGetProgress ( miniAmmoBar ) < 0 then return end for player,v in pairs(shootingPlayers) do if isPlayerInVehicle ( player ) then if player == getLocalPlayer() then if guiColorProgressBarGetProgress ( miniAmmoBar ) == 0 then triggerServerEvent ( "stopFire", getLocalPlayer() ) else local ammo = guiColorProgressBarGetProgress ( miniAmmoBar ) - 0.2 guiColorProgressBarSetProgress ( miniAmmoBar, ammo ) ammo = ammo * 5 guiSetText ( miniAmmoText, " - Ammo: "..math.ceil(ammo).."" ) guiSetVisible ( miniAmmoText, true ) guiSetVisible ( miniAmmoBar, true ) guiColorProgressBarSetColorAlpha ( miniAmmoBar, 0.5 ) end end local vehicle = getPlayerOccupiedVehicle ( player ) local distance = 100 if getVehicleID (vehicle) == 431 then sX, sY, sZ = getElementPosition ( getLocalPlayer() ) else sX, sY, sZ = getElementPosition ( vehicle ) end local fX, fY, fZ = sX, sY, sZ local rX, rY, rZ = getVehicleRotation (vehicle) --local rX = 360 - rX local rZ = 360 - rZ local rY = 360 - rY --local rZ = 360 - rZ local offset = math.sqrt ( ( distance ^ 2 ) * 2 ) sX = sX + math.sin ( math.rad ( rZ ) ) * 1.5 sY = sY + math.cos ( math.rad ( rZ ) ) * 1.5 fX = fX + math.sin ( math.rad ( rZ ) ) * offset fY = fY + math.cos ( math.rad ( rZ ) ) * offset fZ = fZ - math.tan ( math.rad ( rX ) ) * offset local col, x, y, z, element = processLineOfSight ( sX, sY, sZ + 0.5, fX, fY, fZ - 0.5, true,true ) if ( col ) then bulletz = createObject ( 3106, sX, sY, sZ + 0.6, 0, 0, 0 ) moveObject ( bulletz, 200, x, y, z - 0.3 ) setTimer ( destroyElement, 1000, 1, bulletz ) if ( element ) then if ( getElementType ( element ) == "vehicle" ) then driver = getVehicleOccupant ( element ) if ( driver == getLocalPlayer() and driver ~= player ) then daHealth = getElementHealth ( element ) - 50 if daHealth < 0 then daHealth = 0 end setElementHealth ( element, daHealth ) end end end else bulletz = createObject ( 3106, sX, sY, sZ + 0.6, 0, 0, 0 ) moveObject ( bulletz, 100, fX, fY, fZ + 0.5 ) setTimer ( destroyElement, 500, 1, bulletz ) end end end end This is a complicated way to fire a minigun... I took this from the interstate client script. I don't know if it helps a bit or not. Maybe it's good to help create bullets with objectID 3106. Not a projectile but this way the minigun won't fire rockets I think.
-
function fireMiniGun ()if guiColorProgressBarGetProgress ( miniAmmoBar ) < 0 then return endfor player,v in pairs(shootingPlayers) do if isPlayerInVehicle ( player ) then if player == getLocalPlayer() then if guiColorProgressBarGetProgress ( miniAmmoBar ) == 0 then triggerServerEvent ( "stopFire", getLocalPlayer() ) else local ammo = guiColorProgressBarGetProgress ( miniAmmoBar ) - 0.2 guiColorProgressBarSetProgress ( miniAmmoBar, ammo ) ammo = ammo * 5 guiSetText ( miniAmmoText, " - Ammo: "..math.ceil(ammo).."" ) guiSetVisible ( miniAmmoText, true ) guiSetVisible ( miniAmmoBar, true ) guiColorProgressBarSetColorAlpha ( miniAmmoBar, 0.5 ) end end local vehicle = getPlayerOccupiedVehicle ( player ) local distance = 100 if getVehicleID (vehicle) == 431 then sX, sY, sZ = getElementPosition ( getLocalPlayer() ) else sX, sY, sZ = getElementPosition ( vehicle ) end local fX, fY, fZ = sX, sY, sZ local rX, rY, rZ = getVehicleRotation (vehicle) --local rX = 360 - rX local rZ = 360 - rZ local rY = 360 - rY --local rZ = 360 - rZ local offset = math.sqrt ( ( distance ^ 2 ) * 2 ) sX = sX + math.sin ( math.rad ( rZ ) ) * 1.5 sY = sY + math.cos ( math.rad ( rZ ) ) * 1.5 fX = fX + math.sin ( math.rad ( rZ ) ) * offset fY = fY + math.cos ( math.rad ( rZ ) ) * offset fZ = fZ - math.tan ( math.rad ( rX ) ) * offset local col, x, y, z, element = processLineOfSight ( sX, sY, sZ + 0.5, fX, fY, fZ - 0.5, true,true ) if ( col ) then bulletz = createObject ( 3106, sX, sY, sZ + 0.6, 0, 0, 0 ) moveObject ( bulletz, 200, x, y, z - 0.3 ) setTimer ( destroyElement, 1000, 1, bulletz ) if ( element ) then if ( getElementType ( element ) == "vehicle" ) then driver = getVehicleOccupant ( element ) if ( driver == getLocalPlayer() and driver ~= player ) then daHealth = getElementHealth ( element ) - 50 if daHealth < 0 then daHealth = 0 end setElementHealth ( element, daHealth ) end end end else bulletz = createObject ( 3106, sX, sY, sZ + 0.6, 0, 0, 0 ) moveObject ( bulletz, 100, fX, fY, fZ + 0.5 ) setTimer ( destroyElement, 500, 1, bulletz ) end endendend This is a complicated way to fire a minigun... I took this from the interstate client script. I don't know if it helps a bit or not. Maybe it's good to help create bullets with objectID 3106. Not a projectile but this way the minigun won't fire rockets I think.
-
Thanx! And is there a way to attach an input-key controlled chainsaw in front of a sandking? It would be nice to remake Carmageddon's Twister here
-
Thanx! And is there a way to attach an input-key controlled chainsaw in front of a sandking? It would be nice to remake Carmageddon's Twister here
-
I've just wandering if someone with great scripting skills and enough free time can do us a very great script with a vehicle upgrades shop. The GUI can be similar to the one used in the vehicle bombshop script by SkunkPops. You should bring the vehicle you want to a marker where you can place weapons on it and even buy nitro, neon, and others from the single player. For example it will be nice if we can drive in-game customized bikes with miniguns in front of it Is there a chance to some great scripter will try to make this script for us?
-
I've just wandering if someone with great scripting skills and enough free time can do us a very great script with a vehicle upgrades shop. The GUI can be similar to the one used in the vehicle bombshop script by SkunkPops. You should bring the vehicle you want to a marker where you can place weapons on it and even buy nitro, neon, and others from the single player. For example it will be nice if we can drive in-game customized bikes with miniguns in front of it Is there a chance to some great scripter will try to make this script for us?
-
tried it and died immediately in the middle of Venturas after the text "Surface to air rockets..." I saw a video of the Carrier script what I can't get working yet... but in the video the player is running from the rockets. It must be done here too somehow.
-
tried it and died immediately in the middle of Venturas after the text "Surface to air rockets..." I saw a video of the Carrier script what I can't get working yet... but in the video the player is running from the rockets. It must be done here too somehow.
-
Thank you very much! It's working now. Is there a way to make it like in the single player? Just give a little chance to the players to evade the heatseekers Any idea?
-
Thank you very much! It's working now. Is there a way to make it like in the single player? Just give a little chance to the players to evade the heatseekers Any idea?
-
Would u please post your edited script with working SAM rockets at area 61? I've tried to edit your script but I couldn't get it working. I'm not perfect in English maybe I missunderstood something in the description. Please help
-
Would u please post your edited script with working SAM rockets at area 61? I've tried to edit your script but I couldn't get it working. I'm not perfect in English maybe I missunderstood something in the description. Please help