Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: habi on Jul 02, 2023, 05:51 AM

Title: I am making this new script
Post by: habi on Jul 02, 2023, 05:51 AM
To communicate with the client, we use Stream. This needs lots of switches on both sides, especially if you want to get position, etc of a Local Player.

So there arise a need to simplify these. A single function on server side through which the corresponding function of client can be called and the result(Vector etc) returned.


From experiments it looks only three 'operations' need to be performed on remote virtual machine. (client)
1. Function call
2. Get Operation
3. Set Operation

In all these three there arise need to pass table/class/instance on which the operation is to be performed.

So there will be six functions - three of them uses roottable as env and other three ('Ex' functions )permits to specify the env/object as a parameter.

Title: Re: I am making this new script
Post by: PSL on Jul 02, 2023, 11:05 AM
It's a great feature. Good job bro.
But can it coexist with the SendDataToClient function in a blank script?
Title: Re: I am making this new script
Post by: habi on Jul 02, 2023, 09:50 PM
It can coexist with SendDataToClient if first byte is reserved.
eg. 0x40 SendDataToClient(player, 0x00, ...) --- no problem
SendDataToClient(player, 0x39, ...) --- no problem
SendDataToClient(player, 0x41, ...) --- no problem

So we will reserve 0x40 for this property.
Title: Re: I am making this new script
Post by: PSL on Jul 03, 2023, 12:49 PM
Great.  I'm looking forward to it :)
Title: Re: I am making this new script
Post by: habi on Jul 08, 2023, 11:56 AM
Hello all,

I am working on it and the plugin's name when released will be RemExec (for 'Remote Execution')
(https://i.imgur.com/uBC20XW.png)

scratchpad...
(https://i.imgur.com/7OAsLHW.png)

...
Title: Re: Almost getting finished
Post by: habi on Jul 13, 2023, 04:27 PM
Almost getting finished.
Test code:
RemoteExec(SetRemoteValueEx(CallRemoteFunc(GetRemoteValueEx(GetRemoteValue("World"),"FindLocalPlayer")),"Position",Vector(0,0,0)),FindPlayer(0),true,print)Result:
(https://i.imgur.com/nHkZPOP.png) (https://i.imgur.com/dhsNgot.png)