Jump to content

Pedro Colto

Members
  • Posts

    133
  • Joined

  • Last visited

Everything posted by Pedro Colto

  1. Tipo quero que a colt45 segure igual a desert eagle mais eu não sei bem como configurar no setWeaponProperty, já tentei assim olhem setWeaponProperty(22, "pro", "flag_aim_arm", 1000) más não erá podem me explicar?
  2. Hello friends, well when I equip the selected weapons they appear in my more coast to a bug when reloga the gun stays floating if not destroy after the login or reconnect code: elementWeaponbBack = {} function weaponSwitchbBack ( previousWeaponID, currentWeaponID ) local weapon1 = getElementData(source,"currentweapon_2") if not weapon1 then return end local ammoData1,weapID1 = getWeaponAmmoType(weapon1) local x,y,z = getElementPosition(source) local rx,ry,rz = getElementRotation(source) if previousWeaponID == weapID1 then if elementWeaponbBack[source] then detachElementFromBone(elementWeaponbBack[source]) destroyElement(elementWeaponbBack[source]) elementWeaponbBack[source] = false end if weapon1 == "Machado" then elementWeaponbBack[source] = createObject(339,x,y,z) setObjectScale(elementWeaponbBack[source],0.999) elseif weapon1 == "Crowbar" then elementWeaponbBack[source] = createObject(333,x,y,z) setObjectScale(elementWeaponbBack[source],0.999) elseif weapon1 == "Baseball Bat" then elementWeaponbBack[source] = createObject(336,x,y,z) setObjectScale(elementWeaponbBack[source],0.999) elseif weapon1 == "Shovel" then elementWeaponbBack[source] = createObject(337,x,y,z) setObjectScale(elementWeaponbBack[source],0.999) elseif weapon1 == "Chainsaw" then elementWeaponbBack[source] = createObject(341,x,y,z) setObjectScale(elementWeaponbBack[source],0.999) elseif weapon1 == "--" then else elementWeaponbBack[source] = createObject(getWeaponObjectID(weapID1),x,y,z) setObjectScale(elementWeaponbBack[source],0.875) end if elementBackpack[source] then attachElementToBone(elementWeaponbBack[source],source,3,-0.18,-0.05,-0.1,-0.1,0,260) else attachElementToBone(elementWeaponbBack[source],source,3,-0.18,-0.05,-0.1,-0.1,0,260) end elseif currentWeaponID == weapID1 then detachElementFromBone(elementWeaponbBack[source]) destroyElement(elementWeaponbBack[source]) elementWeaponbBack[source] = false end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), weaponSwitchbBack )
  3. friend already tried and did not have other way?
  4. Bug em observação, mais vllw ^^
  5. então amigo fis tudo que você falou mais não funcionou '- function disableSounds() setAmbientSoundEnabled( "gunfire", false ) end addEventHandler("onClientResourceStart",resourceRoot,disableSounds) local function playGunfireSound() local muzzleX, muzzleY, muzzleZ = getPedWeaponMuzzlePosition(source) local px, py, pz = getElementPosition ( source ) local weapon = getElementData(localPlayer,"currentweapon_1") if not weapon then return end weapon = tostring ( weapon ) if weapon == "M16A2" then outputDebugString("Arma: M16A2") local sound = playSound3D("soundweapons/m16a2.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 130) elseif weapon == "FN FAL" then outputDebugString("Arma: FN FAL") local sound = playSound3D("soundweapons/fal.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 110) elseif weapon == "M24 (Desert)" then outputDebugString("Arma: M24 (Desert)") local sound = playSound3D("soundweapons/m24.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 120) elseif weapon == "AK-107" then outputDebugString("Arma: AK-107") local sound = playSound3D("soundweapons/ak107.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 125) elseif weapon == "CZ550" then outputDebugString("Arma: CZ550") local sound = playSound3D("soundweapons/cz550.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 135) elseif weapon == "SVD Camo" then outputDebugString("Arma: SVD Camo") local sound = playSound3D("soundweapons/svd.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 100) elseif weapon == "M240" then outputDebugString("Arma: M240") local sound = playSound3D("soundweapons/mk48.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 140) elseif weapon == "G36C" then outputDebugString("Arma: G36C") local sound = playSound3D("soundweapons/mg36.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 130) elseif weapon == "RPK" then outputDebugString("Arma: RPK") local sound = playSound3D("soundweapons/pkp.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 125) elseif weapon == "AKS-74u" then outputDebugString("Arma: AKS-74u") local sound = playSound3D("soundweapons/aks74u.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 115) elseif weapon == "Saiga 12k" then outputDebugString("Arma: Saiga 12k") local sound = playSound3D("soundweapons/sa58v.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 100) elseif weapon == "AKS (GOLD)" then outputDebugString("Arma: AKS (GOLD)") local sound = playSound3D("soundweapons/aksgold.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 110) elseif weapon == "M4A1 CCO SD" then outputDebugString("Arma: M4A1 CCO SD") local sound = playSound3D("soundweapons/m4a1.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 20) elseif weapon == "M14 AIM" then outputDebugString("Arma: M14 AIM") local sound = playSound3D("soundweapons/sks45.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 125) elseif weapon == "Winchester 1866" then outputDebugString("Arma: Winchester 1866") local sound = playSound3D("soundweapons/sks45.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 120) end end addEventHandler("onClientPlayerWeaponFire", root, playGunfireSound)
  6. eu tenho armas novas add no meu server e os sons estão bugados, eles funcionam normalmente mais se eu atiro exemplo com a m16a2 e meu amigo esteja com g36c e ele atirar com a g36c eu ouço o som da m16a2 na g36c e para ele a mesma coisa só que com o som da g36c codigo do sistema function disableSounds() setAmbientSoundEnabled( "gunfire", false ) end addEventHandler("onClientResourceStart",root,disableSounds) local function playGunfireSound() local muzzleX, muzzleY, muzzleZ = getPedWeaponMuzzlePosition(source) local px, py, pz = getElementPosition ( source ) local weapon = getElementData(localPlayer,"currentweapon_1") if not weapon then return end weapon = tostring ( weapon ) if weapon == " " then -- outputChatBox ( weapon ) local sound = playSound3D("soundweapons/as50.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "M16A2" then local sound = playSound3D("soundweapons/m16a2.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 130) elseif weapon == "FN FAL" then local sound = playSound3D("soundweapons/fal.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == " " then local sound = playSound3D("soundweapons/dmr.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "M24 (Desert)" then local sound = playSound3D("soundweapons/m24.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "AK-107" then local sound = playSound3D("soundweapons/ak107.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "CZ550" then local sound = playSound3D("soundweapons/cz550.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == " " then local sound = playSound3D("soundweapons/mosin.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "SVD Camo" then local sound = playSound3D("soundweapons/svd.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == " " then local sound = playSound3D("soundweapons/as50.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "M240" then local sound = playSound3D("soundweapons/mk48.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "G36C" then local sound = playSound3D("soundweapons/mg36.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "RPK" then local sound = playSound3D("soundweapons/pkp.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "AKS-74u" then local sound = playSound3D("soundweapons/aks74u.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "AKS (GOLD)" then local sound = playSound3D("soundweapons/aksgold.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "Saiga 12k" then local sound = playSound3D("soundweapons/sa58v.mp3", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "M4A1 CCO SD" then local sound = playSound3D("soundweapons/m4a1.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 10) elseif weapon == "M14 AIM" then local sound = playSound3D("soundweapons/sks45.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == " " then local sound = playSound3D("soundweapons/makarovpm.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == " " then local sound = playSound3D("soundweapons/g18.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == " " then local sound = playSound3D("soundweapons/revolver.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == " " then local sound = playSound3D("soundweapons/usp45.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) elseif weapon == "Winchester 1866" then local sound = playSound3D("soundweapons/winchester.wav", muzzleX, muzzleY, muzzleZ, false) setSoundMaxDistance(sound, 40) end end addEventHandler("onClientPlayerWeaponFire", root, playGunfireSound)
×
×
  • Create New...