Creating a server var? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Creating a server var? (
/showthread.php?tid=225597)
Creating a server var? -
1337connor - 13.02.2011
Hey, i've seen it been done before.. Whats the function to do it?
Re: Creating a server var? -
cessil - 14.02.2011
new servervar;
Re: Creating a server var? -
-Rebel Son- - 14.02.2011
and you would use this as.
(say you were using it to track somthing)
---------------------------------
For a global variable.
-
pawn Код:
new Example[MAX_PLAYERS];
and you would use that as. Example[playerid];
Re: Creating a server var? -
Calgon - 14.02.2011
Quote:
Originally Posted by -Rebel Son-
and you would use this as.
(say you were using it to track somthing)
---------------------------------
For a global variable.
-
pawn Код:
new Example[MAX_PLAYERS];
and you would use that as. Example[playerid];
|
They are both global variables, providing you don't limit the scope by placing the variables/arrays within a function.... The second example is an array with the dimensions of MAX_PLAYERS (500) so 500 cells are created as integers.
Re: Creating a server var? -
1337connor - 14.02.2011
Not SCRIPT Var's.. Server vars. Custom ones.
For Example
Show's up in the SAMP client to the right, I've seen custom ones done, and am wondering how to do that.
Re: Creating a server var? -
cessil - 14.02.2011
you change the weburl in the server.cfg, other things such as gravity, world time and weather can be done in the script using functions such as SetGravity, SetWorldTime or SetWeather
Re: Creating a server var? -
Ultima - 14.02.2011
You people should spend a while reading.
connor, if you mean something like

It can be done by using YSF Plugin
I literally ******d a bit, and found this
https://sampforum.blast.hk/showthread.php?tid=136102
This is where i got the information from, although i can't offer you any help with YSF as I've never used it.
Good luck!
Re: Creating a server var? -
Ultima - 14.02.2011
I believe
https://sampforum.blast.hk/showthread.php?tid=113485 is it