Jump to content

bandi94

Members
  • Posts

    1,037
  • Joined

  • Last visited

Everything posted by bandi94

  1. As far as i know it's not possible to check it with pure LUA ( aka LUA suck's a bit ). For this you would need to use Window's API's on the input handle Level , so this is more like up to the mod's to integrate a function inside MTA's DLL. Bk you will not be able to host a modified MTA version.
  2. Window models Building system V1. ( wall's and window's) Some of you maybe already know that some time ago @FatalTerror started a project about his idea of an MTA version of the "The Sims 3" game. I realy like'd his idea but unfortunately he is inactive for some time i tried to contact him some week's ago but i got no answer so i decided to start developing a similar gamemode. I have some free time so i will develop the gamemode's build system. So player's will be able to register and start building their house ( in that point i will check the player's feedback if the gamemode show's potential i will develop it further with object interaction ,etc .... ). The world generation will be made on small neighborhood which means that a neighborhood will hold 4 house place's ( 4 player's) 2 small park places , etc ..... The neighborhood's will be generated by request on register. Each registred player can join a public neighborhood or a private neighborhood from where he received an invitation and ofc if you don't wanna join you can create a new one ( private / public ). If the gamemode will have potential then there will be an option that you can visit any player from any neighborhood. I will post soon photos of my work. Can you contribute ? Yes you can , i will need some custom object's. So if you know how to make custom object's and you want to help on develop this GM send me a PM. Special THX to @50p who accepted to help in with some custom object;s
  3. local x,y,z = getElementPosition( getLocalPlayer ()) local Ped = createPed(49,x,y,z) local dx,dy = guiGetScreenSize() aimX ,aimY = dx*0.54 , dy*0.3971 function AimOnPosition() local setToX,setToY = 0,0 local hx, hy, hz = getPedBonePosition(Ped, 6) local sx,sy = getScreenFromWorldPosition(hx,hy,hz) setToX = math.abs(dx/2-(aimX)) setToY = math.abs(dy/2-aimY) local a1,a2,a3 = getPedBonePosition(Ped, 6) local a4,a5,a6 = getElementPosition(Ped) local b1,b2,b3 = getElementPosition(localPlayer) local dist = getDistanceBetweenPoints3D(a1,a2,a3,b1,b2,b3) -- here if isRifle then aimX = dx*0.54 + (10 - dist*0.2) -- maybe you will need to play around with 10 or *0.2 to get the right result. else aimX = dx*0.54 end setToX,setToY = getWorldFromScreenPosition(sx-setToX,sy+setToY,dist) _,_,setToX1 = getWorldFromScreenPosition(dx/2,dy/2,dist) _,_,setToX2 = getWorldFromScreenPosition(aimX,aimY,dist) setToX3 = (setToX2 - setToX1) setCameraTarget(setToX,setToY,b3-setToX3+0.2 +(a6-b3)) end function drawStuff() if getControlState("aim_weapon") then AimOnPosition() end end addEventHandler("onClientRender", root, drawStuff)
  4. bandi94

    possible??

    triggerServerEvent("create", localPlayer, team) server side : function create(team)
  5. Okey. I check it out. It seem's that for rifles , the camera will zoom in ( above the shoulder ) and that zoom in mess with setCameraTarget. What you could do is , to filter out the gun's (check if is rifle) if is a rifle then according to the distance add a small offset for the AimX value. Let's say AimX = AimX + (10 - distance*0.2) or something like that ( 10 mean's 10 pixel's - distance*0.2 , how distance will increase the offset will decreas bk you say'd that from 47 feet it's working well , so that offset would be added if the distance is smaller )
  6. Ow I didn't know that. Calculating offsets for some weapons is time consuming and it would be better if MTA team makes setPedAimTarget for localPlayer as well. MTA is just a synchronized code injector , what he dose is hooking up GTA:SA function's and after he read's the LUA command's transform them and send the command to GTA:SA original function's. Most possbile in GTA:SA setPedAimTarget is implemented only for Ped's ( when you play in single player the function is used to control the bot's) , so there is no straight way to implement it for localPlayer the only way would be to hardcode the aimbot into MTA using existing function's ( already suporrted be MTA here i mean camera functions ) so that will be the same thing i did but it would be implemented into MTA's dll , and from script's you would need to call that function ->dose the hardcode -> inject's into GTA:SA camera function's. P.S is so hard to make 2-3 print screen's on some weapon's after that in PhotoShop check the x,y cord of the crosshair ???
  7. Any game you will tell it's secure it's not , even with anticheat softwares and other crap's. I tell you this from my experience from online game's i used/ use to cheat , some of them have almost every 2 day's an antiCheat update ( GameGuard , Xtrap , etc), and you will don't belive me how easy is to inject a dll and mess around with the memory of the game. If you have exp with c++ , _asm you can cheat / beat MTA's anti cheat in no time , and you will be able to mess with anything from GTA:SA. Even to borrow map's that call'd imposibble map copy as dev's say , the map is injected into GTA:SA memory class with some reverse you got a pointer , inject a dll , copy every object. You can inject into MTA and mess with the Serial also told as impossible thing , but there is no such thing as impossbile.
  8. All the magic is done by : aimX ,aimY = dx*0.54 , dy*0.3971 that is the 2D Cord of the crosshair , possible that M4 , etc have other crosshair position. Try to aim with a small wep and see where the crosshair is on your screen after that aim with M4 and compare where the crosshair is now according to that change the aimX,AimY value until it aim's well. After that use a check if is a small wep aimX/Y is x value is is m4 , etc aimX/Y is y value.
  9. As IIYAMA say'd setCameraTarget(X,Y,Z) will put the screen center to X,Y,Z and not the crosshair position , in 3D you can't just add X-1.5 , bk the axe positioning will chnage when you move around to in one angel you need -1.5 in other one you need -5 and -2 on Y and etc....... So you need to calculate all offset's acording to the 3D axe plan , or calculate it in 2D and transform them back to 3D. IT should work on any resolution i tested it on 1024/768 Windowed mode local x,y,z = getElementPosition( getLocalPlayer ()) local Ped = createPed(49,x,y,z) local dx,dy = guiGetScreenSize() aimX ,aimY = dx*0.54 , dy*0.3971 function AimOnPosition() local setToX,setToY = 0,0 local hx, hy, hz = getPedBonePosition(Ped, 6) local sx,sy = getScreenFromWorldPosition(hx,hy,hz) setToX = math.abs(dx/2-(aimX)) setToY = math.abs(dy/2-aimY) local a1,a2,a3 = getPedBonePosition(Ped, 6) local a4,a5,a6 = getElementPosition(Ped) local b1,b2,b3 = getElementPosition(localPlayer) local dist = getDistanceBetweenPoints3D(a1,a2,a3,b1,b2,b3) setToX,setToY = getWorldFromScreenPosition(sx-setToX,sy+setToY,dist) _,_,setToX1 = getWorldFromScreenPosition(dx/2,dy/2,dist) _,_,setToX2 = getWorldFromScreenPosition(aimX,aimY,dist) setToX3 = (setToX2 - setToX1) setCameraTarget(setToX,setToY,b3-setToX3+0.2 +(a6-b3)) end function drawStuff() if getControlState("aim_weapon") then AimOnPosition() end end addEventHandler("onClientRender", root, drawStuff) P.S If we had access to yaw/pitch/roll camera of GTA:SA then it would be easyer to make a very perfect aimbot , but we don't have direct access to yaw/pitch/roll of the camera. In online FPS Aimbot hack's , we control the yaw/pitch/roll it's like a direct link to the game engine camera positioning , so we can make it pin point accurate ( we can kill any target from very very far distance only with one bullet ( headshot) even if the target is moving like crazy or he is jumping / is in free fall , etc.. ). But thi's is up the the mod's to make MTA function's that would alow us to modifi the yaw/pitch/roll directly and not from this kind of camera function's like setCameraTarget , etc .....
  10. how , about create a Ped ( make it invisible ) give him the same wep you have , ammo , etc...... Attach it to you pos ( get your pos , and set the ped's pos ) , rotate your player to the target for visual effect ..... And for shooting use the Ped , after the fire key is released , read the Ped's left ammo , and set your own ammo.
  11. My one include return type + argument's for every function.
  12. I had some time last night and i created a small text generator app , so i generated the auto completion file including return type's and arguments. The whole process was done automaticaly so maybe there are some mistake's but i don't found any one on a fast test. Credit's: @JR10 for the functions.txt from where i generated the auto completion file. Fell free to take my file and release it with your other file's. Copy and Paste it to: Notepad++/plugins/APIs/MTA-Lua.xml I posted it on PasteBin bk the file was to big for the forum : http://pastebin.com/nnEMyHDU
  13. Well yes it's realy simple. Detection methode 2 way : closest by 3D world distance or closes in 2D dist by screen center. MTA has an inbulid aim script but it work's only with Ped's ( And not real player's ) so for aim you need to use some position matrix , maybe adding soem offset's etc... and after that use : setPedLookAt , and other aim function's.
  14. Map's itself not lag the server. But incorrect / bad script usage with map's can lag the server / client. Incorrect / bad script means that if you poor optimize you script it will not the same to loop x time through 10 map and 1k maps. So any script that is using in any way the maps ( showing them in gridlist , checking some stuff for every map , etc) need to be optimized with fewer loops as possbile. If you wanna send the map list from server to client , again it's much better / faster if you add the map name's / info's to a list and send the list to the client than trigger the Client for each map.
  15. After all , you can use only 1 timer and loop trough all vehicles .... Anyway's a good usage of timer's ( including destroying , etc ) , will have no visible effect. A modern 2.5Ghz CPU can handle upto 2.5 billion clock cycles (instructions) per second , so those timer's are nothing for the CPU ...
  16. guiProgressBarSetProgress
  17. I started few day's ago a new Level Tuning system for my server. For now it's quite amazing , after a client-client sync system all players on the server can see your modified infernus after your like/style. The final version will include more that 3 pic's , those 3 were only for test
  18. local account_nr = #getAccounts ()
  19. I have a moded race.zip , i don't need it anymore bk i switched to multiArea. But i will not edit it in any way. If you are intrested i can tell you the thing's that e edited / some pic's.
  20. As far as i know , you can't do that. You must make outside function.
  21. moveObject isLineOfSightClear -- colision detection and you could use some Bound function from easing functions when the object hit's the ground
  22. Yes it is . How ? . You need a horn.mp3 , then bind the horn key , and playSound.
  23. What is so hard ? getElementsByType getElementID getElementPosition getElementRotation and some simple math to get the on Screen X,Y. After DxDrawLine and you are done.
  24. With a userbase that is 50% Intel HD Integrated, yeah it probably is. I own a lenovo Laptop with an Intel HD 4000 / Nvidia GT. Well i run all my games on the Nvidia GPU. But just for curiosity i tried to run MTA (1366x768 , full graphics) on the HD4000 , and i can tell that it's running fairly well with 55-60 FPS on race map's with a nice decoration and a lot of "onClientRender" functions.
  25. CPU - intensive function is : multiplication/division. The CPU can handle easyer 10 summation/subtraction that one multiplication/division. So it's good if you can make less multiplication/division in X amount of time. But be realistic , here we are speaking about very littel difference on a modern I3 CPU or better. So makeing less calculation on every X frame will not magically give you so much + FPS. Ofc that on low end old CPU-s which can run MTA on 20 FPS will feel the resource CPU use, but ehh.. what you expect from a 4+ year old (singel/dual) core CPU (We can mention that GTA:SA is running on a prity bad optimized engine).
×
×
  • Create New...