Home   Help Search Login Register  

Author Topic: Removeaction for all players  (Read 1578 times)

0 Members and 1 Guest are viewing this topic.

Offline JTS2009

  • Members
  • *
Removeaction for all players
« on: 29 Apr 2012, 19:30:37 »
hi all. I made some small SQS script for my mission. In this mission (idea has been taken from chernarus life) you can pick up suitcase with random items (script for random items I dont write here). Now is here the problem. In Init of suitcase I write:

this addAction["(Pickup)", "PickUp.sqs", nil, 6, True, True, "", "(_target distance _this) < 2"];

PickUp.sqs:

_OBJ = _this select 0;
_TARGET = _this select 1;
_ID = _this select 2;
_OBJ removeAction _ID;
player playmove "AmovPercMstpSnonWnonDnon_AinvPknlMstpSnonWnonDnon"
~1.5
DeleteVehicle _OBJ
exit

The problem is, that if player press action 'pickup', the action will be deleted but only by this player, who pressed the button. While he go down and takes suitcase, during 1.5 seconds I can use this action too :( Do you know how to delete here action from this suitcase for all players if one player press it?  :( Please help, it's very important!  :( :( :(
« Last Edit: 29 Apr 2012, 22:03:50 by JTS2009 »

Offline Willsdorf

  • Members
  • *
Re: Removeaction for all players
« Reply #1 on: 06 May 2012, 10:28:11 »
I don't understand in your script you remove the suitcase [deletevehicle _obj] so no one can "press" the action one more time.
\"Qui n\'entend qu\'une cloche n\'entend qu\'un son.\"