Home   Help Search Login Register  

Author Topic: Need help to give player Menu back after respawn  (Read 1355 times)

0 Members and 1 Guest are viewing this topic.

Offline Travis Shipley

  • Members
  • *
Need help to give player Menu back after respawn
« 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.
« Last Edit: 06 Jun 2007, 16:39:00 by Mr.Peanut »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Need help to give player Menu back after respawn
« Reply #1 on: 06 Jun 2007, 12:33:23 »
Do you use instant respawn?

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Need help to give player Menu back after respawn
« Reply #2 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?
urp!

Offline Travis Shipley

  • Members
  • *
Re: Need help to give player Menu back after respawn
« Reply #3 on: 06 Jun 2007, 19:23:18 »
There is a 30 sec respawn delay, I will check Mr.Peanut thx