ksTakor Posted April 12, 2013 Share Posted April 12, 2013 (edited) How can I make the weapon follow my crosshair in a First Person Script Edited May 5, 2013 by Guest Link to comment
Adde Posted April 14, 2013 Share Posted April 14, 2013 You can change it to a bind instead of a command i think. But if so, you have to edit the script. Link to comment
ksTakor Posted April 14, 2013 Author Share Posted April 14, 2013 The camera starts when i start the resource it don't have a command. Link to comment
Adde Posted April 17, 2013 Share Posted April 17, 2013 Okay, i haven´t tested this, but try to reset "fps.lua" with this. Then when script is started you should be able to do /fps to use firstperson. If it doesn´t work, just download the original script again or tell me the debug. checking = 0 carchecking = 0 wright = false wleft = false wback = false function FPSStart () local skin = engineLoadTXD ( "160.txd" ) -- arm skin engineImportTXD ( skin, 160 ) local x,y,z = getElementPosition( getLocalPlayer() ) Body = createObject (991, x, y, z ) setElementParent(Body, getLocalPlayer()) attachElements ( Body, getLocalPlayer(), 0, -0.1, 0.45, 0, 90, 0) setElementAlpha( Body, 0) setElementData ( getLocalPlayer(), "blocker", Body ) realskin = getElementModel(getLocalPlayer()) if realskin == 160 then realskin = 200 end realvoice1, realvoice2 = getPedVoice (getLocalPlayer()) setElementModel ( getLocalPlayer(), 160 ) setPedVoice (getLocalPlayer(),realvoice1,realvoice2) local allcars = getElementsByType ( "vehicle", getRootElement(), false) for theKey,theVehicle in ipairs(allcars) do setElementCollidableWith ( Body, theVehicle, false ) end bindKey ( "left", "both", sidewalking ) bindKey ( "right", "both", sidewalking ) bindKey ( "backwards", "both", sidewalking ) bindKey ( "fire", "both", autoAimMode ) end end addCommandHandler ( "fps", getRootElement(), FPSStart) function clearcars() if getElementType(source) == "vehicle" then setElementCollidableWith ( Body, source, false ) end end addEventHandler( "onClientElementStreamIn", getRootElement(),clearcars) function invisOnSpawn() realskin = getElementModel(getLocalPlayer()) if realskin == 160 then realskin = 200 end realvoice1, realvoice2 = getPedVoice (getLocalPlayer()) setElementModel ( getLocalPlayer(), 160 ) setPedVoice (getLocalPlayer(),realvoice1,realvoice2) end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), invisOnSpawn ) function climbcheck() if isPlayerDead(getLocalPlayer())== false and getControlState("aim_weapon") == false then setElementCollisionsEnabled(Body, false) Link to comment
ksTakor Posted April 22, 2013 Author Share Posted April 22, 2013 Thanks I gonna test. Link to comment
ksTakor Posted April 22, 2013 Author Share Posted April 22, 2013 (edited) [Deleted] Edited April 29, 2013 by Guest Link to comment
Adde Posted April 23, 2013 Share Posted April 23, 2013 Hmm, I don´t know that You should ask someone else about that or wait for someone to answear here. Link to comment
ksTakor Posted April 23, 2013 Author Share Posted April 23, 2013 ok, but you know how to make that when i execute a command come back to third person? Link to comment
Adde Posted April 23, 2013 Share Posted April 23, 2013 No sry, I just helped you a bit on the way. You need something like this, but I don´t really know how to make it in this script. if (not isEnabled) then isEnabled = true addEventHandler ("onClientPreRender", root, updateCamera) addEventHandler ("onClientCursorMove",root, freecamMouse) radar = false else --reset view isEnabled = false setCameraTarget (localPlayer, localPlayer) removeEventHandler ("onClientPreRender", root, updateCamera) removeEventHandler ("onClientCursorMove", root, freecamMouse) radar = true 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