AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Global variable (https://forums.alliedmods.net/showthread.php?t=145367)

Touch 12-15-2010 05:51

Global variable
 
Hello!
Tell me please, with what the team can set a global variable? That the information in it available to all block (event).
That something like this, but define broken.
Thank you!
PHP Code:

if(strcmp(data1"1"true)) {
#define TEXT "1"
}
else
{
#define TEXT "0"
}
PrintToServer("TEXT - %s"TEXT);



FaTony 12-15-2010 13:26

Re: Global variable
 
PHP Code:

decl String:text[4];

if (
strcmp(data1"1"true) == 0)
{
   
strcopy(text4"1");
}
else
{
   
strcopy(text4"0");
}
PrintToServer("text - %s"text);




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

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