Skip to content

Add natives for the extended ReGameDLL API (v5.35) - #401

Open
Pokimoshka wants to merge 1 commit into
rehlds:masterfrom
Pokimoshka:natives/extended-api
Open

Pokimoshka wants to merge 1 commit into
rehlds:masterfrom
Pokimoshka:natives/extended-api

Conversation

@Pokimoshka

Copy link
Copy Markdown

Summary

Exposes 16 new ReGameDLL API helpers to AMXX plugins and syncs the bundled regamedll_api.h to API v5.35.

New natives

Native Description
rg_get_user_account / rg_set_user_account player money
rg_get_user_health / rg_set_user_health player health
rg_set_user_frags / rg_set_user_deaths player score
rg_get_user_team player team
rg_is_player_alive alive check
rg_bot_add / rg_bot_kick bot management
rg_screen_fade / rg_screen_shake visual effects
rg_show_message / rg_show_message_all HUD message
rg_client_print_all print text to all clients
rg_say_text chat (SayText) message to all

Changes

  • reapi/src/natives/natives_misc.cpp - native implementations + registration in Misc_Natives_RG
  • reapi/extra/amxmodx/scripting/include/reapi_gamedll.inc - native declarations with docs
  • reapi/include/cssdk/dlls/regamedll_api.h - synced to API v5.35 (19 new function pointers)

Dependency

Depends on the ReGameDLL API v5.35 extension (see rehlds/ReGameDLL_CS#1204). The new function pointers are appended at the end of ReGameFuncs_t, so this stays ABI-compatible for existing consumers.

Expose 16 new ReGameDLL API helpers to AMXX plugins:

- rg_get_user_account / rg_set_user_account   (money)
- rg_get_user_health / rg_set_user_health     (health)
- rg_set_user_frags / rg_set_user_deaths      (score)
- rg_get_user_team / rg_is_player_alive       (player state)
- rg_bot_add / rg_bot_kick                    (bots)
- rg_screen_fade / rg_screen_shake            (visual effects)
- rg_show_message / rg_show_message_all       (HUD message)
- rg_client_print_all                          (print text to all)
- rg_say_text                                  (chat message to all)

The matching natives are implemented in natives_misc.cpp, registered in
Misc_Natives_RG, declared in reapi_gamedll.inc, and the bundled
regamedll_api.h is synced to API v5.35 so the new function pointers are
available.

Depends on the ReGameDLL API v5.35 extension.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant