
Pickanothername
Members-
Posts
29 -
Joined
-
Last visited
Everything posted by Pickanothername
-
Destroy Objects from client to server
Pickanothername replied to Pickanothername's topic in Scripting
If i try pickup the box -- Line #99 triggerClientEvent("destroyBox", localPlayer, index) @alex17" -
Destroy Objects from client to server
Pickanothername replied to Pickanothername's topic in Scripting
-- Client local boxes = { {2969, 2484.1240234375, -1519.0988769531, 23.9921875, 0, 0, 55.477935791016}, } -- //////////////////// LOAD BOXES //////////////////// -- for i,v in pairs(boxes) do local r = math.random(1,270) if isElement(obj) then destroyElement(obj) end obj = createObject(v[1], v[2], v[3], v[4]-0.9, 0, 0, r) end -
Destroy Objects from client to server
Pickanothername replied to Pickanothername's topic in Scripting
the problem is that this is done by onClientClick in my script -- Client function takeBox(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, element) if element and getElementType(element) == "object" and button == "left" and state == "down" then local x, y, z = getElementPosition(localPlayer) local x1, y1, z1 = getElementPosition(element) local distance = getDistanceBetweenPoints3D(x,y,z,x1,y1,z1) if distance < 3 then if getElementModel(element) == 2969 then setElementData(localPlayer, "boxes", boxes+1) destroyElement(element) end end end end end How to destroy this element for all players -
Hi, how to destroy objects created in client side, but i want to destroy it for all players (server side) -- Client triggerServerEvent("destroyBox", localPlayer, element) -- Server function destroyBox(element) destroyElement(element) end addEvent("destroyBox", true) addEventHandler( "destroyBox", resourceRoot, destroyBox)
-
Never mind, im stupid ?
-
How to trigger to give 100$ to player in server side?
-
Hello, how to make money transfer animation? The same as in the original gta sa, i.e. animation of such random numbers when adding money for the player. example: https://imgur.com/1ry6HL0
-
function take(theElement) if getElementData(shape, "take") == "+" then -- How to check colShape date element from server side? if not isPedInVehicle then return end if (theElement == localPlayer) then local veh = getPedOccupiedVehicle(localPlayer) local model = getElementModel(veh) if model == 485 then triggerEvent("notiAdd", localPlayer, "success", "Done") else triggerEvent("notiAdd", localPlayer, "error", "Error") end end end end addEventHandler("onClientColShapeHit", root, take) How to getElementData colShape from server side?
-
exports.bone_attach:attachElementToBone(wheelbarrow, localPlayer, 4, 0.75,-0.25,0,20,50,225) Hello, when I try to change the last 3 rotation arguments, the wheelbarrow moves at strange angles, how can I rotate it so that it is normal?
-
Hello, can someone tell me how to create setTimer so that after 7 seconds print (1) appears?
-
Nice help...
-
Hello, I would like to report using the name of an existing server to increase popularity A real server that was first launched a year ago in December: https://discord.gg/TmvpmqtFKE A counterfeit that was created recently and uses my name to promote its server: https://discord.gg/ww5g6M7PBZ
- 1 reply
-
- 1
-
-
Bump
-
Help?
-
Video: https://streamable.com/85q1as How to fix this?
-
Help me?
-
Video: https://cdn.discordapp.com/attachments/862977613114376223/1025836205436317786/xd.mp4 How to fix this?
-
Hello, I searched the internet and still haven't found a map from Grand Theft Auto Vice City to MTA: SA, can someone help me? Any link to download the map or someone has a map that they can share? The map does not have to be original, as long as it works
-
Thanks!
-
@Burak5312 I do not know if you know but this link does not work, so I ask if someone can send me maps Nie wiem czy wiesz ale ten link nie działa dlatego pytam czy ktoś może podesłać mi mapy
-
Hello! Anyone have 1.2 r20 tactic maps? I will be grateful if someone has them and sends them because they are terribly hard to find on the Internet.
-
@Hydra It's Work't local w, h = guiGetScreenSize () function glue(thePlayer, cmd) local tx, ty, tz = getWorldFromScreenPosition ( w/2, h/2, 50 ) local px, py, pz = getCameraMatrix() local hit, x, y, z, elementHit = processLineOfSight ( px, py, pz, tx, ty, tz ) if hit then attachElements(theElement, theElementToAttach, posX, posY, posZ, rotX, rotY, rotZ) end end addCommandHandler("glue", glue)
-
@Hydra Thanks bro!
-
@Burak5312 Can you write a sample script so I know what to base on?
-
How do I attach a player to a map element? So if I would, for example, stand on a lamp that was created with a map editor and after entering the command / glue, I would attach to it