OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: danturn on 06 Jul 2008, 23:05:33
-
Basically, i have an NPC who you can 'buy' weapons off in the game.
However the script removes cash from the the players inventory (cash is in the form of a magazine named "rpo_obj3").
What i need to know is, if you have more than one player on the game what do you use in the script?
for example, if there is just one player and his name was bob you would use,
bob removemagazine "rpo_obj3",
is it possible to put something in place of bob so that it will only deduct the magazine from the player was uses the addaction at that particular time?
-
player only refers to the player object on the current client. Actions only run a script on the current client, so using player in this situation is fine. In global triggers, for example, the scripts are run on all machines, so that would be a different situation.
-
meaning? Lol. Does that mean it can or can't be done? I really don't understand what you mean.
-
He means that you don't have to change your script to make it work on a MP server.
-
Ahh i see, so when using player in multiplayer, it actually refers to the person who is, at the time, selecting the addaction?
-
Indeed it does.