
qaisjp
Retired Staff-
Posts
2,344 -
Joined
-
Days Won
10
Everything posted by qaisjp
-
can i switch users and run multiple clients in MTA 1.1?
qaisjp replied to SonicTHedgehog's topic in Scripting
I think switching users and running multiple clients causes MTA to be unstable. -
You would have to apply the paintjobs manually. So you would have to load the paintjob txds all at once at the beginning, and later on import the txd when your paintjob changes. Since I just realised paintjobs are nothing more than just another texture for the same vehicle.
-
I will pastebin the fixed version of chatbubbles client side sometime later.
-
Do you mean normalz?
-
blink blink blink wow
-
I am not sure if it is possible to modify paintjobs though, i tried it sometime back; I THINK.
-
Also, read that it says colliion libraries are not supported.
-
a. I WANT IDIOT TITLE q. Am i an idiot D:?
-
Indeed [DKR]Oz, I will be giving great thanks to Kayl and you for your ideas if and when I use them, since I will be releasing them out. So yes, this idea came from DKR server and I give Kayl great thanks for his work. karlis, i will try it out now. Slothman tried it himself and he said he doesn't think it is possible using line of sight, he said try using vehicle rotation. Anyway, i will try it. EDIT: WOOOT IT WORKS! but it is very sensitive, now i need to see how to stop it from being so sensitive D:
-
engineLoadCOL
-
can i switch users and run multiple clients in MTA 1.1?
qaisjp replied to SonicTHedgehog's topic in Scripting
You should test it yourself, bt I have no idea. -
could you explain? i have a small idea of what you said, but i have no idea how to apply it... latest codE: http://pastebin.com/NkK6K8jn
-
I told him to stop PM'ing people, if he asks again I think we should report him...
-
Pastebin Download local stickyEnabled = false local me = getLocalPlayer() local testMode local oldMad=10010101099023980 function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end function isNumberBetweenPoints(number, pointa, pointb) return (number>pointa) and (number) end function isVehicleOnSteepSurface(veh) local x,y,z = getElementPosition(veh) local steepSurface,_,_,_,_,normalx,normaly,normalz=processLineOfSight(x,y,z+1,z,y,z-10,true,false,false,true,false,false,false,false,veh) --i suppose u know what to put in the veh arugments? yes i do =D if steepSurface then steepSurface = getDistanceBetweenPoints2D(normalx,normaly,0,0)>normalz else steepSurface = true end return steepSurface end function onRender() local veh = getPedOccupiedVehicle(me) if not veh then removeEventHandler("onClientRender",root,onRender) stickyEnabled = false outputChatBox("[VEH] Sticky wheels turned to: "..tostring(stickyEnabled)) return end local vehicleIsSurfaced, gX,gY,gZ = isSurfaced(veh) local steepSurface = isVehicleOnSteepSurface(veh) if testMode ~= vehicleIsSurfaced then testMode = vehicleIsSurfaced outputDebugString("Is vehicle on a surface? : "..tostring(testMode)) end if oldMad ~= steepSurface then oldMad = steepSurface outputDebugString("If on surface, is it steep? : "..tostring(oldMad)) end if vehicleIsSurfaced and steepSurface then setVehicleGravity(veh, gX,gY,gZ) else setVehicleGravity(veh,0,0,-1) end end function getPositionBelowElement(element) local matrix = getElementMatrix (element) local offX = 0 * matrix[1][1] + 0 * matrix[2][1] - 1 * matrix[3][1] + matrix[4][1] local offY = 0 * matrix[1][2] + 0 * matrix[2][2] - 1 * matrix[3][2] + matrix[4][2] local offZ = 0 * matrix[1][3] + 0 * matrix[2][3] - 1 * matrix[3][3] + matrix[4][3] return offX,offY,offZ end function isSurfaced(element) local x,y,z = getElementPosition(element) local bX,bY,bZ = getPositionBelowElement(element) local nX,nY,nZ = bX-x,bY-y,bZ-z local isSurface, sX, sY, sZ, surfaceObj = processLineOfSight(x, y, z, bX,bY,bZ, true, false, false, true, false) return isSurface, nX,nY,nZ end function stopSticky() if stickyEnabled then removeEventHandler("onClientRender",root,onRender) veh = getPedOccupiedVehicle(me) if veh then setVehicleGravity(veh,0,0,-1) end else addEventHandler("onClientRender",root,onRender) end stickyEnabled = not stickyEnabled outputChatBox("[VEH] Sticky wheels turned to: "..tostring(stickyEnabled)) end addCommandHandler("sticky",stopSticky) It works fine and my edit determines the following thing. It only sets the gravity below it if it is on a surface and not in the air. I noticed that if I am HIGH above the ground, it disables, but when the bottom of it is near the ground, but not on it, it still enables. It seems that I have done the above thing, it disables when in the air, but now I want to check if the vehicle is on a steep surface...help would be appreciated. I'm not a pro at vector quantities and element matrixes. For those who want this, can get this very soon, but not yet. All you have to do is credit me and the original author of magnetwheels. *please note, if you want to complain about this idea being from being from DKR server, read ahead. DKR server inspired me to make their brilliant DKR stickywheels (originally developed by DKR Kayl) and I give credits for their extra idea added to magnetwheels.* See it in action!
-
a. eh? q. did u know "umadbro" is racist all of a sudden
-
Place the function in the resource and make it do dxDrawColorText and not dxDrawText
-
A. NO YOU MATE D: Q. Can you read my signature?
-
A. There were once... Q. Can we continue with three word story
-
addEvent("onSpecialEvent", true) rootElement = getRootElement () guiTGB = guiCreateWindow(236,380,332,190,"Ten Green Bottles",false) guiSetAlpha(guiTGB,1) guiTGBCoke = guiCreateButton(15,155,63,23,"Coke - 1$",false,guiTGB) guiTGBJuice = guiCreateButton(95,155,63,23,"Juice - 1$",false,guiTGB) guiTGBCokeImg = guiCreateStaticImage(16,29,58,114,"coke.png",false,guiTGB) guiTGBBeer = guiCreateButton(171,155,63,23,"Beer - 2$",false,guiTGB) guiTGBShake = guiCreateButton(248,155,63,23,"Shake - 2$",false,guiTGB) guiTGBJuiceImg = guiCreateStaticImage(100,33,53,110,"juice.png",false,guiTGB) guiTGBBeerImg = guiCreateStaticImage(173,34,58,112,"beer.png",false,guiTGB) guiTGBShakeImg = guiCreateStaticImage(248,36,59,111,"shake.png",false,guiTGB) guiSetVisible(guiTGB, false) addEvent ( "onSpecialEvent", true ) function specialEventHandler ( text ) guiSetVisible(guiTGB, true) end addEventHandler ( "onSpecialEvent", rootElement, specialEventHandler )
-
Also, triggerServerEvent to do a function that does the executeCommandHandler if the weed cmd is s-side
-
Don't advertise Tank07, just PM. Even PM'ing is bad. But posting just to get income..unacceptable. and oh Tank, what you said was impossible, i got more than what i asked for
-
Can you host a dedicated test servers so the people who are looking for servers can test them out?