• Content count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About UnchiuDawg

  • Rank
    Advanced Member
  • Birthday 04/07/97


  • Gang
    Varrios Los Aztecas
  • Location
  • Occupation

Recent Profile Visitors

337 profile views
  1. get(absolute)CursorPosition

    Thank you everybody, I managed to make it as accurate as possible by using onClientCursorMove. To answer a few questions: I would drag the scroll bar by comparing the absolute position clicked (by using onClientClick) with the float position returned by getCursorPosition multiplied by the screenHeight. I used math.ceil in order to move the scroll bar if there was even a slight difference to approximate the distance between those two positions to one unit. The "problem" was that sometimes the absolute position clicked and the float multiplied by the scren height would not be the same (even though I haven't moved the cursor yet) perhaps by a few pixels, which ended up moving the scroll bar as if I had moved the cursor. This wasn't a huge problem and I know I could have fixed it by not using math.ceil for any value between 0 and 1, but before trying that I was curious if there was any function/event I missed (and it turns out there was). So thanks again ^^
  2. get(absolute)CursorPosition

    I realised my typo, I meant to say that multiplying the float returned by getCursorPosition with the screen height is not accurate. I'd like to know if there is a way to get a more accurate position ^^ Thanks for replying anyway.
  3. get(absolute)CursorPosition

    Hello, I am trying to make a scroll bar that can be dragged using the dx functions. Long story short, want to compare the absoluteY returned by onClientClick with the absoluteY of the current frame (by using onClientRender). The only way to get the current cursor location this way is by using getCursorPosition, which does not return an absolute position. I couldn't find any other function to do this and dividing the screen height by the float returned by getCursorPosition is not accurate. Is there any way to do this? Am I missing something? plz halp lol
  4. clientside max fps

    If a player sets their fps_limit cvar in their client by using the console I am not able to overwrite that limit with setFPSLimit. I tried using it on both serversided and clientsided scripts. I want to run my server at 60fps and I every player to have their framerate as close to it as possible in order to avoid weird desyncing or abusing game glitches affected by the framerate (such as swimming speed, shooting speed, whatever). This is literally the third time I'm explaining it, what is it that you don't understand? lol
  5. clientside max fps

    It makes perfect sense, I want to force the MAXIMUM fps limit, not the MINIMUM. I'm not asking the computer to perform that amount of frames and nothing less, I'm asking it to perform up to that number IF there is enough computing power available. Yes, different FPS limits on different clients will cause them to have different gameplay experiences. My example was regarding the swimming speed difference between low FPS ( 20 fps swimming speed is huge ) and high FPS ( 90 fps would barely move). Your example is an even better one. There are also things like boat speeds being different on different FPS limits. I want all clients to have the fps_limit cvar to be forced to be at least equal with the server's fps limit. If their computers can't handle 60 fps I'm pretty sure it won't be as low as 20 to be that much of a difference. That's what I was asking about, the limiter, the maximum fps limiter, if it is possible to override the fps_limit cvar and how to do so.
  6. clientside max fps

    Hello, I am wondering if it is possible to overwrite a client's maximum FPS or to set it to match the server's maximum FPS. I am aware of the setFPSLimit function, but there's this: "Note: When set client side, the actual limit used is the lowest of both the server and client set values" As some of you might already know, many game physics are affected by the FPS (swimming speed, shooting speed, maybe even more). I've discovered a client command on some german MTA forum that can change the client FPS, fps_limit, but I couldn't find any information on the wikipedia or this forum. I tried using it before connecting to my server and this is what happened after setting it to 20 (fps_limit = 20). After I connect I get this in my console: Server FPS limit: 60 (Using 20). The game is indeed running at 20 fps. I tried to use a clientside script to set the fps to 60 but it still won't change. I fear that people might use this for desync purposes or for abusing the faster swimming speed or stuff like that, so is it possible to just force the maximum FPS?
  7. Object texture/shader

    Alright I see, thanks for the help
  8. Object texture/shader

    Hello, I want to change some places using the map editor and I'm encountering some weird lighting that probably originates from the buildings I'm using. Here's a screenshot example: I would like to fix these or at least make them less obvious. They only look this weird at night. Are there any clientside functions I could use to do it? The only function I've seen on the wiki that seems to be able to help would be engineApplyShaderToWorldTexture, but I think that would change all the buildings that share this model, which I don't want to since the original one would then look weird.
  9. Chatbox text outline?

    Hello! Is there a way to add a black outline or something like that to the chat text? I've noticed there are lots of interface settings that can be changed for the chat, but couldn't find anything like that.
  10. Changing direction slow when aiming

    That's the thing, GTA San Andreas does have this slowdown effect and MTA does it the way it is supposed to be. It's 100% the same as it is in single player without any mods. I was just wondering if there was any possible way to just skip that slowing animation in order to make players harder to hit and to give them more mobility, but I guess it's impossible I've done some research but couldn't find any SA-MP setting or scripting function that would affect this, I guess it was unintentionally hardcoded like that lol
  11. "Threadnet" server setting

    Thank you, I thought it had to be written in the config file in order for it to be enabled.
  12. Changing direction slow when aiming

    Here's the video, I tried to synchronize them as much as possible, please note that on the MTA side I sometimes stop, that's the thing I'm talking about, I'm changing direction but it gets stuck for a second before walking in the other direction which is slow and weird. I am not talking about the time needed to break out of this animation and walk freely, nor the speed at which you can walk in one direction, I'm talking about it getting stuck when trying to switch directions like from left to right or from forward to backward.
  13. "Threadnet" server setting

    Hello, I want to make sure my server's players are synced as good as possible without having any strange glitches happening on the server. While I was looking through the config file and on the wikipedia for more information, I've noticed that there is a setting called "threadnet" (https://wiki.multitheftauto.com/wiki/Server_mtaserver.conf#threadnet), but this setting was not added in the config file by default, and it is missing from the setServerConfigSetting arguments on the wiki page, although it says it can be changed by using that function. Does this setting still exist or was it removed in some previous versions? If I were to add "<threadnet>1</threadnet>" to my config file would it work?
  14. Changing direction slow when aiming

    Hello, I am trying to remove the movement slowing that happens when you're aiming a weapon, walking in one direction and then changing it to the opposite direciton. The reason for which I'm trying to do this is because I have played a lot of SA-MP on deathmatch servers and this movement slow feels very unconfortable when coming from there (for various reasons). I am aware that the movement is supposed to be like this, as it is in the single player game, but I'm just wondering if there's a way to skip/cancel that slowing animation and turn into the opposite direction directly. I've looked all over the wikipedia and forums and couldn't find any function that does this or anybody even asking about this. Here is what I have done on clientside: -- clientside script function weaponMovementFix(key, press) local forwardkeys = getBoundKeys("forwards") local backwardkeys = getBoundKeys("backwards") local leftkeys = getBoundKeys("left") local rightkeys = getBoundKeys("right") local myweapon = getPedWeapon(localPlayer) local mycurrentammo = getPedAmmoInClip(localPlayer) if myweapon == 24 then -- only for the deagle if mycurrentammo ~= 0 then -- don't do it when reloading cause it cancels the reloading if getControlState("aim_weapon") then -- only do it when aiming if not isPedDucked(getLocalPlayer()) then -- don't do it when crouching/ducking for rightkey, rightstate in pairs(rightkeys) do if key == rightkey and press then setPedAnimation(getLocalPlayer(), "python", "python_fire", 0, false, false, true, false, 0) break end end for leftkey, leftstate in pairs(leftkeys) do if key == leftkey and press then setPedAnimation(getLocalPlayer(), "python", "python_fire", 0, false, false, true, false, 0) break end end for fwdkey, fwdstate in pairs(forwardkeys) do if key == fwdkey and press then setPedAnimation(getLocalPlayer(), "python", "python_fire", 0, false, false, true, false, 0) break end end for bkwdkey, bkwdstate in pairs(backwardkeys) do if key == bkwdkey and press then setPedAnimation(getLocalPlayer(), "python", "python_fire", 0, false, false, true, false, 0) break end end end end end end end addEventHandler("onClientKey", getRootElement(), weaponMovementFix) It kind of works, but it is still not instant, it still stops for a very short moment before changing the direction. So if let's say I keep pressing left-right-left-right, I won't move at all. I have tried changing all the arguments for setPedAnimation, or even use another animation, but this is the closes I've got to what I want. And before you ask, I have already tried using all setWeaponProperty on serverside, but none of them affect this "slowing" thing. Also, even with all glitches enabled, still no luck. Is there any better way to do this? P.S. if needed, I can upload a video with side to side aiming to show it if I haven't explained it well enough. Thank you for your help.
  15. getPlayersFromPartOfName

    I've found my mistake: getPlayerFromName is not case sensitive. I can't edit/delete the post above, that's why i'm double-posting.