Jump to content

Pirulax

Discord Moderators
  • Posts

    403
  • Joined

  • Last visited

Everything posted by Pirulax

  1. Btw, its 500 px width. I think i found it. if value < 5 then minigame.TotalMoney = (200000 * 5) / value - 100000 elseif value > 5 then minigame.TotalMoney = (200000 / 5) * (value-5) + 100000 end Just reversed the first one xdd
  2. btw, just before someone tries to pass table thru setElementData: u cant.
  3. Okey, so, i have this: Picture I hope you got it.I want to calculate the amount of money, but i cant find any working idea... Btw, u need to use the width, which is: 0 - left side 5 - center 10 - right side. Isnt the most accurect example, but i hope u got the idea. btw, its for a minigame.
  4. Of curse, you cant jump, because you didn't even enable the control.. Read some MTA wiki please..But, the actual problem is, that currently theres no event that can be triggered when the animation ends, so you need to play a little bit with setTimer(function() setPedAnimation(element) end,TIME, 1) Good Luck.
  5. Hello!Write me a PM if you feel like, so i can answer the question in hungarian! And, please give us a code...
  6. you should use wiki before creating a plan... if the plan fails use GOOOGlE and then forum.
  7. @pa3ck Belive me, i would comment "use /debugscript 3 and read this" everywhere, in every post.Nah, even if you know enligsh, than u can suppose whats the error..For example i never have read that Debugging turorial. P.S. bad enlgish... sometimes
  8. --//*** --//**Server-Side --//*** addEvent("warpPedIntoVehicleEvent", resourceRoot, function(veh) -- use resourceRoot if you want only to call the event from the same res, this way you can save CPU warpPedIntoVehicle(client,veh) --here i use global variable client, its always the players element who calls the function with triggerServerEvent.Its more secure then sending the player thru. end) --//*** --//**Client-Side --Use this ClientSide to warp the ped into the veh. --//*** triggerServerEvent("warpPedIntoVehicleEvent",resourceRoot) --use resourceRoot if the event is in the same resource as triggerServerEvent / triggerClientEVent, this way u cant save CPU. Btw WarpPedIntoVehicle() is a shared function.
  9. I want to help you, but i cant write a script now..Use some setElementData, and some if statements.And, if you have a custom minimap, that its much easier Btw, if the blip is created client side, i think you can destroy it with destroyElement(), but im not sure about that(and im lazy to look at the element list) Edit ==> Blip is an element.Element list ==> elements.
  10. MTA is not that kind of game which loves trailers...There will be some syncing bugs
  11. The problem is that the element data named "acc:admin" doesnt exists.. try to relog.. if that doesnt help, then just download the newest version..The newest mod is publicated by DNS.. like 6 days ago And guys, it is a leaked script... But let him open an External edit server, and i cant do some NON on it >DD
  12. I would change that root to just resourceRoot, because the eventHandler is in the same resource.You can save a little bit of cpu. addEventHandler("onColShapeHit", resourceRoot, function(player, dimension) if colshapes[source] then outputChatBox("player entered the col shape", player) end end) btw i think everything is working fine.
  13. function onClientResStart() local file = downloadFile("http://216.172.184.135:21/fastdl/soundtracks/soundtrack1.mp3") end addEventHandler("onClientResourceStart",resourceRoot,onClientResStart) function loool(filename,succ) if succ and filename == "soundtrack1.mp3" then playSound(filename) else outputChatbox("Downloading of " .. filename .. " failed!" end end addEventHandler("onClientFileDownloadComplete", resourceRoot,loool) should work.
  14. Did i mention somehwere that i want done scripts?I dont think so, i just wanted a function, a freaking in-built MTA function for it.. if theres no in-built function, than okey, i will write a lua one, and thats it... i didnt mention that i want a full script... omg Lol, good idea And freeze the player + anim, and thats it.
  15. *Can i solve this bug * im from Romania. No, you cant solve this.. this is a sync bug, MTA is good at syincing, but not when syncing towned vehicles, trains, and anything thats attached. Or maybe you can, if you disable player damage, or attach yourself to the train(i dont think that this will work..)
  16. Or just creating a simple script local posTable = {} function replaceAllWorldModels() for k,v in ipairs(getElementsByType("objects")) do --gets alll the object elemnts in the gta world local rotx,roty,rotz = getElementRotation(v) -- gets the rotation local posTable[v] = {Vector3(getElementPosition(v)),getElementModel(v),rotx,roty,rotz} -- stores the position, and such thing in a table with key of the element. removeWorldModel(getElementModel(v),1000,posTable[v][1]) -- removes the world object end for k,v in ipairs(posTable) do createObject(v[2],v[1],v[3],v[4],v[5]) -- This creates the object. end end should work fine.. but still cant understand why the hell u want to replace all the objects..this is laggy btw..
  17. Did u read what i said?The original camera shaking is handled with onClientPreRender, and if i use setCameraMatrix than the camera will look at the position for only 1 frame...And then the original camera shaking will overwrite the position.
  18. I said that the original respawnPlayer camera shake is on onClientPreRender..and setCameraMatrix will work only for 1 frame.
×
×
  • Create New...