• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Suggestion] Client-side Scripts
#1
Client-side Scripts

[Image: zXSrDGv.png]



A feature?that I discussed on Discord.

I think it would be an extremely useful feature, once the?open.mp team starts?working on the client.

This would have a lot of advantages, including optimization by removing the useless?amount of traffic sent between the server and the client, and a better responsiveness.



See the speedometer example in the image above. In a normal SA:MP server, the server is continuously asking the client for his velocity, the client answers, then the server tells the client to redraw the text draw, and so on. This forces the developer to be careful of how often to update the text draw, based on how many players does the server usually have, in order not to slow everything down.



Instead, if the server uploads a (compiled) script to the client upon the first connection, in a similar way to how 0.3DL models are uploaded, and then is able to tell the client when to start and stop its execution, then the speedometer example above can be made in a much more effective ways: the client itself, which knows its own vehicle speed, draws its own text draw as defined by the script, as many times per seconds as the developer wants. This creates a better responsiveness at zero bandwidth cost.
  Reply
#2
Not pawn though!
  Reply
#3
(2019-04-19, 05:25 PM)Josh Wrote: Not pawn though!



Why not?
  Reply
#4
As I said in discord, amx_assembly is the reason for no pawn scripts client side.

Even if everyone wasn't to abuse it, there would still be a possibility.
  Reply
#5
Yes I remember, still I don't get how could it be abused.

Are you actually telling me that if I use amx_assembly, I could potentially access functions that are not defined as natives by the client which hosts the AMX machine?
  Reply
#6
https://github.com/Zeex/amx_assembly/blo...e-test.pwn
  Reply
#7
(2019-04-19, 06:00 PM)Josh Wrote: https://github.com/Zeex/amx_assembly/blo...e-test.pwn



Ok now I know something I didn't, thanks. I can't believe they were able to do that only by using PAWN; at first I though it was a plugin.



However, the AMX machine is open source, so it could be modified not to allow #emit and similar (or maybe there's already an option for that)
  Reply


Forum Jump: