Forum Jump :

Author Message


Posts: 4
Rank:


Level: Member

Country: es
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2015-12-06 20:17        
     
I have a script that sends the server a request to run a script that is hosted on the server.

The problem is that has stopped working to change the server from Windows to Linux.

This is the code that attempt to run the script on the server:
[[_uidPlayer,_namePlayer,_sender],"DB_fnc_dataRequest",false,true] call BIS_fnc_MP;

Anyone know because it has stopped working?

Thanks.


Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 20
In-game name: Wak

 
#2 Posted at 2015-12-06 20:31        
     
You could try using remoteExec instead of BIS_fnc_MP.

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage

Advertisement


Author Message


Posts: 4
Rank:


Level: Member

Country: es
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2015-12-09 23:29        
     
RemoteExec does not work with me. I do not understand what happens.

[_uidPlayer,_namePlayer,_sender] remoteExec ["DB_fnc_dataRequest",2];

Thanks.


Author Message


Posts: 50
Rank:


Level: Member

Country: au
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2015-12-10 01:08        
     
You have to whitelist your function now that BIS_fnc_MP uses native remoteExec command introduced not so long ago. Nexus update brought the change, use CfgRemoteExec class in your description.ext file.
https://community.bistudio.com/wiki/CfgRemoteExec
Also it is better to now use remoteExecCall and remoteExec native commands instead of BIS_fnc_MP, it's just here for backward compatibility.

Whitelist Remote exec (without whitelisting) is turned on by default for remote executions from client to server, server to client is not affected.

This post was edited by HoverGuy (2015-12-10 02:31, 678 days ago)


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#5 Posted at 2015-12-10 01:52        
     
Whitelist is turned on by default for remote executions from client to server, server to client is not affected
If i read correct, when you add:
class CfgRemoteExec
{
       class Functions
       {
               mode = 2;
               jip = 1;
       };
       class Commands
       {
       	mode = 2;
       	jip = 1;
       };
};
in you description.ext or config.cpp, you recover the same functionality than Bis_fnc_MP in both ways server/client. Right?

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Author Message


Posts: 50
Rank:


Level: Member

Country: au
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2015-12-10 02:21        
     
The above is correct but why you want to use old call function when theres a native command for it?

The main difference in the syntax is that the last optional bool param and the target bool param have been removed altogether (the target bool param is still handled in the script and converted tho).

This game really needed a hardcoded command, more secure and much more simple way of doing remote executions, now that is done.

By the way BIS_fnc_MPExec has also been removed (was used along with BIS_fnc_MP for packets handling). The way to go is remoteExec/Call my friends!

This post was edited by HoverGuy (2015-12-10 02:28, 678 days ago)


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#7 Posted at 2015-12-10 04:06        
     
Ok, thanks HoverGuy. That sounds clear. I agree with you, there are some improvements in term of safety.
Anybody could fire a AG EG command like setDamage. The problem is do not forget the listing in description.ext, otherwise things are remaining fragile.

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 20
In-game name: Wak

 
#8 Posted at 2015-12-10 10:43        
     
[["parameter0", "parameter1"], TAG_fnc_functionName] remoteExec ["call", 2];

This is still possible too, sorry for not mentioning it.

This post was edited by 654wak654 (2015-12-10 10:54, 677 days ago)

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage





Tags: Bis_Fnc_Mp