Jump to content
Sign in to follow this  

Recommended Posts

Hi,

How can i use 'removeAllWeapons player' in remoteexec? or 'deletevehicle vehicle player' with remoteexec? i know the basics about remoteexec and can create some hints,playsound,... with it but i dont know how to do it with those 2?

thx for your help!

 

Share this post


Link to post
Share on other sites

Player is different on each machine, so you either target a defined unit or use commands owner or clientOwner to identify / target a unit.  Otherwise 0 will target all, 2 will target server only, -2 will target all clients excluding server.

 

In regards to owners, server can get any unit's owner but client's can only get their own, they cannot get other owners.  If you want your mission to allow clients to get other unit owners, you have to make and include a function for it.  remoteExecutedOwner will identify where a remoteEx originated from.

Share this post


Link to post
Share on other sites

[nil,{

{player removeWeapon _x}forEach[primaryWeapon player, secondaryWeapon player, handgunWeapon]

}]remoteExex["call",0];

 

or

 

player remoteExecCall["removeAllWeapons",0];

 

Removes all players' current equipped weapons

Share this post


Link to post
Share on other sites
13 hours ago, phronk said:

 

 player remoteExecCall["removeAllWeapons",0];

This will only remove the executing client's weapons, since player is parsed on the executing machine before being transfered. 

 

The first approach you mentioned is required:

 

[[], {removeAllWeapons player}] remoteExec ["call"] 

-Edit-

or better yet define a function in CfgFunctions: 

TAG_fnc_removePlayerWeapons = { removeAllWeapons player } 

and execute it like so 

[] remoteExec ["TAG_fnc_removePlayerWeapons"];

 

Share this post


Link to post
Share on other sites
12 hours ago, phronk said:

[nil,{

{player removeWeapon _x}forEach[primaryWeapon player, secondaryWeapon player, handgunWeapon]

}]remoteExex["call",0];

 

or

 

player remoteExecCall["removeAllWeapons",0];

 

Removes all players' current equipped weapons

No

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×