Jump to content

Small patch for admin resource


Tuna

Recommended Posts

Posted

While bugtracker is down. Basically, when you open admin spectate there are 4 events that get handled, and 4 when you close spectate. If you close spectate and then open it again, you'll get an annoying debug error because one event is still being handled. This is because when closed the wrong event is removed:

  
--Opened: 
addEventHandler ( "onClientPlayerWasted", _root, aSpectator.PlayerCheck ) 
addEventHandler ( "onClientPlayerQuit", _root, aSpectator.PlayerCheck ) 
addEventHandler ( "onClientCursorMove", _root, aSpectator.CursorMove ) 
addEventHandler ( "onClientRender", _root, aSpectator.Render ) 
  
--Closed: 
removeEventHandler ( "onClientPlayerWasted", _root, aSpectator.PlayerCheck ) 
removeEventHandler ( "onClientPlayerQuit", _root, aSpectator.PlayerCheck ) 
removeEventHandler ( "onClientMouseMove", _root, aSpectator.CursorMove ) --Just needs to be made "onClientCursorMove" 
removeEventHandler ( "onClientRender", _root, aSpectator.Render ) 
  

For somebody who can commit to mtasa-resource:

http://tunaftw.com/adminspectate.patch.zip

Remove the .zip once you've downloaded to get the patch file (my server didn't like .patch)

  • 2 weeks later...
Posted

find these lines in admin script, and follow the comment on line 11 (replace onClientMouseMove with onClientCursorMove)

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
Date Submitted: 2009-07-10 22:44

I think it's already applied.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...