Jump to content

Xwad

Members
  • Posts

    1,090
  • Joined

  • Last visited

Everything posted by Xwad

  1. This is that part: function cammera(screenX, screenY, absoluteX, absoluteY, vx,vy,vz) local x,y,z = getElementPosition(getPedOccupiedVehicle(getLocalPlayer())) local rx, ry, rz = getElementRotation(getPedOccupiedVehicle(getLocalPlayer())) rz = rz +180 local cx = x + math.cos(math.rad(rz)) * 3 local cy = y + math.sin(math.rad(rz)) * 3 setCameraMatrix ( cx, cy, z, vx,vy,vz) drawHud() end function keepCamAtAc130() local x,y,z = getElementPosition(getPedOccupiedVehicle(getLocalPlayer())) local rx, ry, rz = getElementRotation(getPedOccupiedVehicle(getLocalPlayer())) rz = rz +180 local cx = x + math.cos(math.rad(rz)) * 3 local cy = y + math.sin(math.rad(rz)) * 3 setCameraMatrix(cx, cy, z) drawHud() end
  2. there was a same post like this and there the man wrote that : "i fix, just change setCameraMatrix function." I just dont know what i need to change in SetCameraMatrix.
  3. maybe the functions are old??!
  4. I already tryed but not working
  5. Xwad

    ac 130 bug

    Hi how did you fix the bug?
  6. Please help me fix that. I saw a commant that I must change all onClientRender to onClientPreRender. I tryed but it still does not work..
  7. ok but what functions or events need i add to server side?
  8. My script makes possible to attach weapons to vehicles but i cant demage players only vehicles.. And the other problem is that other players cant see the weapon and the projectile and if i press w and start shooting and after that i stop pressing w then the weapon shooting stops.
  9. is there any video where they teach how to define player source? becaouse i dont know how:/
  10. you mean need i add this to client? vehWeapons = {} function createM4Weapon() if getElementModel(source) == 432 then vehWeapons[source] = {} local vX, vY, vZ = getElementPosition(source) -- Wep 1 vehWeapons[source][1] = createWeapon("m4", vX, vY, vZ + 1) setWeaponClipAmmo(vehWeapons[source][1], 500) setWeaponState(vehWeapons[source][1], "ready") attachElements(vehWeapons[source][1],source,0.7,2.4,0.7,0,0,90) setWeaponFiringRate ( vehWeapons[source][1] , 63 ) end end addEventHandler( "onClientVehicleEnter",getRootElement(),createM4Weapon) addEventHandler("onClientKey", root, function(button,state) local veh = getPedOccupiedVehicle(localPlayer) if veh then if getElementModel(veh) == 432 then if vehWeapons[veh][1] then if button == "lctrl" and state == true then setWeaponState(vehWeapons[veh][1],"firing") else setWeaponState(vehWeapons[veh][1],"ready") end end end end end) function destroyCurrentVehicleWeapons() destroyElement(vehWeapons[source][1]) vehWeapons[source] = false -- Destroy the Weapons end addEventHandler("onClientVehicleExit",root, destroyCurrentVehicleWeapons) addEventHandler("onClientVehicleExplode",root, destroyCurrentVehicleWeapons)
  11. ohh omg sry i forgot!!! https://community.multitheftauto.com/in ... ls&id=3919
  12. test it pls you will se its bugging.. Maybe the functions are old?
  13. i cant make picture only video becaouse this bug is a camera bug when i try to look right then the camera always get back to the normal position://
  14. hi i donwloaded a script but the camera switches back to the plane without reason. How can i fix it?? Recently i saw a post and there they sad: change setCameraMatrix function. Please help its very important:(
  15. I try but i cant make it:/ Is it something like that? client addEventHandler( "onClientKey", root, function(button,press) if button == "ctrl" then triggerServerEvent ( "createM4Weapon", resourceRoot, "shooting" ) return true end return false end ) server function createM4Weapon ( message ) -- the predefined variable 'client' points to the player who triggered the event and should be used due to security issues triggerClientEvent ( playerSource, "createM4Weapon", playerSource, "Hello World!" ) end addEvent( "createM4Weapon", true ) addEventHandler( "createM4Weapon", resourceRoot, greetingHandler ) -- Bound to this resource only, saves on CPU usage.
  16. Xwad

    projectile script

    Working now 100% tahnks:D!
  17. Xwad

    projectile script

    I want to set 4 sec time betwen the projectile shoots.
  18. Xwad

    projectile script

    Tahnks now its working with lalt:D but the timer is still not working.
  19. Xwad

    projectile script

    not working:( function shootProjectile() local vehicle = getPedOccupiedVehicle(localPlayer) if getElementModel(vehicle) == 497 then local x,y,z = getElementPosition(vehicle) createProjectile(vehicle, 19, x, y, z) end end bindKey("alt", "down", shootProjectile) setTimer ( shootProjectile, 1000, 1, "Reloading" )
  20. Hi i made a script that makes possible when i press alt in the helicopter the it will shoot a rocket but its not working:/ function shootProjectile() local vehicle = getPedOccupiedVehicle(localPlayer) if getElementModel(source) == 497 then local vX, vY, vZ = getElementPosition(source) createProjectile(vehicle, 19, x, y, z) end end bindKey("alt", "down", shootProjectile) setTimer ( shootProjectile, 1000, 1, "Reloading" )
  21. Xwad

    HUD

    Ok works now perfect thanks:D
  22. Hi is it possible to download and add to mta 1.4 editor the 0.3.7 RC1 objects? becaouse i need it to build a map.
  23. set timer for the spawn script or for the armor script?
×
×
  • Create New...