Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot open.mp Questions and Suggestions [Suggestion] Client-side Scripts

 
  • 0 Vote(s) - 0 Average
Suggestion Client-side Scripts
Sasino97
Offline

Software Developer
Posts: 108
Threads: 16
Joined: Apr 2019
Reputation: 7
Location: Tampa, FL
#1
2019-04-19, 05:20 PM
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.
Josh
Offline

Administrator

Posts: 129
Threads: 1
Joined: Feb 2019
Reputation: 20
#2
2019-04-19, 05:25 PM
Not pawn though!
Sasino97
Offline

Software Developer
Posts: 108
Threads: 16
Joined: Apr 2019
Reputation: 7
Location: Tampa, FL
#3
2019-04-19, 05:36 PM
(2019-04-19, 05:25 PM)Josh Wrote: Not pawn though!

Why not?
Josh
Offline

Administrator

Posts: 129
Threads: 1
Joined: Feb 2019
Reputation: 20
#4
2019-04-19, 05:39 PM (This post was last modified: 2019-04-19, 05:39 PM by Josh.)
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.
Sasino97
Offline

Software Developer
Posts: 108
Threads: 16
Joined: Apr 2019
Reputation: 7
Location: Tampa, FL
#5
2019-04-19, 05:55 PM
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?
Josh
Offline

Administrator

Posts: 129
Threads: 1
Joined: Feb 2019
Reputation: 20
#6
2019-04-19, 06:00 PM
https://github.com/Zeex/amx_assembly/blob/master/test/windows/ShellExecute-test.pwn
Sasino97
Offline

Software Developer
Posts: 108
Threads: 16
Joined: Apr 2019
Reputation: 7
Location: Tampa, FL
#7
2019-04-19, 11:54 PM
(2019-04-19, 06:00 PM)Josh Wrote: https://github.com/Zeex/amx_assembly/blob/master/test/windows/ShellExecute-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)
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode