All Activity

This stream auto-updates     

  1. Past hour
  2. I am currently trying to replace gates at KACC, I have a script that removes the gates, and creates new ones in their place, then when a player hits a col shape, gates open, the only problem is, I want to check if the gates are fully opened (at a certain rotation since moveObject adds/subtracts from current rotation) and only if they are, move them back, never really done rotations with moveObject, so this is a pretty hard thing to start on... Here is server side code. --Replace gates in KACC and add Col shape to open/close them removeWorldModel (985 , 7.3802581, 2497.2419, 2774.2747, 10.7167) removeWorldModel (986, 7.4280729, 2497.2119, 2768.4243, 11.38819) RGate = createObject (986, 2497.3999, 2769.0991, 11.53, 0, 0, 90) LGate = createObject (985, 2497.3999, 2777.0701, 11.53, 0, 0, 90) ColGate = createColCuboid (2487.15, 2765.28, 10, 20, 15.75, 5) isGateOpen = false --By default this is false local OpenTimer --In case I need to use these later to cancel timer local CloseTimer function KACC_Open ( thePlayer, matchingDimension ) --Open gate if getElementType ( thePlayer ) == "player" then if isTimer(OpenTimer) then --Checking for timer outputChatBox("Timer Found",thePlayer) end if isGateOpen == false then --If it's false x,y,z = getElementRotation(LGate) --Below if is how I tried fixing it, didn't work if not z == 20 then return end moveObject(RGate, 2000, 2493.3999, 2766.7, 11.53, 0, 0, 70) --Move the gate and add 70 to z rotation moveObject(LGate, 2000, 2493.3999, 2779.6, 11.53, 0, 0, -70) --Move the gate and subtract 70 from z rotation OpenTimer = setTimer(function() isGateOpen = true end,2000,1) --Set timer to put boolean to true end end end addEventHandler ( "onColShapeHit", ColGate, KACC_Open ) function KACC_Close ( thePlayer, matchingDimension ) --Close gate if getElementType ( thePlayer ) == "player" then if isGateOpen == true then --If it's true x,y,z = getElementRotation(LGate) --Below if is how I tried fixing it, didn't work if not z == 90 then return end moveObject (RGate, 2000, 2497.3999, 2769.0991, 11.53, 0, 0, -70) --Move the gate and subtract 70 from z rotation moveObject (LGate, 2000, 2497.3999, 2777.0701, 11.53, 0, 0, 70) --Move the gate and add 70 to z rotation CloseTimer = setTimer(function() isGateOpen = false end,2000,1) --Set a timer to put the boolean to false end end end addEventHandler ( "onColShapeLeave", ColGate, KACC_Close ) I know where I went wrong, the 2 second timer isn't enough to set it true as player can run in and out in that time, but how would I fix it? Because if I set it to true right away it moves too much the other way when I leave the col shape... Thanks for any suggestions/fixes

    San Andreas Response Services active and running! What you're waiting for?
  4. Today
  5. New logo MTA :D

    I'll be working on a three dimension version of this logo soon. I'm going to likely be setting up an MTA HQ on my Gostown map I am currently working on so I think that'd look nice on it from the distance. The issue I see personally with hunts is that it lacks depth, in my version I'll be making the letter pop out and right below them the character.
  6. How to change map gtasa to mtasa <3

    The above mod loader is only for vehicles, if you would like a custom map you can search the community or head here - a bunch of high accuracy conversions and even a unique JSeries original map.
  7. [Help]CJ Skin
  8. setTimer(function() if canPedBeKnockedOffBike(localPlayer) then setPedCanBeKnockedOffBike(localPlayer,false) end end,50,0)
  9. Yesterday
  10. Oh wow, thank you! It works. This was a lot easier than I thought. It also fixed another problem I had so now I don't even have to use dxDrawImageSection anymore and can use dxDrawImage instead. Thanks!
  11. dxDrawImageSection with section bigger than image

    DxSetTextureEdge Use the texture edge 'Clamp'
  12. Hi, I have a little problem with dxDrawImageSection. When the section that I'm drawing becomes bigger than the actual image, it will start showing the "other side" of the image again. If I have a picture which is 500x500, and I draw a section of it from 200 to 700, it will draw the part from 200 to 500 followed by 0 - 200. This is a problem as I need it to stop drawing at 500. Is there a way to turn this off or avoid this? Bonsai
  13. ديسكورد خاص بلعبة Multi Theft Auto: San Andreas اهلاً وسهلاً بكم!
  14. Spawn with Weapons

    function onPlayerSpawn() giveWeapon(source,getWeaponIDFromName("parachute"),1,true) end addEventHandler("onPlayerSpawn",getRootElement(),onPlayerSpawn) NOTE: Put it on server side
  15. Calling all old farts

    Hey, I'm still here too hahaha
  16. Spawn with Weapons

    First before anything put that in a proper lua bracket.
  17. Calling all old farts

    It's alright laddio you're only 7 years late.
  18. We are now accepting PayPal as payment method! New Year Sale will end soon, hurry up:
  19. function getXMLNodes(xmlfile,nodename) local xml = xmlLoadFile(xmlfile) if xml then local ntable={} local a = 0 while xmlFindChild(xml,nodename,a) do table.insert(ntable,a+1) ntable[a+1]={} local attrs = xmlNodeGetAttributes ( xmlFindChild(xml,nodename,a) ) for name,value in pairs ( attrs ) do table.insert(ntable[a+1],name) ntable[a+1][name]=value end ntable[a+1]["nodevalue"]=xmlNodeGetValue(xmlFindChild(xml,nodename,a)) a=a+1 end return ntable else return {} end end for k,v in ipairs ( getXMLNodes ( "objects.xml" , "obj" ) ) do local row = guiGridListAddRow ( gr1 ) ; guiGridListSetItemText ( gr1 , row , 1 , , false , false ) guiGridListSetItemText ( gr1 , row , 2 , v.model , false , false ) end
  20. MTA PUBG

    To create a full sized game mode you must first start with creating something small; and maybe complex. If you have no clue as to what you are doing I would highly recommend you begin with finding broken community scripts and debugging them, after you get the general hang of fixing those scripts change to analyzing the codes and recreating them from scratch. After you get the hang of that you start creating your own stuff; start small and build up. While these steps may sound insignificant they will for sure help vastly with learning MTAs built in lua. which in turn will allow you to get a hang of doing more advanced stuff. Also, @Khadeer143 and @[MTA]Weed quit fighting or I will report you both for disrupting a topic.
  21. MTA PUBG

    Guys try to help instead of arguing
  22. [SHOW] Vehicle Reverse Light System

    Oh that uses a advanced as all hell system. I put a lot of research into this one and am not going to release the formula 'For now at-least' . But for a hint this uses alot of dummies of sort.
  23. منع النزول من المركبه

    من ف1 يعني ؟ السيارات
  24. Mover vehiculo con ped dentro

  25. Teams y Zombies

    local equipo = createTeam('Asesino de zombies',0,255,0) local data = 'Zombie KIlls' local maxKills = 10 function muerteZombie(asesino) local kills = getElementData(asesino,data) or 0 kills = kills+1 if kills >= maxKills and getPlayerTeam(asesino) ~= equipo then setPlayerTeam(asesino,equipo) end setElementData(asesino,data,kills) end addEventHandler('onZombieWasted',root,muerteZombie)
  26. السلام عليكم .. ابي طريقة اقدر امنع اللاعبين من نزول السياره في عالم معين .. وهو : 999
  27. متجيبه هنا في الخاص
  1. Load more activity