Last active
September 14, 2019 15:53
-
-
Save shanapu/075b64a597fddf8be8b074b0ea164852 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sourcemod> | |
ConVar gc_iInt; | |
ConVar gc_iInt2; | |
public void OnPluginStart() | |
{ | |
// Console Variables | |
gc_iInt = CreateConVar("my_int_value", "100", "Description", _, true, 0.0, true, 1000.0); //0.0 min value - 1000.0 maxvalue | |
gc_iInt2 = CreateConVar("my_int_value_2", "150", "Description"); //no min or max value | |
} | |
public void OnMapStart() | |
{ | |
CreateTimer(gc_iInt.FloatValue, Timer_Function); | |
} | |
public Action Timer_Function(Handle tmr) | |
{ | |
PrintToChatAll("Value: %i and value: %i", gc_iInt.IntValue, gc_iInt2.IntValue); | |
PrintToChatAll("Same Value as float: %f and value: %f", gc_iInt.FloatValue, gc_iInt2.FloatValue); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment