SA-MP Forum
November 20, 2009, 02:26:16 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Hosted tab listings available from serverFFS
 
   Home   Help Login Register  
Pages: [1] 2 3 ... 20
  Print  
Author Topic: Linux/CentOS YSF 0.2 released  (Read 23988 times)
Y_Leѕѕ
High-roller
*****
Posts: 2401



View Profile WWW
« on: January 02, 2009, 03:37:43 pm »

YSF 0.2 - Linux/CentOS 0.2x support included!

Introduction

You'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.

Download

Straight to the point:

HERE

Use

  • Windows

Make 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:

Code:
plugins YSF

To "server.cfg".

  • Linux

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:

Code:
plugins YSF.so

To "server.cfg".

  • PAWN

To use the YSF functions in your scripts make sure "YSF.inc" is in "pawno/include".  Then add:

PAWN Code:
#include <YSF>

To the script you wish to use the functions in.  See "Examples" for further usage information.

Fixes

List of bugs and whether or not they're fixed yet in YSF (or can be fixed).  Credits to BeckzyBoi for the original bugs list.

BugStatusNotes

a_objects.inc
  • SetPlayerObjectRot
F

a_players.inc
  • SpawnPlayer
WWhat I thought would solve it didn't, need to find something else to try.
  • GetPlayerInterior
-
  • SetPlayerAmmo
-
  • GetPlayerAmmo
-
  • SetPlayerTeam
-
  • GetPlayerTeam
-
  • GetPlayerColor
F
  • SetPlayerDisabledWeapons
RWas removed, although may be simpleish to implement
  • RemovePlayerFromVehicle
?May be doable by faking the data sent to other players to say that player got out, instead of was forced out
  • TogglePlayerControllable
-Doable
  • SetPlayerCheckpoint
X
  • SetPlayerRaceCheckpoint
X
  • SetPlayerWorldBounds
X
  • AllowPlayerTeleport
FFixed, along with AllowAdminTeleport, was a simple logic mix-up.
  • IsPlayerInCheckpoint
F
  • IsPlayerInRaceCheckpoint
F
  • TogglePlayerSpectating
?Irritating but more a client problem.
  • SPECTATE_MODE_FIXED
?This should put you in spectate mode in a fixed location.  Easily faked with SetPlayerCamera.

a_samp.inc
  • AddStaticPickup
-Should be easy enough to "fix".
  • CreatePickup
WDiscussion.
  • GetWeaponName
-Random.
  • AllowAdminTeleport
FSee AllowPlayerTeleport.
  • SetDeathDropAmount
R
  • DisableInteriorEnterExits
X
  • CreateMenu
X
  • GetPlayerMenu
-
  • TextDrawColor/TextDrawBackgroundColor
-Just hide and reshow them.
  • OnPlayerDeath
?
  • OnVehicleDeath
NFuture expansion.
  • OnPlayerEnterVehicle
?
  • OnRconCommand
F

a_vehicles.inc
  • SetVehiclePos
?Doubt it can be solved.
  • GetVehicleZAngle
?
  • SetVehicleParamsForPlayer
XI've warned people about this before, it's to do with the map icon limit.
  • GetVehicleTrailer
-
  • SetVehicleVirtualWorld
-

string.inc
  • strcmp
?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!
  • strval
F

Misc
  • unloadfs
F
  • SQLite
F

Key
FFixed
YYet to be released (fixed in my dev version)
NNot a bug (IMHO)
RRemoved
XCan't be done server side
-Not looked into
?Don't know
WWIP

Once everything is green or red YSF is basically finished.

Features

List of features which aren't bug fixes or new functions.

  • Improved plugin architecture.
  • Extracted nickname check function, define your own allowed characters.

Functions

List of new PAWN functions.

  • PAWN Code:
    SetPlayerGravity(playerid, gravity);
    Set a single player's gravity (beware desyncs).
  • PAWN Code:
    AddServerRule(name[], value[]);
    Add server information to the server browser.
  • PAWN Code:
    SetServerRule(name[], value[]);
    Modify server information in the server browser.
  • PAWN Code:
    SetPlayerSkinForPlayer(skinplayer, forplayer, skin);
    Set the skin a player sees another player with.
  • PAWN Code:
    GetPlayerSkinForPlayer(skinplayer, forplayer);
    Get the skin one player sees another player using.
  • PAWN Code:
    ffind(const pattern[], filename[], len, &idx);
    Find files matching a pattern.
  • PAWN Code:
    frename(const oldname[], const newname[]);
    Rename a file.
  • PAWN Code:
    dfind(const pattern[], filename[], len, &idx);
    Fine directories matching a pattern.
  • PAWN Code:
    dcreate(const name[]);
    Create a directory.
  • PAWN Code:
    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).

Examples

  • SetPlayerSkinForPlayer

PAWN Code:
new
gLastKiller[MAX_PLAYERS] = {INVALID_PLAYER_ID, ...};

public OnPlayerDisconnect(playerid, reason)
{
gLastKiller[playerid] = INVALID_PLAYER_ID;
}

public OnPlayerDeath(playerid, killerid, reason)
{
// Set your last killer to the clown skin for revenge kills
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);
}
}
}

  • ffind

PAWN Code:
// Find all the vehicle files in Los Santos
main()
{
new
i,
buf[64];
i = 0;
// Find all files matching the given wildcard string
while (ffind("vehiclelists/ls_*.txt", buf, sizeof (buf), i))
{
printf("%d) %s", i - 1, buf);
}
}

  • dfind

PAWN Code:
// List everything in scriptfiles
main()
{
// Start the search in scriptfiles
ListDir("", 0);
}

ListDir(dir[], indent)
{
new
i,
buf[128],
search[128],
ind[16],
x = indent;
// Create a string with the indents in
ind[x] = '\0';
while (x)
{
ind[--x] = '\t';
}
// Generate the search string
format(search, sizeof (search), "%s/*", dir);
i = 0;
// Loop through all matching folders
while (dfind(search, buf, sizeof (buf), i))
{
// Display the current directory
printf("%s%s", ind, buf);
// Enumerate child directories
if (buf[0] != '.')
{
// Call this function recursively to check other dirs
format(buf, sizeof (buf), "%s/%s", dir, buf);
ListDir(buf, indent + 1);
}
}
// Reset count - VERY important
i = 0;
// Loop through all matching files
while (ffind(search, buf, sizeof (buf), i))
{
// List all files
printf("%s%s", ind, buf);
}
}

  • AddServerRule

PAWN Code:
AddServerRule("YSF", "Present");



  • SetServerRule

PAWN Code:
SetServerRule("worldtime", "The morning");

Further examples

More 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.

Building

  • Windows

To build a new Windows version open YPI.sln in Visual Studio and "build" project "YSF".

  • Linux

To build a new version in Linux open a terminal on the "YPI" directory and type:

Code:
make YSF
« Last Edit: February 01, 2009, 08:24:28 am by ssǝן‾ʎ » Logged

Doerfler
Huge Clucker
***
Posts: 329



View Profile WWW
« Reply #1 on: January 02, 2009, 03:40:03 pm »

nice
i love it on linux
Logged

NSG NSG NSG NSG NSG
Sebihunter
Gangsta
****
Posts: 828



View Profile WWW
« Reply #2 on: January 02, 2009, 03:40:24 pm »

finally!
Thanks
Logged



Released Scripts
[GM] Los Santos Partyscript
[GM] CentralRP
[GM] ProjectRealLife Preview
[GM] [GER]ProjectX Alpha
[GM] [GER]Crazy-NeoN
[GM] [GER]ProjectRealLife v1 BETA
[GM] [GER]ProjectRealLife v1 FINAL
[FS]  SeoN <Saving System>

WIP Scripts
--none--

Abandoned Scripts
[GM] Los Santos Partyscript *Reloaded*
[GM] ProjectRealLife / NeoN Improved
[GM] HunterRP
[GM] ProjectRealLife v2 / NeoN Open World 2.0.0
[GM] ProjectRealLife (for MTA:SA 1.0)

Epic Quotes
The greatest thing to happen to SA:MP; an update breaks GF, and you ruin it!

I HAD a OEM vista on my lappy, but after getting 18 viruses in one day... No, i wont use that crappy shit by bill gaytes, thanks.
And linux is MUCH faster than shitsta.

Stop downloading porn then.

Quote
Sebihunter: I am bored
Clum: oh hi bored
Boylett (ServerZ.co.uk)
High-roller
*****
Posts: 1937


View Profile WWW
« Reply #3 on: January 02, 2009, 03:42:54 pm »

Linux+YSF = ftw Cheesy

EDIT: works on CentOS no problems.
« Last Edit: January 02, 2009, 04:13:51 pm by Boylett » Logged
Y_Leѕѕ
High-roller
*****
Posts: 2401



View Profile WWW
« Reply #4 on: January 02, 2009, 03:47:34 pm »

I forgot to mention YSI isn't ported yet, a lot of the base is the same but there's more work for the other streamer bits (more information on what's going on there later).
Logged

Tjong
Big Clucker
**
Posts: 169


View Profile
« Reply #5 on: January 02, 2009, 03:51:29 pm »

Omg this is like a SA-MP 0.2.7 server-release
thx very much Y_Less
What's your next project? Making GTA IV playable on single core CPU's ? :>

*Tjong arranges a new power order*

  • <insert Y_Less here>
  • Chuck Norris
  • God

 Smiley
Logged

Benedikt Adrian
benni_adrian@web.de
Ковалски
Big Clucker
**
Posts: 131


View Profile WWW
« Reply #6 on: January 02, 2009, 03:56:22 pm »

Yahooooo! This is awesome! Thank you Y_Less!

Ковалски
Logged

KowaZ Housing System 0.3.0.4
create a house in one minute!
★ MasterOfQuebec ★
Big Clucker
**
Posts: 87


View Profile
« Reply #7 on: January 02, 2009, 04:26:25 pm »

Thanks you for this plugin.
« Last Edit: January 02, 2009, 04:39:17 pm by ★ MasterOfQuebec ★ » Logged

Quote from: Kye (IRC)
making an MP mod is easy. all you have to do is download RakNet and compile it. then you're pretty much done
brains
Big Clucker
**
Posts: 91



View Profile WWW
« Reply #8 on: January 02, 2009, 04:37:01 pm »

first off thanks a lot for porting this.

the compiler seems to crash because of these two new natives in the include,
PAWN Code:
native SetPlayerSkinForPlayer(skinplayer, forplayer, skin);
native GetPlayerSkinForPlayer(skinplayer, forplayer);
commenting them out solves the problem.
Logged

Goon Theft Auto mta:dm  72.232.254.202:22004  |   Secret Zombie Room: sa:mp 72.232.254.202:6777
Boylett (ServerZ.co.uk)
High-roller
*****
Posts: 1937


View Profile WWW
« Reply #9 on: January 02, 2009, 04:38:12 pm »

first off thanks a lot for porting this.

the compiler seems to crash because of these two new natives in the include,
PAWN Code:
native SetPlayerSkinForPlayer(skinplayer, forplayer, skin);
native GetPlayerSkinForPlayer(skinplayer, forplayer);
commenting them out solves the problem.
No reason for these to crash, it works for me so must be something in your mode Wink
Logged
★ MasterOfQuebec ★
Big Clucker
**
Posts: 87


View Profile
« Reply #10 on: January 02, 2009, 04:42:04 pm »

Is there a way to change the maximum name characters?
« Last Edit: January 02, 2009, 05:44:01 pm by ★ MasterOfQuebec ★ » Logged

Quote from: Kye (IRC)
making an MP mod is easy. all you have to do is download RakNet and compile it. then you're pretty much done
Y_Leѕѕ
High-roller
*****
Posts: 2401



View Profile WWW
« Reply #11 on: January 02, 2009, 07:03:57 pm »

Is there a way to change the maximum name characters?

No.
Logged

=Contador=
Huge Clucker
***
Posts: 269


View Profile
« Reply #12 on: January 03, 2009, 05:01:06 am »

I never had problems with linux plugins before and I don't know what I have to do with this
Code:
[13:53:38]   Failed (/lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by plugins/YSF.so))
and because of that ^ it won't load my gamemode
Logged
~FsK>R@f
Big Clucker
**
Posts: 187



View Profile WWW
« Reply #13 on: January 03, 2009, 05:57:20 am »

Greate job Y_Less Smiley

R@f
Logged

My work:
[APP]R@f's server.cfg generator : [Download]
[GM]Hay 1.0 : [Download]
[FS + PHP]RAdmin - MySQL admin system : [Download]
[FS + AJAX]R@f's Json Server Stats : [Download]
[FS]R@f Admin Script : [Download]
[FS]R@f's Speedo : [Download]
[FS]R@f's Moving TextDraw : [Download]





BeckzyBoi
High-roller
*****
Posts: 4072


View Profile
« Reply #14 on: January 03, 2009, 06:25:27 am »

Y_Less buddy you are amazing Wink
Logged




Pages: [1] 2 3 ... 20
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF one | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!