Giter VIP home page Giter VIP logo

openmultiplayer / open.mp Goto Github PK

View Code? Open in Web Editor NEW
404.0 30.0 77.0 8.29 MB

Open Multiplayer, a multiplayer mod fully backwards compatible with SA-MP

Home Page: https://open.mp

License: Mozilla Public License 2.0

CMake 1.26% C++ 97.71% Dockerfile 0.26% Shell 0.52% PowerShell 0.21% Batchfile 0.04%
grand theft auto grand-theft-auto grand-theft-auto-san-andreas san-andreas san-andreas-multiplayer samp sa-mp sa-mp-development

open.mp's People

Contributors

abyss-z94 avatar adib-yg avatar adrfranklin avatar agraber avatar alasnkz avatar alf-one avatar amyrahmady avatar andosius avatar besnikr avatar bigeti avatar brarharjot avatar cheaterman avatar dev-karpov0 avatar dimmyi avatar edgyaf avatar hual avatar ksenonadv avatar mrreus avatar myudev avatar nexiustailer avatar notunlikethewaves avatar pkfln avatar reshiramzekrom1 avatar sreyas-sreelal avatar uifdev avatar vedran77 avatar woutprovost avatar xunder-matth avatar y-less avatar zorono avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open.mp's Issues

Exception on timer tick

Can't reliably reproduce, but I located the exact place where it happens:

This sometimes will trigger the following error:
Assertion failed: false && "(ctrl != nullptr && IsFull(*ctrl)) && \"Invalid operation on iterator. The element might have \" \"been erased, or the table might have rehashed.\"", file C:\.conan\85492a\1\include\absl/container/internal/raw_hash_set.h, line 504

Probably caused by some deleted timer?
Caused by creating timers inside timers, which invalidates the iterator. Will be fixed by using std::set

Things that are left before initial release

  • Add console commands; handlers are there and they should work fine, just need to add commands (Console component)
    Here is a link to commands we need: https://sampwiki.blast.hk/wiki/Controlling_Your_Server#RCON_Commands
  • Fix pawn events; They are not being handled properly due to some inconsistency and wrong way of calls being used by callers (bug)

Remaining natives for initial release (excluding 0.3dl natives):

  • SendClientCheck
  • GetNetworkStats
  • GetPlayerNetworkStats
  • GetServerTickRate
  • gpci
  • IsPlayerAdmin
  • NetStats_BytesReceived
  • NetStats_BytesSent
  • NetStats_ConnectionStatus
  • NetStats_GetConnectedTime
  • NetStats_GetIpPort
  • NetStats_MessagesReceived
  • NetStats_MessagesRecvPerSecond
  • NetStats_MessagesSent
  • NetStats_PacketLossPercent
  • SendRconCommand
  • SetGameModeText
  • SHA256_PassHash
  • EnableVehicleFriendlyFire

Log rotation

  • logging to a file should be able to be disabled entirely
  • logging to a file enabled by default for quick start and simple use-cases
  • always write to stdout (not stderr - keeps it simple)
  • when enabled, there should be basic log rotation based on day

logs/2021-08-16.log

Config autogeneration should only write default server.cfg keys

Everything in the title. Expected:

{
    "lan_mode": 0,
    "max_players": 50,
    "port": 7777,
    "server_name": "open.mp server",
    "entry_file": "test.amx",
    "side_scripts": [],
    "maxnpc": 0,
    "on_foot_rate": 30,
    "in_car_rate": 30,
    "weapon_rate": 30,
    "stream_distance": 200.0,
    "stream_rate": 1000
}

Some keys are missing for now, announce/query, weburl, mapname, etc. They should be added to this list as they get implemented.

SA-MP Standard Library Item List

SA-MP Standard Library Tracking List

List of natives and publics (callbacks) specified on samp-stdlib.

Each entry can have one of the following status:

  • U: unassigned
  • A: assigned w/ link to issue (not worked on yet)
  • IP: in progress (assigned, currently worked on)
  • C: complete ("production ready")

Feel free to update as you work along them, and tag in the respective issue to notify of status changes and any other important stuff relevant to that item.

Natives

Generated by grep -Eoh '^\s*native ?([^\(]*)\(.*\);' *.inc | tr 'Float:[X-Z]' 'Float:[x-z]' | sed -E 's/\t*native ([a-zA-Z0-9]+:)?//' | sort | uniq | cut -d"(" -f1 | xargs -n 1 sh -c 'echo "| $0 | U | N/A |"' on samp-stdlib on this commit.
If you want the data only, then run the command without xargs.

name status issue/assignee
AddCharModel U N/A
AddMenuItem U N/A
AddPlayerClass U N/A
AddPlayerClassEx U N/A
AddSimpleModel U N/A
AddSimpleModelTimed U N/A
AddStaticPickup U N/A
AddStaticVehicle U N/A
AddStaticVehicleEx U N/A
AddVehicleComponent U N/A
AllowAdminTeleport U N/A
AllowInteriorWeapons U N/A
AllowPlayerTeleport U N/A
ApplyActorAnimation U N/A
ApplyAnimation U N/A
Attach3DTextLabelToPlayer U N/A
Attach3DTextLabelToVehicle U N/A
AttachCameraToObject U N/A
AttachCameraToPlayerObject U N/A
AttachObjectToObject U N/A
AttachObjectToPlayer U N/A
AttachObjectToVehicle U N/A
AttachPlayerObjectToPlayer U N/A
AttachPlayerObjectToVehicle U N/A
AttachTrailerToVehicle U N/A
Ban U N/A
BanEx U N/A
BlockIpAddress U N/A
CallLocalFunction U N/A
CallRemoteFunction U N/A
CancelEdit U N/A
CancelSelectTextDraw U N/A
ChangeVehicleColor U N/A
ChangeVehiclePaintjob U N/A
ClearActorAnimations U N/A
ClearAnimations U N/A
ConnectNPC U N/A
Create3DTextLabel U N/A
CreateActor U N/A
CreateExplosion C N/A
CreateExplosionForPlayer U N/A
CreateMenu U N/A
CreateObject U N/A
CreatePickup U N/A
CreatePlayer3DTextLabel U N/A
CreatePlayerObject U N/A
CreatePlayerTextDraw U N/A
CreateVehicle U N/A
Delete3DTextLabel U N/A
DeletePVar U N/A
DeletePlayer3DTextLabel U N/A
DeleteSVar U N/A
DestroyActor U N/A
DestroyMenu U N/A
DestroyObject U N/A
DestroyPickup U N/A
DestroyPlayerObject U N/A
DestroyVehicle U N/A
DetachTrailerFromVehicle U N/A
DisableInteriorEnterExits U N/A
DisableMenu U N/A
DisableMenuRow U N/A
DisableNameTagLOS U N/A
DisablePlayerCheckpoint U N/A
DisablePlayerRaceCheckpoint U N/A
DisableRemoteVehicleCollisions U N/A
EditAttachedObject U N/A
EditObject U N/A
EditPlayerObject U N/A
EnablePlayerCameraTarget U N/A
EnableStuntBonusForAll U N/A
EnableStuntBonusForPlayer U N/A
EnableTirePopping U N/A
EnableVehicleFriendlyFire U N/A
EnablezoneNames U N/A
FindModelFileNameFromCRC U N/A
FindTextureFileNameFromCRC U N/A
ForceClassSelection U N/A
GameModeExit U N/A
GameTextForAll U N/A
GameTextForPlayer U N/A
GangzoneCreate U N/A
GangzoneDestroy U N/A
GangzoneFlashForAll U N/A
GangzoneFlashForPlayer U N/A
GangzoneHideForAll U N/A
GangzoneHideForPlayer U N/A
GangzoneShowForAll U N/A
GangzoneShowForPlayer U N/A
GangzoneStopFlashForAll U N/A
GangzoneStopFlashForPlayer U N/A
GetActorFacingAngle U N/A
GetActorHealth U N/A
GetActorPoolSize U N/A
GetActorPos U N/A
GetActorVirtualWorld U N/A
GetAnimationName U N/A
GetConsoleVarAsBool U N/A
GetConsoleVarAsInt U N/A
GetConsoleVarAsString U N/A
GetDistanceFromMeToPoint U N/A
GetGravity U N/A
GetMaxPlayers U N/A
GetMyFacingAngle U N/A
GetMyPos U N/A
GetNetworkStats U N/A
GetObjectModel U N/A
GetObjectPos U N/A
GetObjectRot U N/A
GetPVarFloat U N/A
GetPVarInt U N/A
GetPVarNameAtIndex U N/A
GetPVarString U N/A
GetPVarType U N/A
GetPVarsUpperIndex U N/A
GetPlayerAmmo U N/A
GetPlayerAnimationIndex U N/A
GetPlayerArmedWeapon U N/A
GetPlayerArmour(playerid) U N/A
GetPlayerArmour(playerid, &Float:armour) U N/A
GetPlayerCameraAspectRatio U N/A
GetPlayerCameraFrontVector U N/A
GetPlayerCameraMode U N/A
GetPlayerCameraPos U N/A
GetPlayerCameraTargetActor U N/A
GetPlayerCameraTargetObject U N/A
GetPlayerCameraTargetPlayer U N/A
GetPlayerCameraTargetVehicle U N/A
GetPlayerCamerazoom U N/A
GetPlayerColor U N/A
GetPlayerCustomSkin U N/A
GetPlayerDistanceFromPoint U N/A
GetPlayerDrunkLevel U N/A
GetPlayerFacingAngle U N/A
GetPlayerFightingStyle U N/A
GetPlayerHealth(playerid) U N/A
GetPlayerHealth(playerid, &Float:health) U N/A
GetPlayerInterior U N/A
GetPlayerIp U N/A
GetPlayerKeys U N/A
GetPlayerLastShotVectors U N/A
GetPlayerMenu U N/A
GetPlayerMoney U N/A
GetPlayerName U N/A
GetPlayerNetworkStats U N/A
GetPlayerObjectModel U N/A
GetPlayerObjectPos U N/A
GetPlayerObjectRot U N/A
GetPlayerPing U N/A
GetPlayerPoolSize U N/A
GetPlayerPos U N/A
GetPlayerScore U N/A
GetPlayerSkin U N/A
GetPlayerSpecialAction U N/A
GetPlayerState U N/A
GetPlayerSurfingObjectID U N/A
GetPlayerSurfingVehicleID U N/A
GetPlayerTargetActor U N/A
GetPlayerTargetPlayer U N/A
GetPlayerTeam U N/A
GetPlayerTime U N/A
GetPlayerVehicleID U N/A
GetPlayerVehicleSeat U N/A
GetPlayerVelocity U N/A
GetPlayerVersion U N/A
GetPlayerVirtualWorld U N/A
GetPlayerWantedLevel U N/A
GetPlayerWeapon U N/A
GetPlayerWeaponData U N/A
GetPlayerWeaponState U N/A
GetSVarFloat U N/A
GetSVarInt U N/A
GetSVarNameAtIndex U N/A
GetSVarString U N/A
GetSVarType U N/A
GetSVarsUpperIndex U N/A
GetServerTickRate U N/A
GetServerVarAsBool U N/A
GetServerVarAsInt U N/A
GetServerVarAsString U N/A
GetTickCount U N/A
GetVehicleComponentInSlot U N/A
GetVehicleComponentType U N/A
GetVehicleDamageStatus U N/A
GetVehicleDistanceFromPoint U N/A
GetVehicleHealth U N/A
GetVehicleModel U N/A
GetVehicleModelInfo U N/A
GetVehicleParamsCarDoors U N/A
GetVehicleParamsCarWindows U N/A
GetVehicleParamsEx U N/A
GetVehicleParamsSirenState U N/A
GetVehiclePoolSize U N/A
GetVehiclePos U N/A
GetVehicleRotationQuat U N/A
GetVehicleTrailer U N/A
GetVehicleVelocity U N/A
GetVehicleVirtualWorld U N/A
GetVehiclezAngle U N/A
GetWeaponName U N/A
GivePlayerMoney U N/A
GivePlayerWeapon U N/A
HTTP U N/A
HideMenuForPlayer U N/A
InterpolateCameraLookAt U N/A
InterpolateCameraPos U N/A
IsActorInvulnerable U N/A
IsActorStreamedIn U N/A
IsObjectMoving U N/A
IsPlayerAdmin U N/A
IsPlayerAttachedObjectSlotUsed U N/A
IsPlayerConnected U N/A
IsPlayerInAnyVehicle U N/A
IsPlayerInCheckpoint U N/A
IsPlayerInRaceCheckpoint U N/A
IsPlayerInRangeOfPoint U N/A
IsPlayerInVehicle U N/A
IsPlayerNPC U N/A
IsPlayerObjectMoving U N/A
IsPlayerStreamedIn(playerid) U N/A
IsPlayerStreamedIn(playerid, forplayerid) U N/A
IsTrailerAttachedToVehicle U N/A
IsValidActor U N/A
IsValidMenu U N/A
IsValidObject U N/A
IsValidPlayerObject U N/A
IsValidVehicle U N/A
IsVehicleStreamedIn(vehicleid) U N/A
IsVehicleStreamedIn(vehicleid, forplayerid) U N/A
Kick U N/A
KillTimer U N/A
LimitGlobalChatRadius U N/A
LimitPlayerMarkerRadius U N/A
LinkVehicleToInterior U N/A
ManualVehicleEngineAndLights U N/A
MoveObject U N/A
MovePlayerObject U N/A
NetStats_BytesReceived U N/A
NetStats_BytesSent U N/A
NetStats_ConnectionStatus U N/A
NetStats_GetConnectedTime U N/A
NetStats_GetIpPort U N/A
NetStats_MessagesReceived U N/A
NetStats_MessagesRecvPerSecond U N/A
NetStats_MessagesSent U N/A
NetStats_PacketLossPercent U N/A
PauseRecordingPlayback U N/A
PlayAudioStreamForPlayer C N/A
PlayCrimeReportForPlayer U N/A
PlayerPlaySound U N/A
PlayerSpectatePlayer U N/A
PlayerSpectateVehicle U N/A
PlayerTextDrawAlignment U N/A
PlayerTextDrawBackgroundColor U N/A
PlayerTextDrawBoxColor U N/A
PlayerTextDrawColor U N/A
PlayerTextDrawDestroy U N/A
PlayerTextDrawFont U N/A
PlayerTextDrawHide U N/A
PlayerTextDrawLetterSize U N/A
PlayerTextDrawSetOutline U N/A
PlayerTextDrawSetPreviewModel U N/A
PlayerTextDrawSetPreviewRot U N/A
PlayerTextDrawSetPreviewVehCol U N/A
PlayerTextDrawSetProportional U N/A
PlayerTextDrawSetSelectable U N/A
PlayerTextDrawSetShadow U N/A
PlayerTextDrawSetString U N/A
PlayerTextDrawShow U N/A
PlayerTextDrawTextSize U N/A
PlayerTextDrawUseBox U N/A
PutPlayerInVehicle U N/A
RedirectDownload U N/A
RemoveBuildingForPlayer U N/A
RemovePlayerAttachedObject U N/A
RemovePlayerFromVehicle U N/A
RemovePlayerMapIcon U N/A
RemoveVehicleComponent U N/A
RepairVehicle U N/A
ResetPlayerMoney U N/A
ResetPlayerWeapons U N/A
ResumeRecordingPlayback U N/A
SHA256_PassHash U N/A
SelectObject U N/A
SelectTextDraw U N/A
SendChat U N/A
SendClientCheck U N/A
SendClientMessage U N/A
SendClientMessageToAll U N/A
SendCommand C N/A
SendDeathMessage U N/A
SendDeathMessageToPlayer U N/A
SendPlayerMessageToAll U N/A
SendPlayerMessageToPlayer U N/A
SendRconCommand U N/A
SetActorFacingAngle U N/A
SetActorHealth U N/A
SetActorInvulnerable U N/A
SetActorPos U N/A
SetActorVirtualWorld U N/A
SetCameraBehindPlayer C N/A
SetDeathDropAmount U N/A
SetGameModeText U N/A
SetGravity U N/A
SetMenuColumnHeader U N/A
SetMyFacingAngle U N/A
SetMyPos U N/A
SetNameTagDrawDistance U N/A
SetObjectMaterial U N/A
SetObjectMaterialText U N/A
SetObjectNoCameraCol U N/A
SetObjectPos U N/A
SetObjectRot U N/A
SetObjectsDefaultCameraCol U N/A
SetPVarFloat U N/A
SetPVarInt U N/A
SetPVarString U N/A
SetPlayerAmmo U N/A
SetPlayerArmedWeapon U N/A
SetPlayerArmour U N/A
SetPlayerAttachedObject U N/A
SetPlayerCameraLookAt C N/A
SetPlayerCameraPos C N/A
SetPlayerChatBubble U N/A
SetPlayerCheckpoint U N/A
SetPlayerColor U N/A
SetPlayerDrunkLevel U N/A
SetPlayerFacingAngle U N/A
SetPlayerFightingStyle U N/A
SetPlayerHealth U N/A
SetPlayerInterior U N/A
SetPlayerMapIcon U N/A
SetPlayerMarkerForPlayer U N/A
SetPlayerName U N/A
SetPlayerObjectMaterial U N/A
SetPlayerObjectMaterialText U N/A
SetPlayerObjectNoCameraCol U N/A
SetPlayerObjectPos U N/A
SetPlayerObjectRot U N/A
SetPlayerPos U N/A
SetPlayerPosFindz U N/A
SetPlayerRaceCheckpoint U N/A
SetPlayerScore U N/A
SetPlayerShopName U N/A
SetPlayerSkillLevel U N/A
SetPlayerSkin U N/A
SetPlayerSpecialAction U N/A
SetPlayerTeam U N/A
SetPlayerTime U N/A
SetPlayerVelocity U N/A
SetPlayerVirtualWorld U N/A
SetPlayerWantedLevel U N/A
SetPlayerWeather U N/A
SetPlayerWorldBounds U N/A
SetSVarFloat U N/A
SetSVarInt U N/A
SetSVarString U N/A
SetSpawnInfo U N/A
SetTeamCount U N/A
SetTimer U N/A
SetTimerEx U N/A
SetVehicleAngularVelocity U N/A
SetVehicleHealth U N/A
SetVehicleNumberPlate U N/A
SetVehicleParamsCarDoors U N/A
SetVehicleParamsCarWindows U N/A
SetVehicleParamsEx U N/A
SetVehicleParamsForPlayer U N/A
SetVehiclePos U N/A
SetVehicleToRespawn U N/A
SetVehicleVelocity U N/A
SetVehicleVirtualWorld U N/A
SetVehiclezAngle U N/A
SetWeather C N/A
SetWorldTime U N/A
ShowMenuForPlayer U N/A
ShowNameTags U N/A
ShowPlayerDialog U N/A
ShowPlayerMarkers U N/A
ShowPlayerNameTagForPlayer U N/A
SpawnPlayer U N/A
StartRecordingPlayback U N/A
StartRecordingPlayerData U N/A
StopAudioStreamForPlayer C N/A
StopObject U N/A
StopPlayerObject U N/A
StopRecordingPlayback U N/A
StopRecordingPlayerData U N/A
TextDrawAlignment U N/A
TextDrawBackgroundColor U N/A
TextDrawBoxColor U N/A
TextDrawColor U N/A
TextDrawCreate U N/A
TextDrawDestroy U N/A
TextDrawFont U N/A
TextDrawHideForAll U N/A
TextDrawHideForPlayer U N/A
TextDrawLetterSize U N/A
TextDrawSetOutline U N/A
TextDrawSetPreviewModel U N/A
TextDrawSetPreviewRot U N/A
TextDrawSetPreviewVehCol U N/A
TextDrawSetProportional U N/A
TextDrawSetSelectable U N/A
TextDrawSetShadow U N/A
TextDrawSetString U N/A
TextDrawShowForAll U N/A
TextDrawShowForPlayer U N/A
TextDrawTextSize U N/A
TextDrawUseBox U N/A
TogglePlayerClock U N/A
TogglePlayerControllable U N/A
TogglePlayerSpectating U N/A
UnBlockIpAddress U N/A
Update3DTextLabelText U N/A
UpdatePlayer3DTextLabelText U N/A
UpdateVehicleDamageStatus U N/A
UsePlayerPedAnims U N/A
VectorSize U N/A
acos C N/A
asin C N/A
atan C N/A
atan2 C N/A
db_close C BigETI
db_debug_openfiles C BigETI
db_debug_openresults C BigETI
db_field_name C BigETI
db_free_result C BigETI
db_get_field C BigETI
db_get_field_assoc C BigETI
db_get_field_assoc_float C BigETI
db_get_field_assoc_int C BigETI
db_get_field_float C BigETI
db_get_field_int C BigETI
db_get_mem_handle C BigETI
db_get_result_mem_handle C BigETI
db_next_row C BigETI
db_num_fields C BigETI
db_num_rows C BigETI
db_open C BigETI
db_query C BigETI
format U N/A
gpci U N/A
print C N/A
printf C N/A

Callbacks

Generated by grep -Eoh 'forward ?([^\(]*)\(.*' *.inc | sort | uniq | cut -d" " -f2 | cut -d"(" -f1 | xargs -n 1 sh -c 'echo "| $0 | U | N/A |"' on samp-stdlib on this commit.
If you want the data only, then run the command without xargs.

name status issue/assignee
OnActorStreamIn U N/A
OnActorStreamOut U N/A
OnClientCheckResponse U N/A
OnClientMessage U N/A
OnDialogResponse U N/A
OnEnterExitModShop U N/A
OnFilterScriptExit U N/A
OnFilterScriptInit U N/A
OnGameModeExit U N/A
OnGameModeInit U N/A
OnIncomingConnection U N/A
OnNPCConnect U N/A
OnNPCDisconnect U N/A
OnNPCEnterVehicle U N/A
OnNPCExitVehicle U N/A
OnNPCModeExit U N/A
OnNPCModeInit U N/A
OnNPCSpawn U N/A
OnObjectMoved U N/A
OnPlayerClickMap U N/A
OnPlayerClickPlayer U N/A
OnPlayerClickPlayerTextDraw U N/A
OnPlayerClickTextDraw U N/A
OnPlayerCommandText C N/A
OnPlayerConnect U N/A
OnPlayerDeath(playerid) U N/A
OnPlayerDeath(playerid, killerid, reason) U N/A
OnPlayerDisconnect U N/A
OnPlayerEditAttachedObject U N/A
OnPlayerEditObject U N/A
OnPlayerEnterCheckpoint U N/A
OnPlayerEnterRaceCheckpoint U N/A
OnPlayerEnterVehicle U N/A
OnPlayerExitVehicle U N/A
OnPlayerExitedMenu U N/A
OnPlayerFinishedDownloading U N/A
OnPlayerGiveDamage U N/A
OnPlayerGiveDamageActor U N/A
OnPlayerInteriorChange U N/A
OnPlayerKeyStateChange U N/A
OnPlayerLeaveCheckpoint U N/A
OnPlayerLeaveRaceCheckpoint U N/A
OnPlayerObjectMoved U N/A
OnPlayerPickUpPickup U N/A
OnPlayerRequestClass U N/A
OnPlayerRequestDownload U N/A
OnPlayerRequestSpawn U N/A
OnPlayerSelectObject U N/A
OnPlayerSelectedMenuRow U N/A
OnPlayerSpawn U N/A
OnPlayerStateChange U N/A
OnPlayerStreamIn(playerid) U N/A
OnPlayerStreamIn(playerid, forplayerid) U N/A
OnPlayerStreamOut(playerid) U N/A
OnPlayerStreamOut(playerid, forplayerid) U N/A
OnPlayerTakeDamage U N/A
OnPlayerText U N/A
OnPlayerUpdate U N/A
OnPlayerWeaponShot U N/A
OnRconCommand U N/A
OnRconLoginAttempt U N/A
OnRecordingPlaybackEnd U N/A
OnScriptCash U N/A
OnTrailerUpdate U N/A
OnUnoccupiedVehicleUpdate U N/A
OnVehicleDamageStatusUpdate U N/A
OnVehicleDeath U N/A
OnVehicleMod U N/A
OnVehiclePaintjob U N/A
OnVehicleRespray U N/A
OnVehicleSirenStateChange U N/A
OnVehicleSpawn U N/A
OnVehicleStreamIn(vehicleid) U N/A
OnVehicleStreamIn(vehicleid, forplayerid) U N/A
OnVehicleStreamOut(vehicleid) U N/A
OnVehicleStreamOut(vehicleid, forplayerid) U N/A

`SetPlayerPos` consistency

A few notes about SetPlayerPos:

  1. This always removes them from their current vehicle. The new position is stored and instantly returned if GetPlayerPos is subsequently called. Should vehicle state be updated as well?
  2. SA:MP doesn't actually remember the position from SetPlayerPos. It sends the relocate command to the client, then lets the returning sync packet update the internally stored position. This is arguably more accurate wrt where the player actually is.

Those are almost mutually exclusive - either treat commands as the source of truth, in which case the vehicle needs updating on the server instantly; or treat sync packets as the source of truth, in which case GetPlayerPos should return the old value for a little while.

Math natives

Add an anglemode parameter to the asin, acos, atan and atan2 natives, just as was done in this commit: https://github.com/openmultiplayer/old.open.mp/pull/213/commits/4d024cc15b0f79aba86b34f3dcec60b329ad0c68
This was done in the old repo to be more consitent with the floatsin, floatcos and floattan natives.

Would also be nice to provide aliases for these functions:

  • floatsin -> sin
  • floatcos -> cos
  • floattan -> tan

Both mentioned things are not required features, just nice to have. Therefore also not adding this issue to the 'initial server release' milestone.

Consistent logging

goals:

  • log natives with invalid args passed - this will help server owners surface issues they may not have known about
  • use a consistent log format, not sentences with specifiers in them but structured logs that are easy to search/filter/parse

some additional notes:

  • not JSON logs - maybe in future if there's demand but this is way too verbose I think for now
  • keep interface simple
  • common events can have composable templates:
SCRIPT_API(SendDeathMessage, bool(IPlayer* killer, IPlayer* killee, int weapon))
{
	if(killee != nullptr)
	{
		PawnManager::Get()->players->sendDeathMessageToAll(killer, *killee, weapon);
	}
	else
	{
                 // args: component name, native name, argument name
		LogTemplates::InvalidArguments("player", "SendDeathMessage", "playerid");
	}

	return true;
}

Would, potentially (if using logfmt) output:

ts=2021-01-01T12:04:11 component="player" native="SendDeathMessage" arg="playerid" msg="invalid native argument"

Which would construct a properly formatted log using a well-known structure, this would keep logs of the same types of events consistent and allow for easier searching/filtering.

In this scenario, if a server owner wants to find all the points where their script is making invalid native calls, they can filter for invalid native argument and be certain that there are no other patterns to look for - they get the native name, argument name all in one, easy to read event.

This also facilitates the ability for larger more complex servers to ingest logs into a proper log aggregator for searching and filtering. Though I'd imagine I could count on one hand how many servers would find the need for this. That being said, by facilitating this, it may help server owners investigate new tools to make their operational tasks easier.

Print native

Just tested this again, remembering my work on this issue from the old repo.

Printing to console already works, as this functionality is provided by amxcons.c. But directly using that implementation is the cause of a color issue, see explanation here.

Solution 1: Don't directly call amxcons.c implementation from Pawn
Just write a print native like you'd do for any other SA-MP native, in which you call the amxcons.c function. This effectively cancels out the three 0 values received from the pawn script as you'd ignore them and replace each with -1.

SCRIPT_API(print, int(const std::string& string))
{
	// Make call to n_print from amxcons.c with -1 for the three colors
}

This is the way SA-MP does it. Benefit of this approach is that you don't need people to update their pawn-stdlib and samp-stdlib includes. This approach might be the way to go, as you'd need to do this anyway if you'd want to duplicate the output to a log file, aka server_log.txt.

Solution 2: Make people update their include files
pawn-lang/pawn-stdlib#13
pawn-lang/samp-stdlib#40
These pull requests make it so that pawn defaults to sending -1 instead of 0 for the three colors. Benefit of this approach is that people can start using colors when printing to the console. That's definitely a nice to have feature.

Solution 3: Hybrid

SCRIPT_API(print, int(const std::string& string, int foreground, int background, int highlight))
{
	// Make call to n_print from amxcons.c and pass through the three colors
}

People would still need to update their include files to send the default of -1 from Pawn, but they can supply their own colors if they want to.

Solution 4: Overloading of a SCRIPT_API native

SCRIPT_API(print, int(const std::string& string))
{
	// Make call to n_print from amxcons.c with -1 for the three colors
}

SCRIPT_API(print, int(const std::string& string, int foreground, int background, int highlight))
{
	// Make call to n_print from amxcons.c and pass through the three colors
}

I don't know if this is possible.

Solution 5: Default paramters to a SCRIPT_API native

SCRIPT_API(print, int(const std::string& string, int foreground = -1, int background = -1, int highlight = -1))
{
	// Make call to n_print from amxcons.c and pass through the three colors
}

I don't know if this is possible.

DestroyVehicle in OnVehicleSpawn will crash the server

The server will crash if vehicles are destroyed during execution of OnVehicleSpawn.

I think vehicles respawn should be handled once a second not every player update. It doesn't make any sense.
https://github.com/openmultiplayer/open.mp/blob/master/Server/Components/Vehicles/vehicles_impl.hpp#L425

Also, vehicles with respawn time -1 should be respawned after ~10s as already discussed on discord.

/*
	spawn in game, enter in Infernus and then leave.
	wait ~5s ...
*/

#include <a_samp>

main() {}

public OnGameModeInit()
{
    AddPlayerClass(0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
    CreateVehicle(411, -2327.5562,-1666.9230, 482.9944, 173.4508, 113, 186, 5, .addsiren = 0); //respawn time 5s
}

public OnVehicleSpawn(vehicleid)
{
    printf("vehicle %d respawned, let's destroy it ..", vehicleid);
    DestroyVehicle(vehicleid);
    printf("hello from the other side ...");
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, -2322.5808,-1626.6237,483.7053);
    SetPlayerFacingAngle(playerid, 125.8567);
    return 1;
}

~ScopedPoolReleaseLock()

Assertion failed: false && "(ctrl != nullptr && IsFull(*ctrl)) && \"Invalid operation on iterator. The element might have \" \"been erased, or the table might have rehashed.\"", file C:\.conan\cafed4\1\include\absl/container/internal/raw_hash_set.h, line 504

Better Logging

  • Log levels:
    • debug/trace - do we compile these in and enable/disable via a switch or only compile them into debug builds?
    • info
    • warn - problems caused by user that are recoverable
    • error - for undefined state, fatals, etc.
  • Structured logging in a simple standard format:
    ts="2021-04-11T16:20:00Z" msg="a thing happened" player="Southclaws"
    
    easily filterable/parsable/etc
  • Exposed via SDK so other components can use it and don't clutter up logs with a million different logging styles

additional stuff:

  • location? (component name, filename, line number?)
  • log to files? add option to disable this though for setups that use systemd/journald/log software
  • log rotation for files

Checkpoints module

There are several issues with the checkpoints module:

  1. You can have a race checkpoint and a normal checkpoint visible at the same time. The code assumes one or the other.
  2. Person and car checkpoints are infinite height, so the distance check for entry should be 2D not 3D (aerial checkpoints obviously aren't, so that's fine as-is).
  3. IsPlayerInCheckpoint will continue to work after DisablePlayerCheckpoint is called because enabled_ isn't checked.
  4. enabled_ is somewhat redundant, just add a NONE type to the type_ enum. You save some memory, and IsPlayerInCheckpoint gets fixed for free since the type check will now fail.
  5. size should be standardised as radius, instead radius or diameter as it currently is. But this is a breaking change so needs the breaking API.
  6. I don't think the data is correctly initialised. If you stand right in the centre of the world with no checkpoint IsPlayerInRaceCheckpoint will return false, but only because the radius is 0.0, which is more luck than judgement and easy to break.

PutPlayerInVehicle has to manually sync the vehicle to the player before sending the RPC

If the vehicle is not streamed in for a player yet, SA-MP runs a sync pass for the player on the position of the vehicle, so everything around the vehicle (including the vehicle itself) is streamed to the player before sending the PutPlayerInVehicle RPC.

Since we're not doing this, usages of PutPlayerInVehicle where the vehicle is not synced yet (eg. vehicle just spawned, vehicle is far away) will fail because the vehicle is simply not there yet.

Add timers to SDK

Having timers implemeneted into our SDK will make it far easier on people who want to:
write a timer implementation for their scripting language (pawn)
have timers in the gamemode components without going through 50 hoops just to call a function with a sleep delay.
that is all.

Add a misc component

Add a misc component to add stuff into it that aren't really related to core and they aren't complex/big enough to be a separated component

For example, game init stuff, preloading animations for fixing samp bugs, and etc

Add NPCs

For now just handle them and connect the default samp NPC program

Add various player functions

  • Set player marker for player
  • Gravity
  • Map icons
  • Name tags
  • Weather
  • Explosions
  • Stunt bonus
  • Click map
  • Probably more

YSF features & bugfixes

  • execute(const command[], saveoutput=0, index=0)
  • ffind(const pattern[], filename[], len, &idx)
  • frename(const oldname[], const newname[])
  • dfind(const pattern[], filename[], len, &idx)
  • dcreate(const name[])
  • drename(const oldname[], const newname[])
  • SetModeRestartTime(Float:time)
  • Float:GetModeRestartTime()
  • SetMaxPlayers(maxplayers)
  • SetMaxNPCs(maxnpcs)
  • LoadFilterScript(const scriptname[]);
  • UnLoadFilterScript(const scriptname[]);
  • GetFilterScriptCount()
  • GetFilterScriptName(id, name[], len = sizeof(name))
  • AddServerRule(const name[], const value[], E_SERVER_RULE_FLAGS:flags = CON_VARFLAG_RULE)
  • SetServerRule(const name[], const value[])
  • IsValidServerRule(const name[])
  • SetServerRuleFlags(const name[], E_SERVER_RULE_FLAGS:flags)
  • E_SERVER_RULE_FLAGS:GetServerRuleFlags(const name[])
  • ToggleChatTextReplacement(bool:toggle)
  • bool:ChatTextReplacementToggled()
  • GetServerSettings(&showplayermarkes, &shownametags = 0, &stuntbonus = 0, &useplayerpedanims = 0, &bLimitchatradius = 0, &disableinteriorenterexits = 0, &nametaglos = 0, &manualvehicleengine = 0, &limitplayermarkers = 0, &vehiclefriendlyfire = 0, &defaultcameracollision = 0, &Float:fGlobalchatradius = 0.0, &Float:fNameTagDrawDistance = 0.0, &Float:fPlayermarkerslimit = 0.0)
  • GetNPCCommandLine(npcid, npcscript[], length = sizeof(npcscript))
  • GetSyncBounds(&Float:hmin, &Float:hmax = 0.0, &Float:vmin = 0.0, &Float:vmax = 0.0)
  • SetSyncBounds(Float:hmin, Float:hmax, Float:vmin, Float:vmax)
  • GetRCONCommandName(const cmdname[], changedname[], len = sizeof(changedname))
  • ChangeRCONCommandName(const cmdname[], changedname[])
  • CallFunctionInScript(const scriptname[], const function[], const format[], {Float,_}:...)
  • EnableConsoleMSGsForPlayer(playerid, color)
  • DisableConsoleMSGsForPlayer(playerid)
  • HasPlayerConsoleMessages(playerid, &color = 0)
  • YSF_SetTickRate(ticks)
  • YSF_GetTickRate()
  • YSF_EnableNightVisionFix(bool:enable)
  • bool:YSF_IsNightVisionFixEnabled()
  • YSF_ToggleOnServerMessage(bool:toggle)
  • bool:YSF_IsOnServerMessageEnabled()
  • YSF_SetExtendedNetStatsEnabled(bool:enable)
  • bool:YSF_IsExtendedNetStatsEnabled()
  • YSF_SetAFKAccuracy(time_ms)
  • YSF_GetAFKAccuracy()
  • SetRecordingDirectory(const dir[])
  • GetRecordingDirectory(dir[], len = sizeof(dir))
  • IsValidNickName(const name[])
  • AllowNickNameCharacter(character, bool:allow)
  • IsNickNameCharacterAllowed(character)
  • GetAvailableClasses()
  • GetPlayerClass(classid, &teamid, &modelid = 0, &Float:spawn_x = 0.0, &Float:spawn_y = 0.0, &Float:spawn_z = 0.0, &Float:z_angle = 0.0, &weapon1 = 0, &weapon1_ammo = 0, &weapon2 = 0, &weapon2_ammo = 0, &weapon3 = 0, &weapon3_ammo = 0)
  • 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)
  • GetRunningTimers()
  • SetPlayerGravity(playerid, Float:gravity)
  • Float:GetPlayerGravity(playerid)
  • SetPlayerAdmin(playerid, bool:admin);
  • SetPlayerTeamForPlayer(playerid, teamplayerid, teamid)
  • GetPlayerTeamForPlayer(playerid, teamplayerid)
  • SetPlayerSkinForPlayer(playerid, skinplayerid, skin)
  • GetPlayerSkinForPlayer(playerid, skinplayerid)
  • SetPlayerNameForPlayer(playerid, nameplayerid, const playername[])
  • GetPlayerNameForPlayer(playerid, nameplayerid, playername[], size = sizeof(playername))
  • SetPlayerFightStyleForPlayer(playerid, styleplayerid, style)
  • GetPlayerFightStyleForPlayer(playerid, skinplayerid)
  • SetPlayerPosForPlayer(playerid, posplayerid, Float:fX, Float:fY, Float:fZ, bool:forcesync = true)
  • SetPlayerRotationQuatForPlayer(playerid, quatplayerid, Float:w, Float:x, Float:y, Float:z, bool:forcesync = true)
  • ApplyAnimationForPlayer(playerid, animplayerid, const animlib[], const animname[], Float:fDelta, loop, lockx, locky, freeze, time);
  • GetPlayerWeather(playerid)
  • TogglePlayerWidescreen(playerid, bool:set)
  • IsPlayerWidescreenToggled(playerid)
  • GetSpawnInfo(playerid, &teamid, &modelid = 0, &Float:spawn_x = 0.0, &Float:spawn_y = 0.0, &Float:spawn_z = 0.0, &Float:z_angle = 0.0, &weapon1 = 0, &weapon1_ammo = 0, &weapon2 = 0, &weapon2_ammo = 0, &weapon3 = 0, &weapon3_ammo = 0)
  • GetPlayerSkillLevel(playerid, skill)
  • IsPlayerCheckpointActive(playerid)
  • GetPlayerCheckpoint(playerid, &Float:fX, &Float:fY = 0.0, &Float:fZ = 0.0, &Float:fSize = 0.0)
  • IsPlayerRaceCheckpointActive(playerid)
  • GetPlayerRaceCheckpoint(playerid, &Float:fX, &Float:fY = 0.0, &Float:fZ = 0.0, &Float:fNextX = 0.0, &Float:fNextY = 0.0, &Float:fNextZ = 0.0, &Float:fSize = 0.0)
  • GetPlayerWorldBounds(playerid, &Float:x_max, &Float:x_min = 0.0, &Float:y_max = 0.0, &Float:y_min = 0.0)
  • IsPlayerInModShop(playerid)
  • GetPlayerSirenState(playerid)
  • GetPlayerLandingGearState(playerid)
  • GetPlayerHydraReactorAngle(playerid)
  • Float:GetPlayerTrainSpeed(playerid)
  • Float:GetPlayerZAim(playerid)
  • GetPlayerSurfingOffsets(playerid, &Float:fOffsetX, &Float:fOffsetY = 0.0, &Float:fOffsetZ = 0.0)
  • GetPlayerRotationQuat(playerid, &Float:w, &Float:x = 0.0, &Float:y = 0.0, &Float:z = 0.0)
  • GetPlayerDialogID(playerid)
  • GetPlayerSpectateID(playerid)
  • GetPlayerSpectateType(playerid)
  • GetPlayerLastSyncedVehicleID(playerid)
  • GetPlayerLastSyncedTrailerID(playerid)
  • GetPlayerRawIp(playerid)
  • SendBulletData(senderid, forplayerid = -1, weaponid, hittype, hitid, Float:fHitOriginX, Float:fHitOriginY, Float:fHitOriginZ, Float:fHitTargetX, Float:fHitTargetY, Float:fHitTargetZ, Float:fCenterOfHitX, Float:fCenterOfHitY, Float:fCenterOfHitZ)
  • ShowPlayerForPlayer(forplayerid, playerid, bool:setskin=false)
  • HidePlayerForPlayer(forplayerid, playerid)
  • AddPlayerForPlayer(forplayerid, playerid, isnpc = 0)
  • RemovePlayerForPlayer(forplayerid, playerid)
  • SetPlayerChatBubbleForPlayer(forplayerid, playerid, const text[], color, Float:drawdistance, expiretime)
  • ResetPlayerMarkerForPlayer(playerid, resetplayerid)
  • SetPlayerVersion(playerid, const version[])
  • IsPlayerSpawned(playerid)
  • IsPlayerControllable(playerid)
  • SpawnForWorld(playerid)
  • BroadcastDeath(playerid)
  • IsPlayerCameraTargetEnabled(playerid)
  • SetPlayerDisabledKeysSync(playerid, keys, updown = 0, leftright = 0)
  • GetPlayerDisabledKeysSync(playerid, &keys, &updown = 0, &leftright = 0)
  • GetPlayerBuildingsRemoved(playerid)
  • IsBuildingRemovedForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius)
  • TogglePlayerGhostMode(playerid, bool:toggle)
  • GetPlayerGhostMode(playerid)
  • SetPlayerSyncKeys(playerid, keys, updown, leftright)
  • SetPlayerSyncPos(playerid, Float:x, Float:y, Float:z)
  • SetPlayerSyncVelocity(playerid, Float:x, Float:y, Float:z)
  • SetPlayerSyncRotationQuat(playerid, Float:w, Float:x, Float:y, Float:z)
  • SetPlayerSyncCameraFrontVector(playerid, Float:x, Float:y, Float:z)
  • SetPlayerSyncCameraPos(playerid, Float:x, Float:y, Float:z)
  • SetPlayerSyncCameraMode(playerid, mode)
  • SetPlayerSyncWeapon(playerid, weaponid)
  • GetPlayerSyncWeapon(playerid)
  • SetPlayerSyncWeaponState(playerid, weaponstate)
  • SetPlayerSyncSpecialAction(playerid, actionid)
  • SetPlayerSyncHealth(playerid, Float:health)
  • SetPlayerSyncArmour(playerid, Float:armour)
  • SetPlayerSyncVehicleId(playerid, vehicleid, bool:setstate=false)
  • SetPlayerSyncVehicleSeat(playerid, seat)
  • SetPlayerSyncVehiclePosition(playerid, Float:x, Float:y, Float:z)
  • SetPlayerSyncVehicleVelocity(playerid, Float:x, Float:y, Float:z)
  • SetPlayerSyncVehicleRotQuat(playerid, Float:w, Float:x, Float:y, Float:z)
  • SetPlayerSyncVehicleHealth(playerid, Float:health)
  • SetPlayerSyncTrainSpeed(playerid, Float:speed)
  • SendPlayerDeath(playerid, forplayerid=-1)
  • UpdatePlayerSyncData(playerid, type=-1, bool:setstate=false)
  • SendPlayerClientGameInit(playerid, bool:usecjwalk=bool:-1, bool:limitglobalchat=bool:-1, Float:globalchatradius=Float:-1, Float:nametagdistance=Float:-1, bool:disableenterexits=bool:-1, bool:nametaglos=bool:-1, bool:manualvehengineandlights=bool:-1, spawnsavailable=-1, bool:shownametags=bool:-1, bool:showplayermarkers=bool:-1, onfoot_rate=-1, incar_rate=-1, weapon_rate=-1, lagcompmode=-1, bool:vehiclefriendlyfire=bool:-1, const hostname[]="")
  • SetPlayerConnectMode(playerid, E_PLAYER_CONNECT_MODE:mode)
  • E_PLAYER_CONNECT_MODE:GetPlayerConnectMode(playerid)
  • GetActorSpawnInfo(actorid, &skinid, &Float:fX = 0.0, &Float:fY = 0.0, &Float:fZ = 0.0, &Float:fAngle = 0.0)
  • GetActorSkin(actorid)
  • GetActorAnimation(actorid, animlib[], animlibsize = sizeof(animlib), animname[], animnamesize = sizeof(animname), &Float:fDelta, &loop = 0, &lockx = 0, &locky = 0, &freeze = 0, &time = 0)
  • TogglePlayerScoresPingsUpdate(playerid, bool:toggle)
  • TogglePlayerFakePing(playerid, bool:toggle)
  • SetPlayerFakePing(playerid, ping)
  • SetPlayerNameInServerQuery(playerid, const name[])
  • GetPlayerNameInServerQuery(playerid, name[], len = sizeof(name))
  • ResetPlayerNameInServerQuery(playerid)
  • IsPlayerPaused(playerid)
  • GetPlayerPausedTime(playerid)
  • HideObjectForPlayer(playerid, objectid)
  • ShowObjectForPlayer(playerid, objectid)
  • HideNewObjectsForPlayer(playerid, bool:toggle)
  • IsObjectHiddenForPlayer(playerid, objectid)
  • NewObjectsHiddenForPlayer(playerid)
  • Float:GetObjectDrawDistance(objectid)
  • SetObjectMoveSpeed(objectid, Float:fSpeed)
  • Float:GetObjectMoveSpeed(objectid)
  • GetObjectTarget(objectid, &Float:fX, &Float:fY = 0.0, &Float:fZ = 0.0)
  • GetObjectAttachedData(objectid, &attached_vehicleid, &attached_objectid = 0, &attached_playerid = 0)
  • GetObjectAttachedOffset(objectid, &Float:fX, &Float:fY = 0.0, &Float:fZ = 0.0, &Float:fRotX = 0.0, &Float:fRotY = 0.0, &Float:fRotZ = 0.0)
  • GetObjectSyncRotation(objectid)
  • GetObjectMaterial(objectid, materialindex, &modelid, txdname[], txdnamelen = sizeof(txdname), texturename[], texturenamelen = sizeof(texturename), &materialcolor = 0)
  • GetObjectMaterialText(objectid, materialindex, text[], textlen = sizeof(text), &materialsize, fontface[], fontfacelen = sizeof(fontface), &fontsize = 0, &bold = 0, &fontcolor = 0, &backcolor = 0, &textalignment = 0)
  • IsObjectNoCameraCol(objectid)
  • Float:GetPlayerObjectDrawDistance(playerid, objectid)
  • SetPlayerObjectMoveSpeed(playerid, objectid, Float:fSpeed)
  • Float:GetPlayerObjectMoveSpeed(playerid, objectid)
  • Float:GetPlayerObjectTarget(playerid, objectid, &Float:fX, &Float:fY = 0.0, &Float:fZ = 0.0)
  • GetPlayerObjectAttachedData(playerid, objectid, &attached_vehicleid, &attached_objectid = 0, &attached_playerid = 0)
  • GetPlayerObjectAttachedOffset(playerid, objectid, &Float:fX, &Float:fY = 0.0, &Float:fZ = 0.0, &Float:fRotX = 0.0, &Float:fRotY = 0.0, &Float:fRotZ = 0.0)
  • GetPlayerObjectSyncRotation(playerid, objectid)
  • GetPlayerObjectMaterial(playerid, objectid, materialindex, &modelid, txdname[], txdnamelen = sizeof(txdname), texturename[], texturenamelen = sizeof(texturename), &materialcolor = 0)
  • GetPlayerObjectMaterialText(playerid, objectid, materialindex, text[], textlen = sizeof(text), &materialsize, fontface[], fontfacelen = sizeof(fontface), &fontsize = 0, &bold = 0, &fontcolor = 0, &backcolor = 0, &textalignment = 0)
  • IsPlayerObjectNoCameraCol(playerid, objectid)
  • GetPlayerSurfingPlayerObjectID(playerid)
  • GetPlayerCameraTargetPlayerObj(playerid)
  • GetObjectType(playerid, objectid)
  • GetPlayerAttachedObject(playerid, index, &modelid, &bone = 0, &Float:fX = 0.0, &Float:fY = 0.0, &Float:fZ = 0.0, &Float:fRotX = 0.0, &Float:fRotY = 0.0, &Float:fRotZ = 0.0, &Float:fSacleX = 0.0, &Float:fScaleY = 0.0, &Float:fScaleZ = 0.0, &materialcolor1 = 0, &materialcolor2 = 0)
  • SetPlayerAttachedObjForPlayer(forplayerid, attachtoplayerid, index, modelid, bone, Float:fOffsetX = 0.0, Float:OffsetY = 0.0, Float:fOffsetZ = 0.0, Float:fRotX = 0.0, Float:fRotY = 0.0, Float:fRotZ = 0.0, Float:fScaleX = 1.0, Float:fScaleY = 1.0, Float:fScaleZ = 1.0, materialcolor1 = 0, materialcolor2 = 0)
  • GetPlayerAttachedObjForPlayer(forplayerid, attachtoplayerid, index, &modelid, &bone = 0, &Float:fX = 0.0, &Float:fY = 0.0, &Float:fZ = 0.0, &Float:fRotX = 0.0, &Float:fRotY = 0.0, &Float:fRotZ = 0.0, &Float:fSacleX = 0.0, &Float:fScaleY = 0.0, &Float:fScaleZ = 0.0, &materialcolor1 = 0, &materialcolor2 = 0)
  • RemPlayerAttachedObjForPlayer(forplayerid, removefromplayerid, index)
  • IsPlayerAttachedObjForPlayer(forplayerid, attachtoplayerid, index)
  • AttachPlayerObjectToObject(playerid, objectid, attachtoid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ, SyncRotation = 1)
  • ClearBanList()
  • IsBanned(const ipaddress[])
  • SetTimeoutTime(playerid, time_ms)
  • GetLocalIP(index, localip[], len = sizeof(localip))
  • SetExclusiveBroadcast(toggle)
  • BroadcastToPlayer(playerid, toggle = 1)
  • ToggleCloseConnectionFix(bool:toggle)
  • GetVehicleSpawnInfo(vehicleid, &Float:fX, &Float:fY = 0.0, &Float:fZ = 0.0, &Float:fRot = 0.0, &color1 = 0, &color2 = 0)
  • SetVehicleSpawnInfo(vehicleid, modelid, Float:fX, Float:fY, Float:fZ, Float:fAngle, color1, color2, respawntime = -2, interior = -2)
  • GetVehicleColor(vehicleid, &color1, &color2 = 0)
  • GetVehiclePaintjob(vehicleid)
  • GetVehicleInterior(vehicleid)
  • GetVehicleNumberPlate(vehicleid, plate[], len = sizeof(plate))
  • SetVehicleRespawnDelay(vehicleid, delay)
  • GetVehicleRespawnDelay(vehicleid)
  • SetVehicleOccupiedTick(vehicleid, ticks)
  • SetVehicleRespawnTick(vehicleid, ticks)
  • GetVehicleLastDriver(vehicleid)
  • GetVehicleCab(vehicleid)
  • HasVehicleBeenOccupied(vehicleid)
  • SetVehicleBeenOccupied(vehicleid, bool:occupied)
  • IsVehicleOccupied(vehicleid)
  • IsVehicleDead(vehicleid)
  • SetVehicleDead(vehicleid, bool:dead)
  • SetVehicleParamsSirenState(vehicleid, sirenState)
  • ToggleVehicleSirenEnabled(vehicleid, enabled)
  • IsVehicleSirenEnabled(vehicleid)
  • GetVehicleMatrix(vehicleid, &Float:rightX, &Float:rightY = 0.0, &Float:rightZ = 0.0, &Float:upX = 0.0, &Float:upY = 0.0, &Float:upZ = 0.0, &Float:atX = 0.0, &Float:atY = 0.0, &Float:atZ = 0.0)
  • GetVehicleModelCount(modelid)
  • GetVehicleModelsUsed()
  • HideVehicle(vehicleid)
  • ShowVehicle(vehicleid)
  • IsVehicleHidden(vehicleid)
  • IsValidGangZone(zoneid)
  • IsPlayerInGangZone(playerid, zoneid)
  • IsGangZoneVisibleForPlayer(playerid, zoneid)
  • GangZoneGetColorForPlayer(playerid, zoneid)
  • GangZoneGetFlashColorForPlayer(playerid, zoneid)
  • IsGangZoneFlashingForPlayer(playerid, zoneid)
  • GangZoneGetPos(zoneid, &Float:fMinX, &Float:fMinY = 0.0, &Float:fMaxX = 0.0, &Float:fMaxY = 0.0)
  • CreatePlayerGangZone(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy)
  • PlayerGangZoneDestroy(playerid, zoneid)
  • PlayerGangZoneShow(playerid, zoneid, color)
  • PlayerGangZoneHide(playerid, zoneid)
  • PlayerGangZoneFlash(playerid, zoneid, color)
  • PlayerGangZoneStopFlash(playerid, zoneid)
  • IsValidPlayerGangZone(playerid, zoneid)
  • IsPlayerInPlayerGangZone(playerid, zoneid)
  • IsPlayerGangZoneVisible(playerid, zoneid)
  • PlayerGangZoneGetColor(playerid, zoneid)
  • PlayerGangZoneGetFlashColor(playerid, zoneid)
  • IsPlayerGangZoneFlashing(playerid, zoneid)
  • PlayerGangZoneGetPos(playerid, zoneid, &Float:fMinX, &Float:fMinY = 0.0, &Float:fMaxX = 0.0, &Float:fMaxY = 0.0)
  • IsValidTextDraw(Text:textdrawid)
  • IsTextDrawVisibleForPlayer(playerid, Text:textdrawid)
  • TextDrawGetString(Text:textdrawid, text[], len = sizeof(text))
  • TextDrawGetLetterSize(Text:textdrawid, &Float:fX, &Float:fY = 0.0)
  • TextDrawGetTextSize(Text:textdrawid, &Float:fX, &Float:fY = 0.0)
  • TextDrawGetPos(Text:textdrawid, &Float:fX, &Float:fY = 0.0)
  • TextDrawGetColor(Text:textdrawid)
  • TextDrawGetBoxColor(Text:textdrawid)
  • TextDrawGetBackgroundColor(Text:textdrawid)
  • TextDrawGetShadow(Text:textdrawid)
  • TextDrawGetOutline(Text:textdrawid)
  • TextDrawGetFont(Text:textdrawid)
  • TextDrawIsBox(Text:textdrawid)
  • TextDrawIsProportional(Text:textdrawid)
  • TextDrawIsSelectable(Text:textdrawid)
  • TextDrawGetAlignment(Text:textdrawid)
  • TextDrawGetPreviewModel(Text:textdrawid)
  • TextDrawGetPreviewRot(Text:textdrawid, &Float:fRotX, &Float:fRotY = 0.0, &Float:fRotZ = 0.0, &Float:fZoom = 0.0)
  • TextDrawGetPreviewVehCol(Text:textdrawid, &color1, &color2 = 0)
  • TextDrawSetStringForPlayer(Text:textdrawid, playerid, const string[], {Float,_}:...)
  • IsValidPlayerTextDraw(playerid, PlayerText:textdrawid)
  • IsPlayerTextDrawVisible(playerid, PlayerText:textdrawid)
  • PlayerTextDrawGetString(playerid, PlayerText:textdrawid, text[], len = sizeof(text))
  • PlayerTextDrawSetPos(playerid, PlayerText:textdrawid, Float:fX, Float:fY)
  • PlayerTextDrawGetLetterSize(playerid, PlayerText:textdrawid, &Float:fX, &Float:fY = 0.0)
  • PlayerTextDrawGetTextSize(playerid, PlayerText:textdrawid, &Float:fX, &Float:fY = 0.0)
  • PlayerTextDrawGetPos(playerid, PlayerText:textdrawid, &Float:fX, &Float:fY = 0.0)
  • PlayerTextDrawGetColor(playerid, PlayerText:textdrawid)
  • PlayerTextDrawGetBoxColor(playerid, PlayerText:textdrawid)
  • PlayerTextDrawGetBackgroundCol(playerid, PlayerText:textdrawid)
  • PlayerTextDrawGetShadow(playerid, PlayerText:textdrawid)
  • PlayerTextDrawGetOutline(playerid, PlayerText:textdrawid)
  • PlayerTextDrawGetFont(playerid, PlayerText:textdrawid)
  • PlayerTextDrawIsBox(playerid, PlayerText:textdrawid)
  • PlayerTextDrawIsProportional(playerid, PlayerText:textdrawid)
  • PlayerTextDrawIsSelectable(playerid, PlayerText:textdrawid)
  • PlayerTextDrawGetAlignment(playerid, PlayerText:textdrawid)
  • PlayerTextDrawGetPreviewModel(playerid, PlayerText:textdrawid)
  • PlayerTextDrawGetPreviewRot(playerid, PlayerText:textdrawid, &Float:fRotX, &Float:fRotY = 0.0, &Float:fRotZ = 0.0, &Float:fZoom = 0.0)
  • PlayerTextDrawGetPreviewVehCol(playerid, PlayerText:textdrawid, &color1, &color2 = 0)
  • IsValid3DTextLabel(Text3D:id)
  • Is3DTextLabelStreamedIn(playerid, Text3D:id)
  • Get3DTextLabelText(Text3D:id, text[], len = sizeof(text))
  • Get3DTextLabelColor(Text3D:id)
  • Get3DTextLabelPos(Text3D:id, &Float:fX, &Float:fY = 0.0, &Float:fZ = 0.0)
  • Float:Get3DTextLabelDrawDistance(Text3D:id)
  • Get3DTextLabelLOS(Text3D:id)
  • Get3DTextLabelVirtualWorld(Text3D:id)
  • Get3DTextLabelAttachedData(Text3D:id, &attached_playerid, &attached_vehicleid = 0)
  • IsValidPlayer3DTextLabel(playerid, PlayerText3D:id)
  • GetPlayer3DTextLabelText(playerid, PlayerText3D:id, text[], len = sizeof(text))
  • GetPlayer3DTextLabelColor(playerid, PlayerText3D:id)
  • GetPlayer3DTextLabelPos(playerid, PlayerText3D:id, &Float:fX, &Float:fY = 0.0, &Float:fZ = 0.0)
  • Float:GetPlayer3DTextLabelDrawDist(playerid, PlayerText3D:id)
  • GetPlayer3DTextLabelLOS(playerid, PlayerText3D:id)
  • GetPlayer3DTextLabelVirtualW(playerid, PlayerText3D:id)
  • GetPlayer3DTextLabelAttached(playerid, PlayerText3D:id, &attached_playerid, &attached_vehicleid = 0)
  • IsMenuDisabled(Menu:menuid)
  • IsMenuRowDisabled(Menu:menuid, row)
  • GetMenuColumns(Menu:menuid)
  • GetMenuItems(Menu:menuid, column)
  • GetMenuPos(Menu:menuid, &Float:fX, &Float:fY = 0.0)
  • GetMenuColumnWidth(Menu:menuid, &Float:fColumn1, &Float:fColumn2 = 0.0)
  • GetMenuColumnHeader(Menu:menuid, column, header[], len = sizeof(header))
  • GetMenuItem(Menu:menuid, column, itemid, item[], len = sizeof(item))
  • IsValidPickup(pickupid)
  • IsPickupStreamedIn(playerid, pickupid)
  • GetPickupPos(pickupid, &Float:fX, &Float:fY = 0.0, &Float:fZ = 0.0)
  • GetPickupModel(pickupid)
  • GetPickupType(pickupid)
  • GetPickupVirtualWorld(pickupid)
  • SetPickupPos(pickupid, Float:X, Float:Y, Float:Z, bool:update=true)
  • SetPickupModel(pickupid, model, bool:update=true)
  • SetPickupType(pickupid, type, bool:update=true)
  • SetPickupVirtualWorld(pickupid, virtualworld)
  • ShowPickupForPlayer(playerid, pickupid)
  • HidePickupForPlayer(playerid, pickupid)
  • SetPickupForPlayer(playerid, id, model, type, Float:X, Float:Y, Float:Z)
  • CreatePlayerPickup(playerid, model, type, Float:X, Float:Y, Float:Z, virtualworld = 0)
  • DestroyPlayerPickup(playerid, pickupid)
  • IsValidPlayerPickup(playerid, pickupid)
  • IsPlayerPickupStreamedIn(playerid, pickupid)
  • GetPlayerPickupPos(playerid, pickupid, &Float:fX, &Float:fY = 0.0, &Float:fZ = 0.0)
  • GetPlayerPickupModel(playerid, pickupid)
  • GetPlayerPickupType(playerid, pickupid)
  • GetPlayerPickupVirtualWorld(playerid, pickupid)
  • GetColCount()
  • Float:GetColSphereRadius(modelid)
  • GetColSphereOffset(modelid, &Float:fX, &Float:fY = 0.0, &Float:fZ = 0.0)
  • SendClientMessagef(playerid, color, const message[], {Float,_}:...)
  • SendClientMessageToAllf(color, const message[], {Float,_}:...)
  • GameTextForPlayerf(playerid, displaytime, style, const message[], {Float,_}:...)
  • GameTextForAllf(displaytime, style, const message[], {Float,_}:...)
  • SendPlayerMessageToPlayerf(playerid, senderid, const message[], {Float,_}:...)
  • SendPlayerMessageToAllf(senderid, const message[], {Float,_}:...)
  • SendRconCommandf(const command[], {Float,_}:...)
  • IsValidVehicle(vehicleid)
  • Float:GetGravity()
  • GetWeaponSlot(weaponid)
  • SendRPC(playerid, RPC, {Float,_}:...);
  • SendData(playerid, {Float,_}:...);

Not in the latest YSF include:

  • SetPlayerSyncPosition(playerid, Float:x, Float:y, Float:z)

Building on Linux (seems to) require -m32

My cmake invocation on Linux currently looks like this:

CC="$(which clang) -m32" CXX="$(which clang++) -m32" cmake .. -DCMAKE_BUILD_TYPE=Debug

Obviously passing -m32 straight into CC/CXX env vars isn't ideal ; I'm opening this issue so that we don't forget to find a solution eventually :-)

Server listing announcement

Both these endpoints use the same method: a simple HTTP GET request and that's it:

  • https://api.open.mp/{version}/announce/{port}
  • http://lists.sa-mp.com/{version}/announce/{port}

In future, we probably want more stuff like controlling server description, banner image, stuff like that. But for now, simple HTTP call is all you need for either endpoint.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.