YSF 0.2 - Linux/CentOS 0.2x support included!
IntroductionYou've been asking for it for months, and it's FINALLY done! This new version of YSF, so fundamental I created a whole new topic for it, supports Windows 0.2.2, 0.2.2r2 and 0.2x AND Linux 0.2x. I will not be doing support for older Linux versions so don't even ask, if you can't be bothered to upgrade to the latest version that's your own lookout.
The .so also apparently supports CentOS.
DownloadStraight to the point:
HEREUseMake sure "YSF.dll" is in your "plugins" directory. If you don't have a "plugins" directory make one in your root server directory. Then add:
plugins YSF
To "server.cfg".
Make sure "YSF.so" is in your "plugins" directory. If you don't have a "plugins" directory make one in your root server directory. Then add:
plugins YSF.so
To "server.cfg".
To use the YSF functions in your scripts make sure "YSF.inc" is in "pawno/include". Then add:
#include <YSF>
To the script you wish to use the functions in. See "Examples" for further usage information.
FixesList of bugs and whether or not they're fixed yet in YSF (or can be fixed). Credits to BeckzyBoi for the original bugs list.
| Bug | Status | Notes |
a_objects.inc | | |
| F | |
a_players.inc | | |
| W | What I thought would solve it didn't, need to find something else to try. |
| - | |
| - | |
| - | |
| - | |
| - | |
| F | |
| R | Was removed, although may be simpleish to implement |
| ? | May be doable by faking the data sent to other players to say that player got out, instead of was forced out |
| - | Doable |
| X | |
| X | |
| X | |
| F | Fixed, along with AllowAdminTeleport, was a simple logic mix-up. |
| F | |
| F | |
| ? | Irritating but more a client problem. |
| ? | This should put you in spectate mode in a fixed location. Easily faked with SetPlayerCamera. |
a_samp.inc | | |
| - | Should be easy enough to "fix". |
| W | Discussion. |
| - | Random. |
| F | See AllowPlayerTeleport. |
| R | |
- DisableInteriorEnterExits
| X | |
| X | |
| - | |
- TextDrawColor/TextDrawBackgroundColor
| - | Just hide and reshow them. |
| ? | |
| N | Future expansion. |
| ? | |
| F | |
a_vehicles.inc | | |
| ? | Doubt it can be solved. |
| ? | |
- SetVehicleParamsForPlayer
| X | I've warned people about this before, it's to do with the map icon limit. |
| - | |
| - | |
string.inc | | |
| ? | strcmp returns the lexographic difference between two strings, the fact that this value can be used to see if two strings are the same is not it's main function. I don't know what the lexographic difference between a string a nothing is, requires looking up to see if this is really a bug or just a function working differently to how people expect. Basically: use dcmd! |
| F | |
Misc | | |
| F | |
| F | |
| Key | |
| F | Fixed |
| Y | Yet to be released (fixed in my dev version) |
| N | Not a bug (IMHO) |
| R | Removed |
| X | Can't be done server side |
| - | Not looked into |
| ? | Don't know |
| W | WIP |
Once everything is green or red YSF is basically finished.
FeaturesList of features which aren't bug fixes or new functions.
- Improved plugin architecture.
- Extracted nickname check function, define your own allowed characters.
FunctionsList of new PAWN functions.
SetPlayerGravity(playerid, gravity);
Set a single player's gravity (beware desyncs).AddServerRule(name[], value[]);
Add server information to the server browser.SetServerRule(name[], value[]);
Modify server information in the server browser.SetPlayerSkinForPlayer(skinplayer, forplayer, skin);
Set the skin a player sees another player with.GetPlayerSkinForPlayer(skinplayer, forplayer);
Get the skin one player sees another player using.ffind(const pattern[], filename[], len, &idx);
Find files matching a pattern.frename(const oldname[], const newname[]);
Rename a file.dfind(const pattern[], filename[], len, &idx);
Fine directories matching a pattern.dcreate(const name[]);
Create a directory.drename(const oldname[], const newname[]);
Rename a directory*.
* This function used to be identical to frename, it's now not, make sure you're using the correct one (they still interchangeable on Windows).
Examplesnew
gLastKiller[MAX_PLAYERS] = {INVALID_PLAYER_ID, ...};
public OnPlayerDisconnect(playerid, reason)
{
gLastKiller[playerid] = INVALID_PLAYER_ID;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if (killerid != INVALID_PLAYER_ID)
{
new
last = gLastKiller[playerid];
if (last != killerid)
{
if (last != INVALID_PLAYER_ID)
{
SetPlayerSkinForPlayer(last, playerid, GetPlayerSkin(last));
}
gLastKiller[playerid] = killerid;
SetPlayerSkinForPlayer(killerid, playerid, 264);
}
}
}
main()
{
new
i,
buf[64];
i = 0;
while (ffind("vehiclelists/ls_*.txt", buf, sizeof (buf), i))
{
printf("%d) %s", i - 1, buf);
}
}
main()
{
ListDir("", 0);
}
ListDir(dir[], indent)
{
new
i,
buf[128],
search[128],
ind[16],
x = indent;
ind[x] = '\0';
while (x)
{
ind[--x] = '\t';
}
format(search, sizeof (search), "%s/*", dir);
i = 0;
while (dfind(search, buf, sizeof (buf), i))
{
printf("%s%s", ind, buf);
if (buf[0] != '.')
{
format(buf, sizeof (buf), "%s/%s", dir, buf);
ListDir(buf, indent + 1);
}
}
i = 0;
while (ffind(search, buf, sizeof (buf), i))
{
printf("%s%s", ind, buf);
}
}
AddServerRule("YSF", "Present");

SetServerRule("worldtime", "The morning");
Further examplesMore code elsewhere taking advantage of YSF's features:
Sets the world time to an hour/minute combination and uses SetServerRule to update the time viewed in the server browser.
BuildingTo build a new Windows version open YPI.sln in Visual Studio and "build" project "YSF".
To build a new version in Linux open a terminal on the "YPI" directory and type:
make YSF