Home   Help Search Login Register  

Author Topic: Players having fake objects  (Read 528 times)

0 Members and 1 Guest are viewing this topic.

Offline baikie

  • Members
  • *
  • I'm a llama!
Players having fake objects
« on: 14 Feb 2005, 02:51:14 »
Im making a multiplayer mission where some people are robbers and some people are cops, im looking for help for people who might know, lets say the robber go up to a drug dealer (AI) and buy drugs off him for $800 (ive got money scripts working) then goes off somewhere else and sells the drugs to another ai called shipper and gains double the amount of money off him, but when the player has drugs he cant buy anymore and if he dies his drugs are gone.

also players that a cops can inspect people and if the person has drugs on him a hint will show for that cop saying he has drugs or a hint will apear saying he wont have drugs.

im only a beginner scripter and if someone can right me a script for this it will help me improve my skills
 
thank you if anyone helps.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Players having fake objects
« Reply #1 on: 14 Feb 2005, 12:15:10 »
What you are talking about here are switches, and in OFP switches are assocaited with variables.    For example you could have a global variable man1drugsY which is set to false in init.sqs and is set to true when man1 buys drugs.    If the variable is true the mechanism by which he buys drugs is turned off.   When he sells the drugs the variable is set false again.

You could use addAction to add actions to AI robbers and shippers.    When a player approaches them the action will appear in their Action menu.    You can associate the name of the player (given by the mission designer in the name field) with his variable.    If you're not familiar with addAction hunt around - there is plenty of info kicking around the Ed Depot and the forum.
Plenty of reviewed ArmA missions for you to play