DonOmar Posted July 18, 2016 Share Posted July 18, 2016 (edited) Solved Edited July 18, 2016 by Guest Link to comment
Captain Cody Posted July 18, 2016 Share Posted July 18, 2016 Why don't you just do this server side? Link to comment
DonOmar Posted July 18, 2016 Author Share Posted July 18, 2016 (edited) solved Edited July 18, 2016 by Guest Link to comment
Captain Cody Posted July 18, 2016 Share Posted July 18, 2016 Instead of onClientColShapeHit, use onColShapeHit ..... Link to comment
DonOmar Posted July 18, 2016 Author Share Posted July 18, 2016 Omg iam asking for help in the client side u could help me or no ? Link to comment
Captain Cody Posted July 18, 2016 Share Posted July 18, 2016 What's the issue you are having? Link to comment
DonOmar Posted July 18, 2016 Author Share Posted July 18, 2016 Pffffffff i want to make player glue when touching a vehicle. Link to comment
Captain Cody Posted July 18, 2016 Share Posted July 18, 2016 Yes but what's the issue, there doesn't seam to be any issues I can spot off the bat other then the fact that I suggest you replace source server side with client. Link to comment
DonOmar Posted July 18, 2016 Author Share Posted July 18, 2016 the script is not made by me so i can't change it to Server side Link to comment
Walid Posted July 18, 2016 Share Posted July 18, 2016 the script is not made by me so i can't change it to Server side All what you need is : "onPlayerContact" -- Event Link to comment
DonOmar Posted July 18, 2016 Author Share Posted July 18, 2016 LOL Codyl Learn From Walid he just said 1 word to help me . Link to comment
Captain Cody Posted July 18, 2016 Share Posted July 18, 2016 Well if you could be more clear about what you are asking maybe just maybe I could actually help. I'm tired of all these people in the English scripting section that don't speak a word of proper English asking for scripting help. And if you want to question my scripting abilities, please go ahead and take a look at the first link in my signature. Link to comment
Walid Posted July 18, 2016 Share Posted July 18, 2016 LOL Codyl Learn From Walid he just said 1 word to help me . @DonOmar , You need to respect others here. he tried to help you. Link to comment
DonOmar Posted July 18, 2016 Author Share Posted July 18, 2016 i respect him he is helping me alot too buy i mean u Understood me and Codyl didnt just what i mean Link to comment
Et-win Posted July 19, 2016 Share Posted July 19, 2016 Actually, I didn't find this understandable as well. Link to comment
DonOmar Posted July 19, 2016 Author Share Posted July 19, 2016 ok look at this i made the glue system in server side but when a player is trying to glue on my car he can't . just me can glue on my car. here is the code function gluePlayer(player, slot, vehicle, x, y, z, rotX, rotY, rotZ) attachElements(player, vehicle, x, y, z + 0.16, rotX, rotY, rotZ) setPedWeaponSlot(player, slot) setElementData(player, "gluedYe", true) end function unglue(source, key, state) detachElements(source) setElementData(source, "gluedYe", false) end function glue(_, element) if not getPedOccupiedVehicle(source) then local owner = getElementData(element, "Owner") local gmate = getElementData(source, "g") local gmate2 = getElementData(owner, "g") local smate = getElementData(source, "s") local smate2 = getElementData(owner, "s") if (getElementData(vehicle, "locked") == true) and not (owner == source) or not (gmate == gmate2) or not (smate == smate2) then exports.CIThelp:displayAttachedHelp(0, 0, 1, vehicle, "Vehicle is locked by the owner only group/squad members can glue to it", 1, 255, 0, 0, 180, 5000) return elseif getElementType(element) == "vehicle" then --and getElementData(source, "CIFvip") == true or (getTeamName(getPlayerTeam(source)) == "Staff") then local px, py, pz = getElementPosition(source) local vx, vy, vz = getElementPosition(element) local sx = px - vx local sy = py - vy local sz = pz - vz local rotpX = 0 local rotpY = 0 local rotpZ = getPedRotation(source) local rotvX,rotvY,rotvZ = getElementRotation(element) local t = math.rad(rotvX) local p = math.rad(rotvY) local f = math.rad(rotvZ) local ct = math.cos(t) local st = math.sin(t) local cp = math.cos(p) local sp = math.sin(p) local cf = math.cos(f) local sf = math.sin(f) local z = ct*cp*sz + (sf*st*cp + cf*sp)*sx + (-cf*st*cp + sf*sp)*sy local x = -ct*sp*sz + (-sf*st*sp + cf*cp)*sx + (cf*st*sp + sf*cp)*sy local y = st*sz - sf*ct*sx + cf*ct*sy local rotX = rotpX - rotvX local rotY = rotpY - rotvY local rotZ = rotpZ - rotvZ local slot = getPedWeaponSlot(source) gluePlayer(source, slot, element, x, y, z, rotX, rotY, rotZ) bindKey(source,"jump","down",unglue) bindKey(source,"w","down",unglue) bindKey(source,"a","down",unglue) bindKey(source,"s","down",unglue) bindKey(source,"d","down",unglue) end end end addEventHandler("onPlayerContact", root, glue) 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