tma Posted February 6, 2011 Share Posted February 6, 2011 Hey, I just wanted to suggest a few things for consideration ... onPlayerScreenShot Event An event that is fired any time a client takes a screen shot, weather by a bind or /screenshot. fileRename() A server command to rename a file. Currently, you would have to copy the original file and then delete it. Ped as a camera target Currently, setCameraTarget() is limited to only players as targets. It would be really good if it could be set to other elements, especially peds e.g. for use in spectating a ghost driver playback. I'm not sure if these two are bugs/features but I will list them here ... + The onPlayerChat() event never seems to have a valid "client" value when it fires i.e. it's null. All other events seem to set "client" and "source" correctly so they can be validated to confirm that the correct client is firing the event. I don't know if there's a reason for "client" being null for this event but I thought I'd post it anyhow (this is present in 1.0.4 that I am using). + onTrailerAttach() doesn't seem to fire consistently for ped driven vehicles. It fires fine for normal players, but for peds, it only happens occasionally. Thanks - and still enjoying the mod after so many years. Link to comment
eAi Posted February 6, 2011 Share Posted February 6, 2011 What would onPlayerScreenShot be useful for? fileRename: Useful yes, though the workaround isn't that hard. I can't think of any reason setCameraTarget wouldn't work on peds. Looking at the code on Google Code it looks like it'd be a one line change to fix this. Report it on http://bugs.mtasa.com, or better still, write a patch for it! The onPlayerChat one sounds like a bug. Looking at the code on Google Code, I can't see an obvious reason for that though. I suggest reporting this as a bug on http://bugs.mtasa.com. Link to comment
tma Posted February 6, 2011 Author Share Posted February 6, 2011 Thank you for the reply. To answer: + onPlayerScreenShot: This request was primarily driven by the fact I script for a DD/DM server and one of the tricks was to spam screenshots so altering your lag and thus collision. I wanted to trap this to determine who was trying to gain an advantage by doing so. I appreciate that recently the screenshot taking code was enhanced, but it might still be useful. I could also see it being potentially used on an RP server. + fileRename(): Yeah, I do have the work-around running at the moment. I was just thinking that a proper rename function would be a cleaner method. It would also stop me having to copy of up to 2mb of data only to then delete it (I'm doing this in a Ghost Driver playback script where older recordings are kept for roll-back purposes when cheater recordings are found). + I have submitted issues for setCameraTarget() and onPlayerChat(). (Although the camera one appears to be a dupe) Link to comment
eAi Posted February 7, 2011 Share Posted February 7, 2011 I would have thought a screenshot limiter would be a better choice. I'm not sure what the state of the screenshot code is, but we may be able to multithread it to improve performance. Link to comment
Deltanic Posted February 7, 2011 Share Posted February 7, 2011 Make that configuratable in some file, like in mtaserver.conf. If you're just in some server where nobody cares about lagg, you shouldn't be restricted to screenshots. Link to comment
Recommended Posts