Jump to content

Perseus

Members
  • Posts

    5
  • Joined

  • Last visited

Details

  • Gang
       
  • Location
    Brazil
  • Occupation
    student
  • Interests
    MTA, Lua

Perseus's Achievements

Vic

Vic (3/54)

0

Reputation

  1. well, I can not use right now my other pc so I had to use a VM
  2. As I said, I tested on a local server having almost 0 ping, if you see teleporting is because of the script for testing weapons while the target is running to make it harder. The weapon have a very high damage, only 3 shoots needed to kill from back/front, but it takes a lot more to kill from the sides, almost all the bullets. I recorded another video, this time trying to compensate the latency: https://www.youtube.com/watch?v=3Pz8j6Pkwdg in this other I've decreased the weapon accuracy from 1 to 0.7: https://www.youtube.com/watch?v=rc7O9pNLO34 I will try to reinstall the server and run a clean installation without modifications. Is there a way to code a resource for lag compensation? Because I have played servers having 300 ping but never happened this, maybe they have some system to compensate.
  3. https://www.youtube.com/watch?v=MgkMWq29BsI As you can see in the video, the player will not get damage from the sides while sprinting, but if you pay attention when I shot him to his back then he take damage. Details: The weapon has 0 recoil, so thats not a problem, also it happens even in local server, so its not lag. I tried changing player_sync_interval from 100 to 50 but nothing. I tested also while disabling all the resources that could be causing the behavior. setWeaponProperty(31, "pro", "damage", 90) setWeaponProperty(31, "std", "damage", 90) setWeaponProperty(31, "poor", "damage", 90) setWeaponProperty(31, "pro", "accuracy", 1) setWeaponProperty(31, "std", "accuracy", 1) setWeaponProperty(31, "poor", "accuracy", 1) setWeaponProperty(31, "pro", "weapon_range", 300) setWeaponProperty(31, "std", "weapon_range", 300) setWeaponProperty(31, "poor", "weapon_range", 300) This is the only modification I did, but the problem happens even with other weapons that I didn't modify the stats. As you see, the weapon have 0 recoil and good accuracy/range. You can even see the player bleeding but not taking any damage, and the crosshair is always on his body, so its not bad aim. Did I miss to setup something else in the server? EDIT: Forgot to mention that the other player is just my other computer and i'm using a script to make him run, not sure if this script can be causing something but here is it: function runP () setControlState ( source, "forwards", true) setControlState ( source, "sprint", true) setElementPosition(source, -1493.04590, 2599.95068, 55.68750, false) end setTimer(addEventHandler("onClientPlayerWasted", root, runP), 400, 100)
  4. Well its weird because as I said, I removed all resources from the "resources" folder, the only resource I kept is "Play", I removed included resources in the xml file. Idk what file could be doing it
  5. Hello So i'm learning lua scripting for MTA, I got some doubts, i'll be very glad if you help me answering three questions. 1) I was attempting to read and understand one of the default MTA resources, that resource is "Play", you have it in your resources folder (if you didnt removed it). There's something that is really confusing to me, in the first lines you see a variable called VehiclesToSpawn, with coords and vehicle IDs, it confuses me because there's no such functions like spawnVehicle or createVehicle, I used the vscode filter to search those functions but nothing found. This makes me think ¿for real you can use only a variable to spawn vehicles? didnt know you can use a variable like that, I thought a function is needed, for example SpawnVehicle, please I need explanation how is that possible, how just with a variable you can spawn vehicles, without functions. I tried removing all resources in the "resources" folder, except for "Play" resource, I thought maybe there's some exported function, or maybe other resource was included in the xml file, the only resource included was "Freeroam". So I deleted the line in xml to include "Freeroam", and the resource "Freeroam" ofc. But still "Play" resource still working, vehicles still spawning only with that variable? or so it seems. Explain please, it confuses me 2) I saw in MTA wiki some functions like getDistanceBetweenPoints3D, in the description of the resource says something about pythagorean theorem, also in some resources from the community I saw some mathematical terms like "Sin Cos Tan", and some terms that looks like algebra. Then my question is ¿do you need advanced knowledge in algebra and trigonometry to script your own server in mta? I mean good scripts that are within the standards ofc. And the last 3) To enable OOP you have to activate it in a xml file. But I always thought the only programming you do in mta is OOP, if its not OOP then what kind of programming is? Procedural Programming, Logical Programming, Functional Programming, Object-Oriented Programming? how many programming paradigms can be used in mta? Sorry for bad english
×
×
  • Create New...