Check if player has cooldown left?Solved
Hello, I not understand how check result of true or false?
who can help me?, i need example.
I have this 
var test = (double)Kits?.Call("PlayerKitCooldown", player.userID, "test" );
puts(test);//Show All result.
if(test) {
 Player.Message(player, "Available for you.", null, null);
} else {
 Player.Message(player, "Sorry, not available for you.", null, null);
}​
if (test == 0)
I use, this not work for me.
I have two calls, in the first case it works.
var checkHome = (double)Kits?.Call("PlayerKitCooldown", player.userID, "test" );
			if(checkHome == 0 ){
			quickMenuElements.Add(new CuiButton
            {
                Button = { Command = $"{KitHomeButtonCommand}", Color = $"{KitHomeButtonColor}" },
                RectTransform = { AnchorMin = "0.02 0.09", AnchorMax = "0.52 0.15" },
                Text = { Color = $"{KitHomeButtonFontColor}", Text = $"{KitHomeButtonText}", FontSize = KitHomeButtonFontSize, Align = TextAnchor.MiddleCenter }
            }, Main);
			} else {
				quickMenuElements.Add(new CuiButton
				{
					Button = { Command = $"{SpawnCopterButtonCommand}", Color = $"{SpawnCopterButtonColor}" },
					RectTransform = { AnchorMin = "0.02 0.09", AnchorMax = "0.52 0.15" },
					Text = { Color = $"{SpawnCopterButtonFontColor}", Text = $"{SpawnCopterButtonText}", FontSize = SpawnCopterButtonFontSize, Align = TextAnchor.MiddleCenter }
				}, Main);
			}​
What doesn't work about it?
Hello, i have true (1), if i get kit this response not change.

Merged post

And how show response in puts();?
Puts(checkhome.ToString());
5e13a8d5b2bc5.jpg Wulf
Puts(checkhome.ToString());

Big very thanks for help me, i changed one variable and this worked.

Locked automatically