SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Thread Tools Display Modes
Old 16/05/2014, 05:19 PM   #1
kurta999's Avatar
Join Date: Apr 2009
Location: Slovakia (HU)
Posts: 1,374
Reputation: 626
Default YSF - kurta999's version

YSF - kurta999's version

YSF is a special addon, which purpose is to pull out maximum possibilities from the server, mainly with memory editing and hooking.


After a lot of updates, I was forced to create new topic for my updated version of YSF. It was originally developed by ****** (the name was: ******'s Server Fixes), he abandobed it formerly, around 0.3b and I'm updating it since that time. I keept the original name, YSF, everybody know that's name and I don't want to change that.

In the begining of 2018, after long time inactive development I transfered ownership to IllidanS4. It means that I'm no longer developing this plugin. Don't need to worry, he already continued developing, so this plugin aren't dying.


- Added plugins/YSF.cfg - for more info see below
- Added ability to change RCON commands name
- Added CallFunctionInScript
- Added TextDrawSetStringForPlayer
- Added exclusive RPC broadcast (for more info see YSF_examples.pwn)
- Made execute() calls threaded and added a pawn callback to read command output
- AttachPlayerObjectToPlayer has been rewritten from scratch, now it's more stable and uses less memory
- Fixed rcon messages wasn't appearing in chat
- Fixed GetActorAnimation
- More sanity checks against crashes

Merged functions from IllidanS4's fork of YSF: -
- Merged GetSyncBounds, SetSyncBounds
- Merged GetNPCCommandLine
- Merged SetVehicleParamsSirenState, ToggleVehicleSirenEnabled, IsVehicleSirenEnabled, GetVehicleMatrix

Plus two callback has been merged too:
pawn Code:
forward OnOutcomeScmEvent(playerid, issuerid, E_SCM_EVENT_TYPE:eventid, vehicleid, arg1, arg2);
forward OnServerQueryInfo(const ipaddr[], hostname[51], gamemode[31], language[31]); // YET DISABLED!!!

# Protection against fake pickup ids
PickupProtection 0

# Protection against fakekill
DeathProtection 0

# Protection against sproofed dialog ids
DialogProtection 0

# Use redirected YSF's own RPC for spawning
UseCustomSpawn 0

# Allowing remote RCON connections with banned IPs (its very good to enable when you need to unban yourself)
AllowRemoteRCONWithBannedIPs 0

# Use this if you want to use SetMaxPlayers to increase your server slots at runtime
# DANGER: With enabling this option server will allow to connect 1000 players, doesn't matter what is your "maxplayers" value in server.cfg!
IncreaseRakNetInternalPlayers 0

# If the option above isn't enabled this option won't have any effect
# Change raknet internal threads sleeping time, lowering the value migh result in smoother sync - by default is 5ms
RakNetInternalSleepTime 5

# Delay im ms - object will be attached to player after this delay passed, lowering this delay might result in crashes 
AttachObjectDelay 2000

# SA-MP by default doesn't store material info for per-player objects, which made GetPlayerObjectMaterial/MaterialText broken
# If you just use streamer for objects and you don't wanna use those two natives below, then disable this option
StorePlayerObjectsMaterial 1

# With this option you can load YSF on whatever server version, but it can result unwanted behavior
SkipVersionCheck 0
- Added ResetPlayerMarkerForPlayer (thanks to ziggi)
- Added execute(command[]) which allow you to execute commands from the SA-MP server
- Added protection against sproofing dialog id
- Added ability to send console messages to players
- Readded and fixed GetPlayerDialog which was removed before
- Added ud, lr keys to (Set/Get)PlayerDisabledKeysSync
- Major improvements in plugin code
- Fixed GetVehiclePaintjob
- Fixed OnClientCheckResponse wasn't calling for gamemodes (thanks to ziggi)
- Fixed GetVehicleNumberPlate returned NULL as plate when vehicle has default plate
- Fixed a bug when you used /rcon weather/gravity and afterward GetPlayerWeather/GetPlayerGravity wasn't updated
- Fixed % character appearance in print messages
- Improved RakServer hooks
- RakServer::IsBanned, RakServer::Send has finally fixed on Linux
- If YSF isn't loaded return of memory hacking functions will be cellmin
- SAMP GDK has been removed, added custom hooks for callback hooking insted of using SAMPGDK
- ModifyFlag has been removed, use instead SetServerRuleFlags
- (Player)TextDrawGetFontSize has been removed, use insted (Player)TextDrawGetTextSize
- GetMTUSize has been removed since it always returned the same value
- Swapped some of SendBulletData parameters, for more info see the native


Belong the most useful functions:
  • SetPlayerGravity
pawn Code:
SetPlayerGravity(playerid, 0.001);
Change gravity only for one player.
  • TextDrawSetPos
pawn Code:
TextDrawSetPos(myTextdraw, 320.0, 240.0);
You can change an existing textdraw position only with ONE line. After you change the TD pos, you need to re-show it for every player.
  • ChangeRCONCommandName
pawn Code:
ChangeRCONCommandName("gmx", "");
ChangeRCONCommandName("varlist", "vars");
Disabling /rcon gmx and change /rcon varlist to /rcon vars.
  • AllowNickNameCharacter
pawn Code:
AllowNickNameCharacter(':', true);
Allowing usage of : character in player's name.
  • SetPlayerDisabledKeysSync
pawn Code:
SetPlayerDisabledKeysSync(playerid, KEY_FIRE);
Avoid KEY_FIRE from being synced.


1.) You need to download latest release, extract every file from .zip to your server directory.

2.) You need to add YSF to your server.cfg:

In windows, "plugins YSF.dll";
In linux, "plugins".

3.) Add to your mode and recompile, for beginers:

Put this into top of your mode:
pawn Code:
#include <YSF>

4.) Start server!

If plugin doesn't load, you need to install Visual C++ Redistributable 2015 x86.

If you have x64, you as well need to install x86 version, because samp server is a 32bit application and will require 32bit C++ runtime libraries.


If you want to get out more from YSF, then download Slice's fork of YSF too:

If you want to avoid problems and crashes, then ALWAYS load YSF as LATEST plugin, even with SKY. First load SKY, then YSF.

Only in special cases, when you want to call a function from plugin which is redirected by YSF before YSF got loaded, then you have to load your plugin after YSF.

Plugin crashes, what I should do?

Post here your crash report, which crashdetect log from your server_log.txt. If you are on windows, latest crash from crashinfo.txt too!

Native list

pawn Code:
#define YSF_ERROR_ISNT_LOADED           cellmin

enum E_SERVER_RULE_FLAGS (<<= 1)

    SCM_EVENT_MOD = 2,

Execute bash commands
pawn Code:
native execute(const command[], saveoutput=0, index=0);

File & Directroy functions
pawn Code:
native ffind(const pattern[], filename[], len, &idx);
native frename(const oldname[], const newname[]);

native dfind(const pattern[], filename[], len, &idx);
native dcreate(const name[]);
native drename(const oldname[], const newname[]);

Gamemode restart time
pawn Code:
native SetModeRestartTime(Float:time);
native Float:GetModeRestartTime();

Max player/npc change at runtime
pawn Code:
native SetMaxPlayers(maxplayers);
native SetMaxNPCs(maxnpcs);

Filterscript functions
pawn Code:
native LoadFilterScript(const scriptname[]); // difference between "rcon loadfs": Return -> True if success, false if not
native UnLoadFilterScript(const scriptname[]); // ^
native GetFilterScriptCount();
native GetFilterScriptName(id, name[], len = sizeof(name));

Server rule modifications
pawn Code:
native AddServerRule(const name[], const value[], E_SERVER_RULE_FLAGS:flags = CON_VARFLAG_RULE);
native SetServerRule(const name[], const value[]);
native IsValidServerRule(const name[]);
native SetServerRuleFlags(const name[], E_SERVER_RULE_FLAGS:flags);
native E_SERVER_RULE_FLAGS:GetServerRuleFlags(const name[]);

Server settings
pawn Code:
native GetServerSettings(&showplayermarkes, &shownametags, &stuntbonus, &useplayerpedanims, &bLimitchatradius, &disableinteriorenterexits, &nametaglos, &manualvehicleengine, &limitplayermarkers, &vehiclefriendlyfire, &defaultcameracollision, &Float:fGlobalchatradius, &Float:fNameTagDrawDistance, &Float:fPlayermarkerslimit);
native GetNPCCommandLine(npcid, npcscript[], length = sizeof(npcscript));
native SetRecordingDirectory(const dir[]);
native GetRecordingDirectory(dir[], len = sizeof(dir));

Player position sync bounds
pawn Code:
native GetSyncBounds(&Float:hmin, &Float:hmax, &Float:vmin, &Float:vmax);
native SetSyncBounds(Float:hmin, Float:hmax, Float:vmin, Float:vmax);

Toggling RCON commands
pawn Code:
native GetRCONCommandName(const cmdname[], changedname[], len = sizeof(changedname));
native ChangeRCONCommandName(const cmdname[], changedname[]);

Per AMX function calling
pawn Code:
native CallFunctionInScript(const scriptname[], const function[], const format[], {Float,_}:...);

Broadcasting console messages
pawn Code:
native EnableConsoleMSGsForPlayer(playerid, color);
native DisableConsoleMSGsForPlayer(playerid);
native HasPlayerConsoleMessages(playerid, &color = 0);

YSF settings
pawn Code:
native YSF_SetTickRate(ticks);
native YSF_GetTickRate();
native YSF_EnableNightVisionFix(enable);
native YSF_IsNightVisionFixEnabled();
native YSF_ToggleOnServerMessage(toggle);
native YSF_IsOnServerMessageEnabled();
native YSF_SetExtendedNetStatsEnabled(enable);
native YSF_IsExtendedNetStatsEnabled();
native YSF_SetAFKAccuracy(time_ms);
native YSF_GetAFKAccuracy();

pawn Code:
native IsValidNickName(const name[]);
native AllowNickNameCharacter(character, bool:allow);
native IsNickNameCharacterAllowed(character);

pawn Code:
native GetAvailableClasses();
native GetPlayerClass(classid, &teamid, &modelid, &Float:spawn_x, &Float:spawn_y, &Float:spawn_z, &Float:z_angle, &weapon1, &weapon1_ammo, &weapon2, &weapon2_ammo,& weapon3, &weapon3_ammo);
native EditPlayerClass(classid, teamid, modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);

pawn Code:
native GetActiveTimers();

Per player things
pawn Code:
native SetPlayerGravity(playerid, Float:gravity);
native Float:GetPlayerGravity(playerid);
native SetPlayerAdmin(playerid, bool:admin); // Set player as RCON admin
native SetPlayerTeamForPlayer(playerid, teamplayerid, teamid);
native GetPlayerTeamForPlayer(playerid, teamplayerid);
native SetPlayerSkinForPlayer(playerid, skinplayerid, skin);
native GetPlayerSkinForPlayer(playerid, skinplayerid);
native SetPlayerNameForPlayer(playerid, nameplayerid, const playername[]);
native GetPlayerNameForPlayer(playerid, nameplayerid, playername[], size = sizeof(playername));
native SetPlayerFightStyleForPlayer(playerid, styleplayerid, style);
native GetPlayerFightStyleForPlayer(playerid, skinplayerid);
native SetPlayerPosForPlayer(playerid, posplayerid, Float:fX, Float:fY, Float:fZ, bool:forcesync = true);
native SetPlayerRotationQuatForPlayer(playerid, quatplayerid, Float:w, Float:x, Float:y, Float:z, bool:forcesync = true);
native ApplyAnimationForPlayer(playerid, animplayerid, const animlib[], const animname[], Float:fDelta, loop, lockx, locky, freeze, time); // DOESN'T WORK
native GetPlayerWeather(playerid);
native TogglePlayerWidescreen(playerid, bool:set);
native IsPlayerWidescreenToggled(playerid);
native GetSpawnInfo(playerid, &teamid, &modelid, &Float:spawn_x, &Float:spawn_y, &Float:spawn_z, &Float:z_angle, &weapon1, &weapon1_ammo, &weapon2, &weapon2_ammo,& weapon3, &weapon3_ammo);
native GetPlayerSkillLevel(playerid, skill);
native IsPlayerCheckpointActive(playerid);
native GetPlayerCheckpoint(playerid, &Float:fX, &Float:fY, &Float:fZ, &Float:fSize);
native IsPlayerRaceCheckpointActive(playerid);
native GetPlayerRaceCheckpoint(playerid, &Float:fX, &Float:fY, &Float:fZ, &Float:fNextX, &Float:fNextY, &Float:fNextZ, &Float:fSize);
native GetPlayerWorldBounds(playerid, &Float:x_max, &Float:x_min, &Float:y_max, &Float:y_min);
native IsPlayerInModShop(playerid);
native GetPlayerSirenState(playerid);
native GetPlayerLandingGearState(playerid);
native GetPlayerHydraReactorAngle(playerid);
native Float:GetPlayerTrainSpeed(playerid);
native Float:GetPlayerZAim(playerid);
native GetPlayerSurfingOffsets(playerid, &Float:fOffsetX, &Float:fOffsetY, &Float:fOffsetZ);
native GetPlayerRotationQuat(playerid, &Float:w, &Float:x, &Float:y, &Float:z);
native GetPlayerSpectateID(playerid);
native GetPlayerSpectateType(playerid);
native GetPlayerLastSyncedVehicleID(playerid);
native GetPlayerLastSyncedTrailerID(playerid);

native SendBulletData(sender, hitid, hittype, weaponid, Float:fHitOriginX, Float:fHitOriginY, Float:fHitOriginZ, Float:fHitTargetX, Float:fHitTargetY, Float:fHitTargetZ, Float:fCenterOfHitX, Float:fCenterOfHitY, Float:fCenterOfHitZ, forplayerid = -1);
native ShowPlayerForPlayer(forplayerid, playerid);
native HidePlayerForPlayer(forplayerid, playerid);
native AddPlayerForPlayer(forplayerid, playerid, isnpc = 0);
native RemovePlayerForPlayer(forplayerid, playerid);
native SetPlayerChatBubbleForPlayer(forplayerid, playerid, const text[], color, Float:drawdistance, expiretime);
native ResetPlayerMarkerForPlayer(playerid, resetplayerid);
native SetPlayerVersion(playerid, const version[]);
native IsPlayerSpawned(playerid);
native IsPlayerControllable(playerid);
native SpawnForWorld(playerid);
native BroadcastDeath(playerid);
native IsPlayerCameraTargetEnabled(playerid);
native SetPlayerDisabledKeysSync(playerid, keys, updown = 0, leftright = 0);
native GetPlayerDisabledKeysSync(playerid, &keys, &updown = 0, &leftright = 0);

pawn Code:
native GetActorSpawnInfo(actorid, &skinid, &Float:fX, &Float:fY, &Float:fZ, &Float:fAngle);
native GetActorSkin(actorid);
native GetActorAnimation(actorid, animlib[], animlibsize = sizeof(animlib), animname[], animnamesize = sizeof(animname), &Float:fDelta, &loop, &lockx, &locky, &freeze, &time);

Scoreboard manipulation
pawn Code:
native TogglePlayerScoresPingsUpdate(playerid, bool:toggle);
native TogglePlayerFakePing(playerid, bool:toggle);
native SetPlayerFakePing(playerid, ping);
native TogglePlayerInServerQuery(playerid, bool:toggle);
native IsPlayerToggledInServerQuery(playerid);

Pause functions
pawn Code:
native IsPlayerPaused(playerid);
native GetPlayerPausedTime(playerid);

Objects get - global
pawn Code:
native Float:GetObjectDrawDistance(objectid);
native SetObjectMoveSpeed(objectid, Float:fSpeed);
native Float:GetObjectMoveSpeed(objectid);
native GetObjectTarget(objectid, &Float:fX, &Float:fY, &Float:fZ);
native GetObjectAttachedData(objectid, &attached_vehicleid, &attached_objectid, &attached_playerid);
native GetObjectAttachedOffset(objectid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ);
native IsObjectMaterialSlotUsed(objectid, materialindex); // Return values: 1 = material, 2 = material text
native GetObjectMaterial(objectid, materialindex, &modelid, txdname[], txdnamelen = sizeof(txdname), texturename[], texturenamelen = sizeof(texturename), &materialcoor);
native GetObjectMaterialText(objectid, materialindex, text[], textlen = sizeof(text), &materialsize, fontface[], fontfacelen = sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment);
native IsObjectNoCameraCol(objectid);

Objects get - player
pawn Code:
native Float:GetPlayerObjectDrawDistance(playerid, objectid);
native SetPlayerObjectMoveSpeed(playerid, objectid, Float:fSpeed);
native Float:GetPlayerObjectMoveSpeed(playerid, objectid);
native Float:GetPlayerObjectTarget(playerid, objectid, &Float:fX, &Float:fY, &Float:fZ);
native GetPlayerObjectAttachedData(playerid, objectid, &attached_vehicleid, &attached_objectid, &attached_playerid);
native GetPlayerObjectAttachedOffset(playerid, objectid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ);
native IsPlayerObjectMaterialSlotUsed(playerid, objectid, materialindex); // Return values: 1 = material, 2 = material text
native GetPlayerObjectMaterial(playerid, objectid, materialindex, &modelid, txdname[], txdnamelen = sizeof(txdname), texturename[], texturenamelen = sizeof(texturename), &materialcolor);
native GetPlayerObjectMaterialText(playerid, objectid, materialindex, text[], textlen = sizeof(text), &materialsize, fontface[], fontfacelen = sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment);
native IsPlayerObjectNoCameraCol(playerid, objectid);
native GetPlayerSurfingPlayerObjectID(playerid);
native GetPlayerCameraTargetPlayerObj(playerid);
native GetObjectType(playerid, objectid);

Special - for attached objects
pawn Code:
native GetPlayerAttachedObject(playerid, index, &modelid, &bone, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fSacleX, &Float:fScaleY, &Float:fScaleZ, &materialcolor1, &materialcolor2);
native IsPlayerEditingObject(playerid);
native IsPlayerEditingAttachedObject(playerid);

native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);
native AttachPlayerObjectToObject(playerid, objectid, attachtoid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ, SyncRotation = 1);

RakNet ban functions
pawn Code:
native ClearBanList();
native IsBanned(const ipaddress[]);

pawn Code:
native SetTimeoutTime(playerid, time_ms);
native GetLocalIP(index, localip[], len = sizeof(localip));

Exclusive RPC broadcast
pawn Code:
native SetExclusiveBroadcast(toggle);
native BroadcastToPlayer(playerid, toggle=1);

Vehicle functions
pawn Code:
native GetVehicleSpawnInfo(vehicleid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRot, &color1, &color2);
native SetVehicleSpawnInfo(vehicleid, modelid, Float:fX, Float:fY, Float:fZ, Float:fAngle, color1, color2, respawntime = -2, interior = -2);
native GetVehicleColor(vehicleid, &color1, &color2);
native GetVehiclePaintjob(vehicleid);
native GetVehicleInterior(vehicleid);
native GetVehicleNumberPlate(vehicleid, plate[], len = sizeof(plate));
native SetVehicleRespawnDelay(vehicleid, delay);
native GetVehicleRespawnDelay(vehicleid);
native SetVehicleOccupiedTick(vehicleid, ticks);
native GetVehicleOccupiedTick(vehicleid); // GetTickCount() - GetVehicleOccupiedTick(vehicleid) = time passed since vehicle is occupied, in ms
native SetVehicleRespawnTick(vehicleid, ticks);
native GetVehicleRespawnTick(vehicleid); // GetTickCount() - GetVehicleRespawnTick(vehicleid) = time passed since vehicle spawned, in ms
native GetVehicleLastDriver(vehicleid);
native GetVehicleCab(vehicleid);
native HasVehicleBeenOccupied(vehicleid);
native SetVehicleBeenOccupied(vehicleid, occupied);
native IsVehicleOccupied(vehicleid);
native IsVehicleDead(vehicleid);
native SetVehicleParamsSirenState(vehicleid, sirenState);
native ToggleVehicleSirenEnabled(vehicleid, enabled);
native IsVehicleSirenEnabled(vehicleid);
native GetVehicleMatrix(vehicleid, &Float:rightX, &Float:rightY, &Float:rightZ, &Float:upX, &Float:upY, &Float:upZ, &Float:atX, &Float:atY, &Float:atZ);
native GetVehicleModelCount(modelid);
native GetVehicleModelsUsed();

Gangzones - Global
pawn Code:
native IsValidGangZone(zoneid);
native IsPlayerInGangZone(playerid, zoneid);
native IsGangZoneVisibleForPlayer(playerid, zoneid);
native GangZoneGetColorForPlayer(playerid, zoneid);
native GangZoneGetFlashColorForPlayer(playerid, zoneid);
native IsGangZoneFlashingForPlayer(playerid, zoneid);
native GangZoneGetPos(zoneid, &Float:fMinX, &Float:fMinY, &Float:fMaxX, &Float:fMaxY);

Gangzones - Player
pawn Code:
native CreatePlayerGangZone(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy);
native PlayerGangZoneDestroy(playerid, zoneid);
native PlayerGangZoneShow(playerid, zoneid, color);
native PlayerGangZoneHide(playerid, zoneid);
native PlayerGangZoneFlash(playerid, zoneid, color);
native PlayerGangZoneStopFlash(playerid, zoneid);
native IsValidPlayerGangZone(playerid, zoneid);
native IsPlayerInPlayerGangZone(playerid, zoneid);
native IsPlayerGangZoneVisible(playerid, zoneid);
native PlayerGangZoneGetColor(playerid, zoneid);
native PlayerGangZoneGetFlashColor(playerid, zoneid);
native IsPlayerGangZoneFlashing(playerid, zoneid);
native PlayerGangZoneGetPos(playerid, zoneid, &Float:fMinX, &Float:fMinY, &Float:fMaxX, &Float:fMaxY);

Textdraw - Global
pawn Code:
native IsValidTextDraw(Text:textdrawid);
native IsTextDrawVisibleForPlayer(playerid, Text:textdrawid);
native TextDrawGetString(Text:textdrawid, text[], len = sizeof(text));
native TextDrawSetPos(Text:textdrawid, Float:fX, Float:fY); // You can change textdraw pos with it, but you need to use TextDrawShowForPlayer() after that
native TextDrawGetLetterSize(Text:textdrawid, &Float:fX, &Float:fY);
native TextDrawGetTextSize(Text:textdrawid, &Float:fX, &Float:fY);
native TextDrawGetPos(Text:textdrawid, &Float:fX, &Float:fY);
native TextDrawGetColor(Text:textdrawid);
native TextDrawGetBoxColor(Text:textdrawid);
native TextDrawGetBackgroundColor(Text:textdrawid);
native TextDrawGetShadow(Text:textdrawid);
native TextDrawGetOutline(Text:textdrawid);
native TextDrawGetFont(Text:textdrawid);
native TextDrawIsBox(Text:textdrawid);
native TextDrawIsProportional(Text:textdrawid);
native TextDrawIsSelectable(Text:textdrawid);
native TextDrawGetAlignment(Text:textdrawid);
native TextDrawGetPreviewModel(Text:textdrawid);
native TextDrawGetPreviewRot(Text:textdrawid, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fZoom);
native TextDrawGetPreviewVehCol(Text:textdrawid, &color1, &color2);
native TextDrawSetStringForPlayer(Text:textdrawid, playerid, const string[], {Float,_}:...);

Textdraw - Player
pawn Code:
native IsValidPlayerTextDraw(playerid, PlayerText:textdrawid);
native IsPlayerTextDrawVisible(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetString(playerid, PlayerText:textdrawid, text[], len = sizeof(text));
native PlayerTextDrawSetPos(playerid, PlayerText:textdrawid, Float:fX, Float:fY);
native PlayerTextDrawGetLetterSize(playerid, PlayerText:textdrawid, &Float:fX, &Float:fY);
native PlayerTextDrawGetTextSize(playerid, PlayerText:textdrawid, &Float:fX, &Float:fY);
native PlayerTextDrawGetPos(playerid, PlayerText:textdrawid, &Float:fX, &Float:fY);
native PlayerTextDrawGetColor(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetBoxColor(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetBackgroundCol(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetShadow(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetOutline(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetFont(playerid, PlayerText:textdrawid);
native PlayerTextDrawIsBox(playerid, PlayerText:textdrawid);
native PlayerTextDrawIsProportional(playerid, PlayerText:textdrawid);
native PlayerTextDrawIsSelectable(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetAlignment(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetPreviewModel(playerid, PlayerText:textdrawid);
native PlayerTextDrawGetPreviewRot(playerid, PlayerText:textdrawid, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fZoom);
native PlayerTextDrawGetPreviewVehCol(playerid, PlayerText:textdrawid, &color1, &color2);

3D Text - Global
pawn Code:
native IsValid3DTextLabel(Text3D:id);
native Is3DTextLabelStreamedIn(playerid, Text3D:id);
native Get3DTextLabelText(Text3D:id, text[], len = sizeof(text));
native Get3DTextLabelColor(Text3D:id);
native Get3DTextLabelPos(Text3D:id, &Float:fX, &Float:fY, &Float:fZ);
native Float:Get3DTextLabelDrawDistance(Text3D:id);
native Get3DTextLabelLOS(Text3D:id);
native Get3DTextLabelVirtualWorld(Text3D:id);
native Get3DTextLabelAttachedData(Text3D:id, &attached_playerid, &attached_vehicleid);

3D Text - Player
pawn Code:
native IsValidPlayer3DTextLabel(playerid, PlayerText3D:id);
native GetPlayer3DTextLabelText(playerid, PlayerText3D:id, text[], len = sizeof(text));
native GetPlayer3DTextLabelColor(playerid, PlayerText3D:id);
native GetPlayer3DTextLabelPos(playerid, PlayerText3D:id, &Float:fX, &Float:fY, &Float:fZ);
native Float:GetPlayer3DTextLabelDrawDist(playerid, PlayerText3D:id);
native GetPlayer3DTextLabelLOS(playerid, PlayerText3D:id);
native GetPlayer3DTextLabelVirtualW(playerid, PlayerText3D:id);
native GetPlayer3DTextLabelAttached(playerid, PlayerText3D:id, &attached_playerid, &attached_vehicleid);

pawn Code:
native IsMenuDisabled(Menu:menuid);
native IsMenuRowDisabled(Menu:menuid, row);
native GetMenuColumns(Menu:menuid);
native GetMenuItems(Menu:menuid, column);
native GetMenuPos(Menu:menuid, &Float:fX, &Float:fY);
native GetMenuColumnWidth(Menu:menuid, &Float:fColumn1, &Float:fColumn2);
native GetMenuColumnHeader(Menu:menuid, column, header[], len = sizeof(header));
native GetMenuItem(Menu:menuid, column, itemid, item[], len = sizeof(item));

pawn Code:
native IsValidPickup(pickupid);
native IsPickupStreamedIn(playerid, pickupid);
native GetPickupPos(pickupid, &Float:fX, &Float:fY, &Float:fZ);
native GetPickupModel(pickupid);
native GetPickupType(pickupid);
native GetPickupVirtualWorld(pickupid);

******'s model sizes inc
pawn Code:
native GetColCount();
native Float:GetColSphereRadius(modelid);
native GetColSphereOffset(modelid, &Float:fX, &Float:fY, &Float:fZ);

pawn Code:
native SendClientMessagef(playerid, color, const message[], {Float,_}:...);
native SendClientMessageToAllf(color, const message[], {Float,_}:...);
native GameTextForPlayerf(playerid, displaytime, style, const message[], {Float,_}:...);
native GameTextForAllf(displaytime, style, const message[], {Float,_}:...);
native SendPlayerMessageToPlayerf(playerid, senderid, const message[], {Float,_}:...);
native SendPlayerMessageToAllf(senderid, const message[], {Float,_}:...);
native SendRconCommandf(command[], {Float,_}:...);

For developers
pawn Code:

native SendRPC(playerid, RPC, {Float,_}:...); // playerid == -1 -> broadcast
native SendData(playerid, {Float,_}:...); // playerid == -1 -> broadcast

pawn Code:
forward OnPlayerEnterGangZone(playerid, zoneid);
forward OnPlayerLeaveGangZone(playerid, zoneid);
forward OnPlayerEnterPlayerGangZone(playerid, zoneid);
forward OnPlayerLeavePlayerGangZone(playerid, zoneid);
forward OnPlayerPickUpPlayerPickup(playerid, pickupid);
forward OnPlayerPauseStateChange(playerid, pausestate);
forward OnPlayerStatsAndWeaponsUpdate(playerid);
forward OnRemoteRCONPacket(const ipaddr[], port, const password[], success, const command[]);
forward OnServerMessage(const msg[]);
forward OnPlayerClientGameInit(playerid, &usecjwalk, &limitglobalchat, &Float:globalchatradius, &Float:nametagdistance, &disableenterexits, &nametaglos, &manualvehengineandlights,
                &spawnsavailable, &shownametags, &showplayermarkers, &onfoot_rate, &incar_rate, &weapon_rate, &lacgompmode, &vehiclefriendlyfire);
forward OnOutcomeScmEvent(playerid, issuerid, E_SCM_EVENT_TYPE:eventid, vehicleid, arg1, arg2);
forward OnServerQueryInfo(const ipaddr[], hostname[51], gamemode[31], language[31]);
forward OnSystemCommandExecute(const line_output[], retval, index, success, line_current, line_total);

Special thanks to
****** - for the original version of YSF,
sprtik - for maintaining YSF while I was away,

How to update this plugin?
Click here for more info:
I don't play and have ANY interest in SA:MP anymore! Please do not ask for help, because I'm not going to reply.

Last edited by kurta999; 30/01/2018 at 09:28 AM.
kurta999 is offline   Reply With Quote
Old 16/05/2014, 05:23 PM   #2
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,277
Reputation: 330
Default Re: YSF - kurta999's version

Excellent, nice addition to the original YSF.
Kyle is offline   Reply With Quote
Old 16/05/2014, 05:26 PM   #3
Posts: n/a
Default Re: YSF - kurta999's version

Excellent Plugin kurta999! Can't wait to see more functions coming from you!
  Reply With Quote
Old 16/05/2014, 05:28 PM   #4
Join Date: Jun 2010
Posts: 2,397
Reputation: 569
Default Re: YSF - kurta999's version

Great to see some more natives, great job!
iZN is offline   Reply With Quote
Old 16/05/2014, 06:18 PM   #5
Kirollos's Avatar
Join Date: Jun 2010
Location: Cairo, Egypt
Posts: 569
Reputation: 83
Default Re: YSF - kurta999's version

Amusing! Good job, keep it up!
My github profile:

( ͡ ͜ʖ ͡)
Kirollos is offline   Reply With Quote
Old 16/05/2014, 06:26 PM   #6
TheArcher's Avatar
Join Date: Dec 2009
Location: Home
Posts: 2,338
Reputation: 251
Default Re: YSF - kurta999's version

Yup, that is what I was waiting for!
TheArcher is offline   Reply With Quote
Old 16/05/2014, 06:38 PM   #7
Huge Clucker
Join Date: Jan 2010
Posts: 228
Reputation: 25
Default Re: YSF - kurta999's version

Wow, exelent work!
Gigi-The-Beast is offline   Reply With Quote
Old 16/05/2014, 07:16 PM   #8
PT's Avatar
Join Date: Nov 2012
Location: Portugal
Posts: 7,179
Reputation: 780
Default Re: YSF - kurta999's version

One great and very usefull plugin of this board.

Nice Job
PT is offline   Reply With Quote
Old 16/05/2014, 07:22 PM   #9
Spam Machine
Konstantinos's Avatar
Join Date: Dec 2011
Posts: 11,863
Reputation: 1399
Default Re: YSF - kurta999's version

Very useful! Thanks.
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 16/05/2014, 07:23 PM   #10
Huge Clucker
Whyd's Avatar
Join Date: Sep 2012
Location: /
Posts: 431
Reputation: 30
Default Respuesta: YSF - kurta999's version

Haha, nice job!
Whyd is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GameMode] [GM] - [RnD] Street Racers `N Drifters (New Version - latest version) Johny_Rocker Gamemode Scripts 23 10/12/2015 09:53 AM
How to convert server files from 0.3e version into 0.3c version Sajed Scripting Help 2 29/10/2013 07:48 PM
[FilterScript] [FS]New LSPD - Version 0.3 - Bugfix Version Dalenor Filterscripts 46 08/12/2010 01:36 PM
about changing version of sa-mp but with old script version Sfinx_17 Help Archive 3 22/10/2009 12:05 PM

All times are GMT. The time now is 05:19 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.