YSF Server Functions
Additions:
HideVehicle
, ShowVehicle
, IsVehicleHidden
.SetPlayerSyncVehicleId
and UpdatePlayerSyncData
can also optionally set the main player structure fields.SetPickupPos
, SetPickupModel
and SetPickupType
allow skipping updating the pickup to players.ShowPickupForPlayer
, HidePickupForPlayer
and SetPickupForPlayer
.OnPickupStreamIn/Out
. Supports ShowPickupForPlayer
and HidePickupForPlayer
inside.Changes:
IsBuildingRemovedForPlayer
checks for proper containment of the whole sphere instead of just of overlapping the center.SetPlayerSyncVehiclePosition
also resets the internal bHasSetVehiclePos
flag to enable syncing the vehicle data.GetWeaponSlot
and GetPlayerSyncWeapon
now return negative integers on invalid values.Fixes:
SetPickupVirtualWorld
hides the pickup in the old world correctly.IsPlayerTextDrawVisible
.Additions:
PassiveMode
config option. Disables all hooks and spontaneous manipulation of server's memory, as well as natives that rely on that. If you want to load a script that uses these natives, use Native Fallback.
SetPlayerSyncPos
, SetPlayerSyncVelocity
, SetPlayerSyncRotationQuat
, SetPlayerSyncVehicleSeat
, SetPlayerSyncTrainSpeed
for setting additional update packet fields.SetPickupPos
, SetPickupModel
, SetPickupType
, SetPickupVirtualWorld
, allowing pickup changes without id changes.GetPlayerRawIp
(faster than GetPlayerIp
for storage and comparison).Changes:
bool
tags to some functions.Fixes:
SetPlayerSkinForPlayer
.SetPlayerObjectMaterial
and SetPlayerObjectMaterialText
properly react to StorePlayerObjectsMaterial
.ToggleChatTextReplacement
on R2-2.Additions:
GroupPlayerObjects
in YSF.cfg to affect IDs of newly created per-player objects. If possible, a new per-player object will prefer slots already used for per-player objects by other players. Very useful when global and per-player objects are used together.SetPlayerConnectMode
and GetPlayerConnectMode
to control players' connection state. Set to DISCONNECT_ASAP
to force reconnect.ToggleCloseConnectionFix
to disable code that causes "Connection closed." for reconnecting players.GetPlayerSyncWeapon
for obtaining player's weapon when GetPlayerWeapon
doesn't work.ToggleChatTextReplacement
to disable replacing possible unwanted characters in incoming chat messages by #
(%
, color and key codes).SendPlayerClientGameInit
for re-sending client initialization data and allowing changing some parameters (same as in OnPlayerClientGameInit
).Changes:
respawntime
in SetVehicleSpawnInfo
now takes seconds instead of milliseconds, consistent with other respawn delay changing functions.Fixes:
HideNewObject
corrected.GangZoneGetPos
works with UsePerPlayerGangZones 0
.StorePlayerObjectsMaterial 1
.RespawnVehicle
crash on 0.3.7-R2-2.Version for 0.3.DL included.
SendPlayerDeath
for setting the player as dead for other players.UpdatePlayerSyncData
to send the sync data of a player to other players even if it hasn't been updated.ShowPlayerForPlayer
has an optional parameter to sync the skin.GetPlayerBuildingsRemoved
returns the count of removed buildings.OnPlayerUpdate
): SetPlayerSyncKeys
, SetPlayerSyncCameraFrontVector
, SetPlayerSyncCameraPos
, SetPlayerSyncCameraMode
, SetPlayerSyncWeapon
, SetPlayerSyncWeaponState
.logprintf
hook (done in assembly). Fixed memory leak in OnServerMessage
. The hook will not be called from other threads anymore (since it's really bad).RespawnVehicle
does not read uninitialized memory.SetVehicleDead
. Can be used to revive a drowned vehicle.New functions: ResetPlayerNameInServerQuery
, HideObjectForPlayer
, ShowObjectForPlayer
, IsObjectHiddenForPlayer
, HideNewObjectsForPlayer
, NewObjectsHiddenForPlayer
, GetPlayerBuildingsRemoved
and IsBuildingRemovedForPlayer
, GetObjectSyncRotation
, TogglePlayerGhostMode
, GetPlayerGhostMode
.
IsObjectMaterialSlotUsed
, GetObjectMaterial
, GetObjectMaterialText
etc. get the last applied material instead of the first.
Minor bugfixes and improvements. Custom packet building fixed, strings are correctly returned etc.
logprintf
hook calls the original function.
Merged functions from IllidanS4's fork of YSF: https://github.com/IllidanS4/YSF - http://forum.sa-mp.com/showthread.php?t=609499
Plus two callback has been merged too: forward OnOutcomeScmEvent(playerid, issuerid, E_SCM_EVENT_TYPE:eventid, vehicleid, arg1, arg2); forward OnServerQueryInfo(const ipaddr[], hostname[51], gamemode[31], language[31]); // YET DISABLED!!!
This release has been removed because it has bugs. Mainly crash related to attached objects. Use r18 till I release r19
R18