ArtekXDPL Posted July 19, 2015 Author Share Posted July 19, 2015 Thanks you for reply. Im use gamemode DayZ 0.6 r294 + default bot (slothbot?). This bots is include in DayZ 0.6 r294 server files. Im find error in this script: WARNING: guns\command_kill.lua:38: Bad argument @ 'bindKey' [Expected player at argument 1, got string 'mouse1'] command_kill.lua function attach ( ) local theVehicle = getPedOccupiedVehicle ( localPlayer ) if theVehicle then local x,y,z = getElementPosition ( theVehicle ) weapon = createWeapon("minigun",x-3, y , z+1) setElementRotation(weapon,0,0,7) attachElements ( weapon, theVehicle, -0.2, -1.5, -0.2) setWeaponClipAmmo(weapon, 99999) setWeaponState(weapon, "ready") setWeaponProperty(weapon, "fire_rotation", 0, -30, 0) setElementPosition(localPlayer,x-1.5, y , z+1) end end addCommandHandler ( "attach", attach ) local aimSensitivity = 30; function rotateGun_Handler(cX, cY, aX, aY, wX, wY, wZ) local oX, oY, oZ, oRX, oRY, oRZ = getElementAttachedOffsets(weapon); if (oRX-((cY-0.5)*aimSensitivity) > 345 or oRX-((cY-0.5)*aimSensitivity) < 30) then -- Pitch Restriction oRX = oRX-((cY-0.5)*aimSensitivity); end if (oRZ-((cX-0.5)*aimSensitivity) > 330 or oRZ-((cX-0.5)*aimSensitivity) < 360) then -- Yaw Restriction oRZ = oRZ-((cX-0.5)*aimSensitivity); end setCameraTarget(weapon,weapon) setElementAttachedOffsets(weapon, oX, oY, oZ, oRX, oRY, oRZ); setCursorPosition(screenW/2, screenH/2); end addEventHandler( "onClientCursorMove", getRootElement( ), rotateGun_Handler) function fireme() setTimer(function() if getWeaponState(weapon) == "ready" then setWeaponState(weapon, "firing") else return end end,1000,0) end bindKey("mouse1", "down", fireme) Link to comment
xeon17 Posted July 20, 2015 Share Posted July 20, 2015 Why don't you use the latest DayZ version? viewtopic.php?f=108&t=88188 Link to comment
ArtekXDPL Posted July 20, 2015 Author Share Posted July 20, 2015 Why don't you use the latest DayZ version?viewtopic.php?f=108&t=88188 Thanks you for link, Im test this source, but i guess have this same errors in console, and debugmode, what version 0.6 r294. Link to comment
xeon17 Posted July 20, 2015 Share Posted July 20, 2015 I haven't understood you well, if you have the same errors with the latest DayZ version then report it to the developers of DayZ. Link to comment
ArtekXDPL Posted July 20, 2015 Author Share Posted July 20, 2015 I haven't understood you well, if you have the same errors with the latest DayZ version then report it to the developers of DayZ. Okey. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now