Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 14/03/21 in all areas

  1. We all know high FPS limits cause various GTA bugs. But the most common annoyance, is that at FPS limits higher than 70, it becomes hard to move around while aiming a weapon (e.g start walking sidewards) which happens between 71-74 FPS, after which at extremely high FPS limits (80-100 FPS) it's no longer possible to strafe. For all server owners that have a reason to set high FPS limit but don't want to get this annoying bug, i wrote this scripted solution: local previousTask = false local defaultFpsLimit -- Store FPS limit on resource start to ensure its reliability (as server FPS limit) function getLimit() defaultFpsLimit = getFPSLimit() end addEventHandler("onClientResourceStart", resourceRoot, getLimit) local isAdded = false -- Just optimization for the render event to limit unnecesary execution function optimizeRender(prevSlot, curSlot) if not isAdded and (curSlot >= 2 and curSlot <= 6) then addEventHandler("onClientRender", getRootElement(), fixStrafing) isAdded = true elseif isAdded and (curSlot <= 1 or curSlot >= 7) then removeEventHandler("onClientRender", getRootElement(), fixStrafing) isAdded = false end end addEventHandler("onClientPlayerWeaponSwitch", localPlayer, optimizeRender) function fixStrafing() local weapon = getPedWeaponSlot(localPlayer) -- Don't execute if player isn't holding a (suitable) weapon -- This selects only weapons that are guns and suffer from strafing bug (slot 2, 3, 4, 5 and 6) -- Allowing other weapon types will bug the script as throwing/punch weapons don't support 'release' state of TASK_SIMPLE_USE_GUN if not (weapon >= 2 and weapon <= 6) then return end local newTask = getPedTask(localPlayer, "secondary", 0) if (previousTask ~= "TASK_SIMPLE_USE_GUN" or false) and (previousTask ~= newTask) then setFPSLimit(70) elseif (previousTask == "TASK_SIMPLE_USE_GUN") and (previousTask ~= newTask) then setFPSLimit(defaultFpsLimit) end previousTask = newTask end So basically it temporarily sets the player's local FPS limit to 70 (which fully supports walking sideways) only when you are aiming a weapon and restores it when they stop aiming down the sights. Now it works perfectly and seamlessly (player doesn't feel it) and it's also optimized. Again, if you have a reason to use high FPS limits.. this script only lifts the boundary (takes away the first serious GTA bug in line - moving while aiming) but when you reach the next boundary, you'll get a range of other FPS and physics related GTA bugs. But yeah, depending on your server, using this script may allow you to use even higher FPS limits than 70 / 74 by delaying the problems. Download link (community): TBA
    1 point
  2. Oh actually I didn't notice a mistake in the triggerServerEvent. Now this should work: triggerServerEvent("onAdminShot", resourceRoot, hitElement)
    1 point
  3. You reduced the FPS limit in mtaserver.conf, basically this script makes it so you don't need to do that. Yes, that's known. Maybe you should read the topic
    1 point
  4. no in Morocco they think Gamemode is called Backup.
    1 point
  5. Hello there,today i bring an inventory script,as the name suggests it's an inventory to store all your items from weapons to food/repairkit ,to use an item it is easy as just pressing use within selecting the amount .It is very easy and stable and was built using SQL,hopefully it is up to standards. You still have the option to use commands : ./use weaponname amount ./use itemname ./store weaponname amount ./drop weaponname amount (need to be stored) Current Items: Food: Boosts the player's health by 10 if he's low. Repairkit: Gives the vehicle 100 health (only if it's too damaged) Exported functions which you can use them in other scripts : (server side) getPlayerItem(player,itemname) updatePlayerItems(player,itemname,value) TakePlayeritem(player,itemname,value) Download link : https://community.multitheftauto.com/index.php?p=resources&s=details&id=18155
    1 point
  6. Hello this is my first time posting so i don't know if i am the right/wrong section however Is there any way to stream youtube links ingame? in 2014 we used some converting links to turn the youtube link into mp3 before playing it using playSound , does this way still exist or not? or is it possible to stream youtube links as mp3 ingame or its just a dead end and i have to use a browser 2nd , i created bots using Slothbot's script however the bots doesn't take damage at all is that normal? or one of the scripts maybe interfering with peds damage? Thank you kindly
    1 point
×
×
  • Create New...