Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Dreadleif

How do you build "Removeaction" inside "RemoteExec" ? [SOLVED]

Recommended Posts

Hello! Hope you're having a good day, and thanks for wanting to help someone. :D

 

I've read the remoteExec page but I can't understand how to structure a normal command like "dave removeaction 0" inside a remoteExec. How would I transform this into a "removeaction 0" instead of removeallactions? I'm totally green on these commands.

_nul = NPC1 remoteExec [ "RemoveAllActions", 0, true ]; //remove action for all

______________________________________________________________________________

My full script for anyone interested (in case anyone wants to show me a better way to build the whole thing for MP, but not required reading for answering the question):

if (cash < 12000) then

{

   hintSilent parseText format["<t size='1' color='#00FF3C'>You don't have enough money</t>", d];

} else {

	cash = cash - 12000;

	_nul = Dave remoteExec [ "RemoveAllActions", 0, true ]; //remove action for all

	//"TALK"
	Dave say3D "Dave";
	Dave setRandomLip true;
	sleep 3;
	Dave setRandomLip false;
	buytruck setVehicleLock "UNLOCKED";

   hintSilent parseText format["<t size='1' color='#00FF3C'>Received keys for military truck</t>", d];

} };

The above script is called in multiplayer from the NPC's init:

 this addaction ["Buy Military Truck for $ 19000", {"scripts\npc\talk_dave.sqf" remoteExec [ "BIS_fnc_execVM",2 ] }]; 

Thanks!

  • Like 1

Share this post


Link to post
Share on other sites

 _nul = [Dave,1] remoteExec [ "removeaction", 0, true ]; //Remove action for all clients and JIP
 

Still not sure about how it works exactly, but I think this did it. Responded as fast as I could. :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

×