Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. You can't use server side and client side to a file
  2. Show me the client side also server side
  3. 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
  4. Dimos7

    dxDrawCircle

    Make more than one and make be in center of and make it
  5. Dimos7

    dxDrawCircle

    dxDrawCircle(950, 500, 250, 360, 0, tocolor(0, 0, 0, 255), tocolor (0, 0, 0, 0),100)
  6. Dimos7

    dxDrawCircle

    Put center color invsible
  7. Server side of fuel system
  8. engineSetModelLODDistance Try this
  9. I think was a function for that make it invisible
  10. For that work you need do giveWeapon function
  11. Any errors or warnings in debugscipt 3?
  12. 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 )
  13. 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 )
  14. 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
  15. setPedAnimation getPedTarget On client key put if button is mouse2 and find the correct anim
  16. 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 )
  17. onClientWeaponFire fireWeapon setWeaponState setPedAimTarget getKeyState
  18. 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)
  19. 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
  20. We can't provide you code you need start learning
×
×
  • Create New...