kalyn Posted August 17, 2012 Share Posted August 17, 2012 (edited) Hy guys, Recently I get a code from one of the forum members which deletes the fence in area51 because I wanted the players to enter that area, now the fence has dissapeared but all the players of the server gets lagged, even I am lagged and the server runs on my computer. The code is: addEventHandler("onResourceStart",resourceRoot,function(res) if res == getThisResource() then removeWorldModel(16094,118.60,135.17442,1941.87561,19.32008) end end) the code is Serverside but when I made him Clientside doesn't work so that's not the problem, if can you give me any suggestions it would be great. Thanks! Edited August 18, 2012 by Guest Link to comment
Callum Posted August 17, 2012 Share Posted August 17, 2012 This isn't related to lag, but checking whether res == getThisResource() is totally pointless, as the event is only triggered for resourceRoot. Due to this, the function params doesn't need the res declaration. Link to comment
kalyn Posted August 17, 2012 Author Share Posted August 17, 2012 This isn't related to lag, but checking whether res == getThisResource() is totally pointless, as the event is only triggered for resourceRoot. Due to this, the function params doesn't need the res declaration. It behaves like lagging.... And how to edit the function to be right?! Link to comment
Moderators IIYAMA Posted August 17, 2012 Moderators Share Posted August 17, 2012 just write it as old school .lua. function remove( resourcename ) removeWorldModel(16094,118.60,135.17442,1941.87561,19.32008) end addEventHandler( "onResourceStart", resourceRoot, remove ) Link to comment
DakiLLa Posted August 18, 2012 Share Posted August 18, 2012 Try to put setOcclusionsEnabled( false ) after removeElementModel. So the final result will be: function remove( resourcename ) removeWorldModel(16094,118.60,135.17442,1941.87561,19.32008) setOcclusionsEnabled( false ) end addEventHandler( "onResourceStart", resourceRoot, remove ) Link to comment
kalyn Posted August 18, 2012 Author Share Posted August 18, 2012 Try to put setOcclusionsEnabled( false ) after removeElementModel. So the final result will be: function remove( resourcename ) removeWorldModel(16094,118.60,135.17442,1941.87561,19.32008) setOcclusionsEnabled( false ) end addEventHandler( "onResourceStart", resourceRoot, remove ) Is the same, it's like the FPS goes up and down dramatically......? dunno what's the problem to resolve it. Link to comment
denny199 Posted August 18, 2012 Share Posted August 18, 2012 Do you have much more resources running? Do you have the lasted build? Link to comment
Moderators IIYAMA Posted August 18, 2012 Moderators Share Posted August 18, 2012 Maybe reïnstal gta or check if you have mods running(on that object). Link to comment
kalyn Posted August 18, 2012 Author Share Posted August 18, 2012 Maybe reïnstal gta or check if you have mods running(on that object).\the object is the fence around area51 because there I created the Army base and it was closed, but I have like 74 - 75 resources running, idk, if that's the problem.... My computer specifications are: Windows 7 Intel 2 Core Quad Q8300 @ 2,50 GHZ (4 CPU's) 3 GB RAM 250 GB HDD On-Board Video Graphics NVidia GeForce 7100/ nForce 630i 256MB And the down/up speed on aprox 800km's is: Link to comment
kalyn Posted August 18, 2012 Author Share Posted August 18, 2012 Problem resolved it was the RealTime script because of the desincronization of seconds on each player PC..... Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now