Home   Help Search Login Register  

Author Topic: "player" in mp?  (Read 1424 times)

0 Members and 1 Guest are viewing this topic.

Offline ryankaplan

  • Members
  • *
  • yeah...
"player" in mp?
« on: 23 Nov 2004, 00:13:13 »
is there a command for player in mp? in the command reference it says this value is diffrent for each computer, naturally, but i need all the list of players. so, if a dead body is 300 meters (or whatever measurement ofp uses) away from all players, it gets deleted.

i sp it would be

?(player distance _deadunit > 300) : deletevehicle _deadunit

how can i do this in mp? thanks to people who will help.

Offline CrashDome

  • Members
  • *
Re:"player" in mp?
« Reply #1 on: 23 Nov 2004, 04:06:04 »
There is no quick way of getting a list of all players in a MP mission. It involves using publicvariable (which can be quite unreliable in some cases) and some careful coding. However, The Chain of Command's Network Services maintains a list of all players if you use it in your mission. I do suggest above all that you find one of the many delete dead guy scripts located on this very site. They work great and require no coding by you!

Here is a good one that will work in MP:
http://www.ofpec.com/editors/resource_view.php?id=583

It is time based, set for 10 secs I believe, but simply modify the script to make it however long you wish.

I am trying to find what I used to use to get a player list, but I now use CoC's Network Services in all my MP missions and no longer use my old method. If I remember correctly, my old way did not work 100% of the time either....



StonedSoldier

  • Guest
Re:"player" in mp?
« Reply #2 on: 23 Nov 2004, 16:15:09 »
ryan, at the the start of the mission have a trigger that covers ONLY playable units

WEST PRESENT

activation : players = thislist

now that will give you a global varible containing all the players

so just do something like

{?(_x distance _deadunit > 300) : deletevehicle _deadunit} foreach players