Skip to content

Lots of fixes and improvements #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
May 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
89a7530
Improvements from lua linter and other changes
NexiusTailer Apr 11, 2025
d6efb95
Added OnPlayer(Give/Take)Damage, other fixes
NexiusTailer Apr 11, 2025
4fdb323
Added OnPlayerWeaponShot callback
NexiusTailer Apr 12, 2025
022f62f
Fix formatting, improve rcon CMDs
NexiusTailer Apr 13, 2025
f580b60
Fix formatting (more) and a new callback
NexiusTailer Apr 13, 2025
d91344f
Added GetPlayerLastShotVectors, minor fixes
NexiusTailer Apr 13, 2025
b87b9a2
Implemented new functions, many fixes
NexiusTailer Apr 17, 2025
35ce059
Final tweaks, correct some rcon cmds
NexiusTailer Apr 17, 2025
4955fb8
Correct returns in deprecations
NexiusTailer Apr 18, 2025
af976b3
Streamed (local) mode for player markers and map icons
NexiusTailer Apr 18, 2025
867e26b
More clear purposes for ACL request
NexiusTailer Apr 18, 2025
31b1357
Added AttachPlayerObjectToVehicle, more dummies
NexiusTailer Apr 18, 2025
7c5c1a6
Reviewed all incorrect native parameters
NexiusTailer Apr 19, 2025
6e1132e
Parameters name tweaks
NexiusTailer Apr 19, 2025
e7ff849
Implemented SVars, GetAnimationName
NexiusTailer Apr 20, 2025
31be809
Implemented GetVehicleModelInfo
NexiusTailer Apr 20, 2025
ad66de2
Make function list consistent
NexiusTailer Apr 24, 2025
d84c96c
Little tweak for a callback params
NexiusTailer Apr 24, 2025
c72c1bf
Complete native list, fix db functions
NexiusTailer Apr 26, 2025
66b5586
Fully working scoreboard, default player skills
NexiusTailer Apr 27, 2025
c31ce56
Many gameplay adjustments on SA-MP manner
NexiusTailer Apr 29, 2025
5076efa
Update obsolete bin* functions
NexiusTailer Apr 29, 2025
a1a13eb
Tweaks for GetPlayerWeaponData update rate
NexiusTailer Apr 29, 2025
b887145
Fix for a couple console variables
NexiusTailer Apr 29, 2025
77ebb96
Fixes from linter (second pass)
NexiusTailer May 2, 2025
72dfb82
Add bool where it's required in a_amx.inc
NexiusTailer May 2, 2025
37b7917
Add a few more mta functions
NexiusTailer May 2, 2025
10e0c07
More tweaks after linter
NexiusTailer May 2, 2025
c6aede1
Tiny params update in testgm.pwn
NexiusTailer May 2, 2025
1b53263
Tiny params update in a_mta.lua
NexiusTailer May 2, 2025
c917c5c
Correct `amx.invulnerable` to `Invulnerable`
NexiusTailer May 3, 2025
4abde18
Initialize player state as none when joining
NexiusTailer May 3, 2025
73dfcee
Make things more clear with a comment
NexiusTailer May 3, 2025
eb815b9
Tiny format tweak
NexiusTailer May 3, 2025
70fd12f
Fixes after test with a few players
NexiusTailer May 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/function_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ labels: function
<!-- If you know equivalent of the function or functions in MTA, please write it here. -->

**Additional information**
<!-- The additional information can be an article about it, wiki of SAMP or something that can helps us. -->
<!-- The additional information can be an article about it, wiki of SA-MP or something that can helps us. -->
43 changes: 24 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

*amx* is a software package that allows the execution of unmodified San
Andreas: Multiplayer 0.3.7 gamemodes, filterscripts and plugins on Multi
Theft Auto: San Andreas 1.5.8 and higher servers. It is open source, and [**a prebuilt
Theft Auto: San Andreas 1.6 and higher servers. It is open source, and [**a prebuilt
binary for Windows is available for testing purposes right now**](https://github.com/multitheftauto/amx/releases).

- [License](#license)
Expand Down Expand Up @@ -86,12 +86,19 @@ features:
## Installation

*amx* consists of a binary server module (.dll/.so) and a Lua resource.
It will only run on MTA:SA 1.0 and later. Installation steps are lined
It will only run on MTA:SA 1.6 and later. Installation steps are lined
out below.

### Extracting

Extract the "mods" folder into your MTA "server" directory.
- All needed binary files are in the archive provided on Releases
page. Unpack amx.zip and extract the `mods` folder into your MTA
`server` directory.

- `amx` folder located in mods/deathmatch/resources is a place for the
mentioned Lua resources. It will be empty at this point, so you need
to copy all the latest files of `amx` folder from this repository
into your `amx` folder.

### Configuration

Expand Down Expand Up @@ -125,13 +132,16 @@ Extract the "mods" folder into your MTA "server" directory.

The following rights are used for the following purposes:

- `general.ModifyOtherObjects`: to access files of `amx-*`
resources
- `general.ModifyOtherObjects`:
- to access files of `amx-*` resources
- `function.startResource` \
`function.stopResource` \
`function.restartResource`:
- to automatically (re)start filterscripts when `amx` starts
- for rcon
- `function.getServerPassword` \
`function.setServerPassword`:
- for rcon

### Migrating gamemodes, filterscripts, plugins from an SA-MP server

Expand Down Expand Up @@ -179,7 +189,7 @@ Information about this is lined out below.

- In SA-MP, there is one folder that contains all gamemodes and
another that contains all filterscripts. In MTA, it is the
convention to create a separate resource (i.e. folder) for each
convention to create a separate resource (i.e. folder) for each
gamemode. *amx* follows the MTA convention for better integration,
which means that a resource needs to be created for each gamemode
and filterscript. The naming convention for these is amx-*name* for
Expand Down Expand Up @@ -250,7 +260,7 @@ Information about this is lined out below.

## Running gamemodes and filterscripts

Before you can run sa-mp modes or filterscripts, you need to start the
Before you can run SA-MP modes or filterscripts, you need to start the
*amx* resource. Type this command in the server console or as admin in
the ingame console:

Expand Down Expand Up @@ -378,7 +388,7 @@ amxRegisterPawnPrototypes(prototypes);
native amxVersion ( &Float:ver );
```

Retrieves the *amx* version as a floating point number, e.g. `1.3`.
Retrieves the *amx* version as a floating point number, e.g. `1.3`.

### amxVersionString

Expand Down Expand Up @@ -523,7 +533,7 @@ with [amxRegisterLuaPrototypes](#amxRegisterLuaPrototypes). Both
functions associate a number of function names with their argument types
and (optionally) return type. To specify a return type, prepend the
function name with the type letter followed by a colon (:), for example:
`f:testfn`. If you do not specify a return type (i.e. only specify the
`f:testfn`. If you do not specify a return type (i.e. only specify the
name, `testfn`), "i" will be assumed.

See the syntax sections of the two registration functions for the
Expand Down Expand Up @@ -666,16 +676,11 @@ is perfect. Below is a list of limitations that may or may not be
addressed in later versions of *amx* and Multi Theft Auto.

- The following scripting functions are currently not implemented and
will have no effect when called: AllowAdminTeleport,
AllowInteriorWeapons, AllowPlayerTeleport,
DisableInteriorEnterExits, EnableStuntBonusForAll,
EnableStuntBonusForPlayer, EnableTirePopping (tire popping is always
on), EnableZoneNames, LimitGlobalChatRadius, PlayerPlaySound,
SendDeathMessage (use the "killmessages" resource on your server
instead for graphical death messages), SetDeathDropAmount,
SetDisabledWeapons, SetEchoDestination, SetNameTagDrawDistance,
SetPlayerDisabledWeapons, SetTeamCount, SetVehicleNumberPlate,
ShowPlayerNameTagForPlayer, TextDrawSetProportional,
will have no effect when called: DisableInteriorEnterExits,
EnableStuntBonusForAll, EnableStuntBonusForPlayer, EnableTirePopping
(tire popping is always on), PlayerPlaySound, SendDeathMessage (use
the "killmessages" resource on your server instead for graphical
death messages), SetNameTagDrawDistance, TextDrawSetProportional,
UsePlayerPedAnims.

## Credits
Expand Down
175 changes: 0 additions & 175 deletions amx-deps/a_amx.inc

This file was deleted.

6 changes: 3 additions & 3 deletions amx-deps/amxdeploy.pl
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ sub copySelection {

print "> Configuring\n";

# Read sa-mp config
# Read SA-MP config
my %sampcfg;
open SAMPCFG, $oldsrvpath . "/server.cfg";
while(<SAMPCFG>) {
Expand Down Expand Up @@ -279,7 +279,7 @@ sub copySelection {

# Get filterscripts already in amx meta.xml
my %usedFilterscripts = %{{ map {$_ => 1 if(!/^$/)} split(/\s+/, $filterscriptsNode->att("value")) }};
# Add filterscripts that are in samp's server.cfg and also exist in MTA
# Add filterscripts that are in SA-MP's server.cfg and also exist in MTA
if($sampcfg{filterscripts}) {
for(split /\s+/, $sampcfg{filterscripts}) {
next if(!-e $newsrvpath . "/mods/deathmatch/resources/amx-fs-$_");
Expand All @@ -289,7 +289,7 @@ sub copySelection {

# Get plugins already in amx meta.xml
my %usedPlugins = %{{ map {$_ => 1 if(!/^$/)} split(/\s+/, $pluginsNode->att("value")) }};
# Add plugins that are in samp's server.cfg and also exist in MTA
# Add plugins that are in SA-MP's server.cfg and also exist in MTA
if($sampcfg{plugins}) {
for(split /\s+/, $sampcfg{plugins}) {
next if(!-e $newsrvpath . "/mods/deathmatch/resources/amx/plugins/$_.dll" && !-e $newsrvpath . "/mods/deathmatch/resources/amx/plugins/$_.so");
Expand Down
1 change: 0 additions & 1 deletion amx-deps/meta.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<meta>
<info name="Advanced Map Xtreme" author="arc_" type="gamemode" />
<!-- This is only a dummy file to prevent server errors. -->
<!-- See install.html for installation instructions -->
</meta>
2 changes: 1 addition & 1 deletion amx-deps/src/CFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ int CFunctions::amxLoad(lua_State *luaVM) {
return 1;
}

// Register sa-mp and plugin natives
// Register SA-MP and plugin natives
amx_CoreInit(amx);
amx_ConsoleInit(amx);
amx_FloatInit(amx);
Expand Down
Loading