[Include] SCS.inc | The Most Usefull Include for Server Control
#1

Server Controller
By 4ir-W4ys
Hey, I made a Include that Help You alot about your server Settings. It's Don't have alot functions becuase it's My first release. But it's Tested good. It have 3 very usefull functions
And Supportinf Dini.inc.

How to Use? (Functions)


pawn Код:
LoadServerSettings();
This function will load the Server files from the Dini File (scriptfiles/Server/ServerSettings.ini)
You need to Put it in
pawn Код:
public OnGameModeInit();
Note: As it's Controlling the Game Mode Text Delete the function
pawn Код:
SetGameModeText
Note!!!: Make Sure You got the 'ServerSettings.ini' in your scriptfiles/Server Directory Or the samp-server.exe will crash.
Note!!!: Make Sure You agree'd my License ( Go to the file SCS.inc, Search for 'new Agree = 0' and change it to 'new Agree = 1') Or the samp-server.exe will crash.
----------------------------------------------------------------------------------
pawn Код:
GetServerSourceValue(Source[]);
This command Will get the Saved Source of the Dini
Example:
pawn Код:
public OnPlayerConnect(playerid)
{
    new String[128];
    format(String, sizeof(String), "Welcome to %s", GetServerSourceValue("HostName"));
    SendClientMessage(playerid, White, String);
    return 1;
}
The Source 'HostName' Will get the Server Name from the Dini File.
There are 3 Sources That you can use in GetServerSourceValue:
pawn Код:
/* 1.*/ "HostName" // The Server Name Source
/* 2.*/ "Map" // The Server Map Name Source
/* 3.*/ "Mode" // The Server Mode name Source
-----------------------------------------------------------------------
pawn Код:
ChangeServerSetting(Source[], Setting[]);
That Function will Change the Setting You want In their Source.
Example:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/WeAreInLasVenturas", cmdtext, true))
    {
        ChangeServerSetting("Map", "Las Venturas");
        SendClientMessageToAll(0xFFFFFFFF, "The Server Map Name Changed to {33FF33}Las Venturas");
        return 1;
    }
    return 0;
}
After that Command, The Map Name of the server In SAMP Server Lists will Automaticly Change to Las Venturas
Becuase After That Function Being Used Automaticly It will Use the Function
pawn Код:
LoadServerSettings
And it will be changed!
----------------------------------------------------------------------------------------
I had another thing you can control but For now you cannot cantrol it from the Functins, Just from the ini File.
It's The "InteriorDoors" If it 1 It Enable 0 Is Disable, cannot be used in GetserverSourceValue and SetServerSetting.

Download
Here are Some Mirrors:
2Shared
SendSpace
Uploading


Bugs
You really Think There are bugs in my work? Im Bleeding!!!
Feel Free to PM me or Post here found Bugs

Next Version Features
More Options to Control, Maybe fix a bugs if fund and more.

Peace Out!
Reply
#2

40 Views 0 Replies? It was 2 Hours of Work.
Reply
#3

Because it doesn't seem to be useful...No offense, and don't double post.
Reply
#4

There is something like this already If I'm not mistaken.

GetServerVarAsString /Int /Bool And some rcon cmds.
Reply
#5

wait For Version 2
Reply
#6

Is it no bugs?
Reply
#7

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
Because it doesn't seem to be useful...No offense, and don't double post.
argee with him :\

its not the most useful include for server control.
i suggest you to add some more fuctions/public's for the include,so it will be more useful
Reply
#8

Quote:
Originally Posted by xkirill
Посмотреть сообщение
argee with him :\

its not the most useful include for server control.
i suggest you to add some more fuctions/public's for the include,so it will be more useful
Altight, So im Working On It, wait for Version 2.
Reply
#9

Quote:
Originally Posted by 4ir-W4ys
Посмотреть сообщение
Altight, So im Working On It, wait for Version 2.
ok
waiting for v2..
Reply
#10

Quote:
Originally Posted by xkirill
Посмотреть сообщение
argee with him :\

its not the most useful include for server control.
i suggest you to add some more fuctions/public's for the include,so it will be more useful
Quote:
Originally Posted by xkirill
Посмотреть сообщение
ok
waiting for v2..
Working On It....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)