OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: Travis Shipley on 06 Jun 2007, 07:37:30

Title: Need help to give player Menu back after respawn
Post by: Travis Shipley on 06 Jun 2007, 07:37:30
So I am working on a script where a certain player has some extra menu items to respawn vehicles. The game starts and he has the menu. The problem is when he dies, he does not respaen with the menu items any more. They can disconnect and reconnect to the came and get the menus back. I need to be able to have them come back after respawn.

The code I have is as follows:

;;E-BFCO_Veh_Respawn_Menu.sqs
 
;;This script will govern the East BFCO and his menu system for respawning vehicles
 
;;called in init.sqs
;;      [] exec "E-BFCO_Veh_Respawn_Menu.sqs"
 
Code: [Select]
@alive Player
?(Player == EBFCO): goto "GiveMenu"
exit
 
#GiveMenu
EGiveMenu=0
_AID = Player addaction ["Vehicle Respawn Menu","E-VehMenu.sqs"]
_AID2 = player addaction ["Obj Status Report","Report_Obj.sqs"]
 
#Wait
?(EGiveMenu==1): goto "GiveMenu"
?(!alive player): goto "NotAlive"
~3
goto "Wait"
 
#NotAlive
Player RemoveAction _AID
Player RemoveAction _AID2
@(alive Player)
goto "GiveMenu"

Any help is appreciated.
Title: Re: Need help to give player Menu back after respawn
Post by: Mandoble on 06 Jun 2007, 12:33:23
Do you use instant respawn?
Title: Re: Need help to give player Menu back after respawn
Post by: Mr.Peanut on 06 Jun 2007, 16:43:05
You use a variable called EGiveMenu , set it to 0 and compare it to 1, but nowhere do you set its value to anything else? Have you forgotten something?
Title: Re: Need help to give player Menu back after respawn
Post by: Travis Shipley on 06 Jun 2007, 19:23:18
There is a 30 sec respawn delay, I will check Mr.Peanut thx