-
Posts
1,546 -
Joined
-
Last visited
Everything posted by Dimos7
-
You can't use server side and client side to a file
-
Show me the client side also server side
-
addEventHandler("onPlayerTarget", getRootElement(), function(targetEl) if exports.bcho:isCriminal(source) then if(targetEl) then if(getElementType(targetEl) == "ped") then if(not getElementData(source, "rob")) then if(getElementData(targetEl, "robLoc") ~= false) then robloc = getElementData(targetEl, "robLoc") setElementData(source, "rob", robloc) setElementData(source, "Charges", tonumber(getElementData(source, "Charges"))+1000) exports["Messages"]:sendClientMessage("For start the robbery you need exit the store!", source, 255, 100, 0) if getElementInterior(source) == 0 then triggerClientEvent(source, "StartRobTimer", root) exports["Messages"]:sendClientMessage("Store Robberry: Don't get arrested/killed or you will fail the robberry", source, 255, 100, 0) end end end end end end end) addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), function() for k, v in ipairs(getElementsByType("player")) do setElementData(v, "rob", false) end end) Try this
-
Make more than one and make be in center of and make it
-
dxDrawCircle(950, 500, 250, 360, 0, tocolor(0, 0, 0, 255), tocolor (0, 0, 0, 0),100)
-
Server side of fuel system
-
engineSetModelLODDistance Try this
-
Use expprt function for those
-
Try it and see
-
I think was a function for that make it invisible
-
For that work you need do giveWeapon function
-
Any errors or warnings in debugscipt 3?
-
function test() x,y,z = getElementPosition(localPlayer) weapon = createWeapon("ak-47", x, y, z) setWeaponAmmo(weapon, 1) setWeaponClipAmmo(weapon, 32) setWeaponState(weapon, "ready") setElementAlpha(weapon, 0) local newAK = createObject(2965, x, y, z) attachElements(weapon, newAK) exports['bone_attach']:attachElementToBone(newAK, localPlayer, 12, 0, 0, 0, 0, -90, 0) end addCommandHandler("aktest", test) addEventHandler("onClientKey", root, function(button, press) if button =="mouse1" and press or button =="lalt" and press or button =="lctrl" and press then setPedAnimation(localPlayer, "rifle", "rifle_fire", -1, false, true, false, false) fireWeapon(weapon) setWeaponState(weapon, "firing") else setPedAnimation(localPlayer, false) setWeaponState(weapon, "ready") end if button =="mouse2" and press then if button == "mouse2" and press and getControlState (localPlayer, "crouch") then setPedAnimation(localPlayer, "rifle", "rifle_crouchfire", -1, false, true, false, false) else setPedAnimation(localPlayer, false) end setPedAnimation(localPlayer, "rifle", "rifle_fire", -1, false, true, false, false) else setPedAnimation(localPlayer, false) end end ) addEventHandler("onClientWeaponFire" , root, function(hitElement, hitX, hitY, hitZ) setPedAimTarget(localPlayer, hitX, hitY, hitZ) end )
-
function test() x,y,z = getElementPosition(localPlayer) weapon = createWeapon("ak-47", x, y, z) setWeaponAmmo(weapon, 1) setWeaponClipAmmo(weapon, 32) setWeaponState(weapon, "ready") setElementAlpha(weapon, 0) local newAK = createObject(2965, x, y, z) attachElements(weapon, newAK) exports['bone_attach']:attachElementToBone(newAK, localPlayer, 12, 0, 0, 0, 0, -90, 0) end addCommandHandler("aktest", test) addEventHandler("onClientKey", root, function(button, press) if button =="mouse1" and press or button =="lalt" and press or button =="lctrl" and press then setPedAnimation(localPlayer, "rifle", "rifle_fire", -1, false, false, false, false) fireWeapon(weapon) setWeaponState(weapon, "firing") else setPedAnimation(localPlayer, false) setWeaponState(weapon, "ready") end if button =="mouse2" and press then if button == "mouse2" and press and getControlState (localPlayer, "crouch") then setPedAnimation(localPlayer, "rifle", "rifle_crouchfire", -1, false, false, false, false) else setPedAnimation(localPlayer, false) end setPedAnimation(localPlayer, "rifle", "rifle_fire", -1, false, false, false, false) else setPedAnimation(localPlayer, false) end if button =="mouse2" and press and button =="mouse1" and press then fireWeapon(weapon) setWeaponState(weapon, "firing") setPedAnimation(localPlayer, "rifle", "rifle_fire", - 1,false, false, false, false) else setPedAnimation(localPlayer, false) setWeaponState(weapon, "ready") end if button == "mouse1" and press and button =="mouse2" and press and getControlState(localPlayer, "crouch") then fireWeapon(weapon) setWeaponState(weapon, "firing") setPedAnimation(localPlayer, "rifle", "rifle_crouchfire", - 1, false, false, false, false, false) else setPedAnimation(localPlayer, false) setWeaponState(weapon, "ready") end end end) addEventHandler("onClientWeaponFire" , root, function(hitElement, hitX, hitY, hitZ) setPedAimTarget(localPlayer, hitX, hitY, hitZ) end )
-
addEventHandler("onClientKey", root, function(button, press) if button =="mouse1" and press or button =="lalt" and press or button =="lctrl" and press then setPedAnimation(localPlayer, "rifle", "rifle_fire", -1, false, false, false, false) fireWeapon(weapon) setWeaponState(weapon, "firing") else setWeaponState(weapon, "ready") end if button =="mouse2" and press then if button == "mouse2" and press and getControlState (localPlayer, "crouch") then setPedAnimation(localPlayer, "rifle", "rifle_crouchfire", -1, false, false, false, false) end setPedAnimation(localPlayer, "rifle", "rifle_fire", -1, false, false, false, false) end else setPedAnimation(localPlayer, false) end if button =="mouse2" and press and button =="mouse1" and press then fireWeapon(weapon) setWeaponState(weapon, "firing") setPedAnimation(localPlayer, "rifle", "rifle_fire", - 1,false, false, false, false) else setPedAnimation(localPlayer, false) setWeaponState(weapon, "ready") end if button == "mouse1" and press and button =="mouse2" and press and getControlState(localPlayer, "crouch") then fireWeapon(weapon) setWeaponState(weapon, "firing") setPedAnimation(localPlayer, "rifle", "rifle_crouchfire", - 1, false, false, false, false, false) else setPedAnimation(localPlayer, false) setWeaponState(weapon, "ready") end end end) Try this
-
Post the code so we help you
-
setPedAnimation getPedTarget On client key put if button is mouse2 and find the correct anim
-
function test() x,y,z = getElementPosition(localPlayer) weapon = createWeapon("ak-47", x, y, z) setWeaponAmmo(weapon, 120) setWeaponClipAmmo(weapon, 32) setWeaponState(weapon, "ready") setElementAlpha(weapon, 0) local newAK = createObject(2965, x, y, z) attachElements(weapon, newAK) exports['bone_attach']:attachElementToBone(newAK, localPlayer, 12, 0, 0, 0, 0, -90, 0) end addCommandHandler("aktest", test) addEventHandler("onClientKey", root, function(button, press) if button =="mouse1" and press or button =="lalt" and press or button =="lctrl" and press or button =="ralt" and press or button =="rctrl" and press then fireWeapon(weapon) setWeaponState(weapon, "firing") else setWeaponState(weapon, "ready") end end ) addEventHandler("onClientWeaponFire" , root, function(hitElement, hitX, hitY, hitZ) setPedAimTarget(localPlayer, hitX, hitY, hitZ) end )
-
onClientWeaponFire fireWeapon setWeaponState setPedAimTarget getKeyState
-
function test() local x,y,z = getElementPosition(localPlayer) local weapon = createWeapon("ak-47", x, y, z) setWeaponAmmo(weapon, 120) setWeaponClipAmmo(weapon, 32) setWeaponState(weapon, "ready") setElementAlpha(weapon, 0) local newAK = createObject(2965, x, y, z) attachElements(newAK, weapon) exports['bone_attach']:attachElementToBone(localPlayer, newAK, 25, 0, 0, 0, 0, -90, 0) end addCommandHandler("aktest", test)
-
Well you need use export functions resource name and use it on local player and bone of the right hand wich is id 25 and use it where you sees feet good at hand then see those function i give you and the even onClinetWeaponFire and you be good getPedBonePosition
-
We can't provide you code you need start learning