Disable f4
#1

Hello guys is there a way i could disable f4 system which will return to class selection after death?
Because i have a system where my players change skin at clothes shops!
Reply
#2

Look
Reply
#3

i actually dont get it to be honest...
Reply
#4

Save their skin in their playerdata array (or pData, or whatever you call it).
Also set a variable to "1" for example when they are allowed to return to class selection.
When they press F4, your script didn't set that variable to 1, so inside OnPlayerRequestClass you check if the variable is set to 1.

If it's set to 1, let them use OnPlayerRequestClass normally, to allow them choosing their skin.

If it's not set to 1, immediately spawn them using SpawnPlayer (first use SetSpawnInfo) and set their skin to the skin you saved earlier and exit the callback using return.

When they press F4 in that case and die, they will very briefly return to class-selection, but spawn right away, bypassing the skins in class-selection.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)