AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Save a bool to vault? (https://forums.alliedmods.net/showthread.php?t=26030)

NewUser 03-25-2006 22:06

Save a bool to vault?
 
Is it possible to save a bool to vault? I'm 99.9% sure it is. I think you'd have to change the bool to a string, but after that I'm sort of confused.

Xanimos 03-25-2006 22:25

Code:
new VaultValue[2] format(VaultValue , 1 , "%d" , MyBool ? 1 : 0 )
then save the value into your vault and you can use this to get it back
Code:
new VaultValue[2] //<<Get Vault value>> MyBool = (str_to_num(VaultValue) == 1 ) ? true : false


All times are GMT -4. The time now is 16:35.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.