OnPlayerKeyStateChange when player dies | EditObject() vs dialogs
#1

Hi.

Would be very good, if on player state was worked when player dies.
I want to respawn the player, when player dies and press F. (KEY_SECONDARY_ATTACK)
(Currently this is not bug, because player updates doesn't run when state wasted, but would be very good to solve somehow this problem.)

The second problem is with dialogs, when you edit object or in textdraw select mode and then show dialog for player.
If you press ESC in dialog, the player will quit from select mode.
Reply
#2

It is normal for selection mode to be cancelled when you press escape in a dialog, you really don't need to have selection mode open when a dialog is displayed anyway.

I suggest you cancel it before showing the dialog, and start it again under OnDialogResponse.

note: I found that under some circumstances, particularly in dialogs, you might need to delay SelectTextDraw() for a few hundred milliseconds for some reason ( I'm still looking at that )
Reply
#3

For the respawning thing that you want, just prevent them from spawning under OnPlayerSpawn (make them spectate other players?) then ask them to press F to spawn. Make sure you code it correctly though as when you spectate off it will call OnPlayerSpawn again, and you'll end up not being able to spawn.
Reply
#4

Okey.

Thanks for the ideas.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)