-
Posts
1,090 -
Joined
-
Last visited
Everything posted by Xwad
-
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
-
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.
-
maybe the functions are old??!
-
I already tryed but not working
-
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..
-
ok but what functions or events need i add to server side?
-
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.
-
is there any video where they teach how to define player source? becaouse i dont know how:/
-
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)
-
ohh omg sry i forgot!!! https://community.multitheftauto.com/in ... ls&id=3919
-
test it pls you will se its bugging.. Maybe the functions are old?
-
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://
-
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:(
-
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.
-
I want to set 4 sec time betwen the projectile shoots.
-
Tahnks now its working with lalt:D but the timer is still not working.
-
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" )
-
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" )
-
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.
-
set timer for the spawn script or for the armor script?
