-
Posts
877 -
Joined
-
Last visited
Everything posted by denny199
-
Nevermind, uncle Bilal, I have asked my parents.
-
Derp, I'm dutch, not english
-
Well, kina akward, the weiner where i'm talking about.
-
Hey uncle Bilal, I'm having a problem with my weiner here, when i'm seeing pretty girls it goes up and hard, I showed my english teacher my thingy(she's hot) and then she was touching it , when she did that there came some kind of white things out, what is it??
-
So I was just derping arround with the collisions, now there was a bit of a problem, the event "onClientVehicleCollision" is ofcourse triggered when the client's vehicle has been collisioned, now the problem is the updating progress of the car bumping is just a matter of speed, my car bumps when it hit the ped hard, just like you said like wall, when i'm hitting it slowly, it doesn't work like a wall. Now the problem was, when I was hitting the peds with nitro on (infernus), the peds won't fly away, my car would just bump. (see the video below) this was tested with normal peds. Now I tought, maybe the zombies behaves different because it's walking arround etc, so I tested it with the zombies resource, and it was behaving the same... So the "onClientVehicleCollision" isn't working properly with the setElementVelocity on high speed, but what you can do is create colshapes arround every zombie and then when a vehicle hit the colshape, it will calculate the velocity with getElementVelocity or ( https://wiki.multitheftauto.com/wiki/GetElementSpeed ) and then use setElementVelocity to push those nifty zombies away, I don't have time for it, right now but i'll look into it when I have the time ofcourse. Here's the video: And here's the code that i used for the ped velocity (client only), it's not much (yet) but maybe someone can contribute it just because it's awesome to do a job for someone : addEventHandler("onClientVehicleCollision", root, function(collider,force, bodyPart, x, y, z, nx, ny, nz) if collider then if ( source == getPedOccupiedVehicle(localPlayer) ) and (getElementType(collider) == "ped") then -- local fDamageMultiplier = getVehicleHandling(source).collisionDamageMultiplier -- might come in later handy for calculating the damageMultiplier --setElementCollisionsEnabled ( collider, false ) local pedX, pedY, pedZ = getElementPosition ( collider ) local endX, endY, endZ = pedX-x, pedY-y, pedZ-z --[[ calculating output outputChatBox ( endX ) outputChatBox ( endY ) outputChatBox ( endZ ) ]] setElementVelocity ( collider, endX, endY, endZ ) end end end ) I'll probally gonna watch in the weekend for it, since I don't have alot of time right now (so much things for school what needs to be done). (sorry if my english sentences are incorrect, i'm tired ) Regards, Danny
-
Not much, it might require some basic maths (for the inpact rotation etc) but that would be easy, i'd say it would be free... edit: i'll make it for you when i'm home
-
Goddjammit, they are calling me fat online..
-
Hell no, since you got the last post.. We need to wait when someone lock this topic, or when really no-one reacts anymore
-
It works, yes but don't you see the variable's name? "local secondBetweenImageInMS = 30" it's in MS (miliseconds) so it should be "local secondBetweenImageInMS = 30000"
-
Most of the providers in that list are too expensive, doesn't provide VPS'es ,are hosting in the US or the website is in a another langaunge. I was hosting a windows VPS server for 45 euro per month, which was 8GB, with 2 vCPU's and 200 GB HDD, and unlimited traffic, but we are wanting to expand, so we are looking arround for something else.
-
local counter = 1 local starttick local currenttick local images = {"img1","img2","img3"} local x, y = guiGetScreenSize(); local secondBetweenImageInMS = 3000 addEventHandler("onClientRender",root, function() if getPedMoveState ( localPlayer ) == "sprint" then if not starttick then starttick = getTickCount() end currenttick = getTickCount() if currenttick - starttick >= secondBetweenImageInMS then counter = counter + 1 if counter == (#images+1) then counter = 1 end starttick = false end dxDrawImage ( 0, 0, x, y, "images/".. images[counter]..".png" ); end end ) Don't use timers with onClientRender.... just use getTickCount..
-
Bump: does no-one knows a good one?
-
have you included this function in your script?: for i,v in ipairs(getElementsWithinMarker(crimMarker)) do --etc end function getElementsWithinMarker(marker) if (not isElement(marker) or getElementType(marker) ~= "marker") then return false end local markerColShape = getElementColShape(marker) local elements = getElementsWithinColShape(markerColShape) return elements end
-
local x,y = guiGetScreenSize() function test() local xMysz,yMysz,cos1,cos2,cos3 = getCursorPosition() realneX,realneY = fullx*xMysz,fully*xMysz kameraHusta = dxDrawRectangle(x*0,y*0,x*1,y*0.20,tocolor(0,0,0,255)) if realneX > 0 and realneX < 0 + x*1 and realneY > 0 and realneY < 0 + y*0.20 then outputChatBox("test") end end addEventHandler("onClientRender",root,test) Pretty easy
-
Erno errors: CURLE_UNSUPPORTED_PROTOCOL (1) The URL you passed to libcurl used a protocol that this libcurl does not support. The support might be a compile-time option that you didn't use, it can be a misspelled protocol string or just a protocol libcurl has no code for. Site: http://curl.haxx.se/libcurl/c/libcurl-errors.html ======================================================== What you could maybe do is this: server->php file->read content of twitter->send back to MTA If you aren't familiar to php then just say it, I maybe can help you. Edit: https://dev.twitter.com/ Edit2: https://github.com/J7mbo/twitter-api-php Edit3: https://github.com/jublonet/codebird-php
-
Checking if something happened in timer and then disabling
denny199 replied to Pigfoot_Nosebeggar's topic in Scripting
First, welcome to the mta forums! Btw, you forgot [ lua] [/lua] tags ;p (it's left from the spoiler and right from the "center" button ) Your code checks every 10 seconds if the variable called "condition" is true, but you don't have a variable called "condition" in your script, so you can't check it if it's true or not. condition = false function sitAndDo(player) setPedAnimation(player,"BEACH","ParkSit_M_loop",0,false,false,true,true) theTimer = setTimer(function() if condition == true then killTimer(theTimer) end end,10000,0) end function toggleVariabale() condition = not condition -- this is the same as: --[[ if condition == true then condition = false elseif condition == false then condition = true end ]] end -
Hi guys, I want to start a server again, but now i'm just searching arround for a good and reliable hoster and not so expensive, which can provide me a server with minimun of 8GB of ram, and the operating system must be windows. If you can help me with a server then post here or pm me a link of the providers website. Kindly regards, Danny
-
Client side: function checkTransfer() if isTransferBoxActive() == true then setTimer(checkTransfer,2000,1) setElementData(localPlayer,"invincible",true) outputChatBox("--TEXT--",0,255,0) else setElementData(localPlayer,"invincible",false) outputChatBox("--TEXT--",0,255,0) end end addEventHandler("onClientResourceStart",resourceRoot,checkTransfer)
-
Hmm, do you have any shaders on the server? Also try to disable all the textures on the server, and also to set the time to 12:00 to see any difference..
-
Whats wrong with the model, is it to small, or to big??
-
I posted this some days ago: function findPitch(camerax,cameray,cameraz,pointx,pointy,pointz) local dX=camerax-pointx local dY=cameraz-pointz local dZ=cameray-pointy local pitch=math.atan2(dY,math.sqrt(math.pow(dZ,2) + math.pow(dX,2))); return pitch end It's returning in radians, so you need to convert it to degrees: local degree = pitchReturn*(180/math.pi) pitchReturn = The "findPitch" function. It's the same as findRotation but then for the X rotation (up and down) so if someone is underneath you it will calculate the position under you. Here's a little example with a plane: function findYaw(x1,y1,x2,y2) local zRot = -math.deg(math.atan2(x2-x1,y2-y1)) if zRot < 0 then zRot = zRot + 360 end; return zRot; end function findPitch(camerax,cameray,cameraz,pointx,pointy,pointz) local dX=camerax-pointx local dY=cameraz-pointz local dZ=cameray-pointy local pitch=math.atan2(dY,math.sqrt(math.pow(dZ,2) + math.pow(dX,2))); return pitch end car = createVehicle ( 513, 0,0, 10 ) addEventHandler ( "onClientPreRender", root, function () local x,y,z = getElementPosition (localPlayer) local pointX, pointY, pointZ = getElementPosition ( car ) local rotZ = findYaw(pointX, pointY,x,y) local rotX = findPitch(pointX,pointY,pointZ, x,y,z) local degreePitch = rotX*(180/math.pi) setElementPosition ( car, 0,0, 10 ) setElementRotation ( car,-degreePitch,0,rotZ) end) findYaw is the same function as "findRotation". Edit: Put the degree return always in the "-", or else it will point the other way Regards, Danny
-
They got a large database which contains all the data... And even that, how would someone go from level 10 to level 300 in 1 day
