20.08.2011, 23:43
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 functionsBy 4ir-W4ys
And Supportinf Dini.inc.
How to Use? (Functions)
pawn Код:
LoadServerSettings();
You need to Put it in
pawn Код:
public OnGameModeInit();
pawn Код:
SetGameModeText
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[]);
Example:
pawn Код:
public OnPlayerConnect(playerid)
{
new String[128];
format(String, sizeof(String), "Welcome to %s", GetServerSourceValue("HostName"));
SendClientMessage(playerid, White, String);
return 1;
}
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[]);
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;
}
Becuase After That Function Being Used Automaticly It will Use the Function
pawn Код:
LoadServerSettings
----------------------------------------------------------------------------------------
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!