-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
63 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -328,3 +328,5 @@ ASALocalRun/ | |
|
||
# MFractors (Xamarin productivity tool) working folder | ||
.mfractor/ | ||
|
||
api.hpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "main.hpp" | ||
#include "api.hpp" | ||
|
||
#define MAX_PLAYER_NAME 33 | ||
|
||
// native GetPlayerName(playerid, const name[]) | ||
// todo: different than on samp: native GetPlayerName(playerid, const name[], len) | ||
static cell AMX_NATIVE_CALL n_GetPlayerName(AMX *amx, const cell *params) | ||
{ | ||
HAS_PLAYER(player, (rage::entityId_t)params[1]) | ||
{ | ||
cell* addr = amx_Address(amx, params[2]); | ||
amx_SetString(addr, player->GetName().c_str(), 0, 0, MAX_PLAYER_NAME); | ||
} | ||
return 0; | ||
} | ||
|
||
AMX_NATIVE_INFO player_Natives[] = | ||
{ | ||
{ "GetPlayerName", n_GetPlayerName }, | ||
{ NULL, NULL } | ||
}; | ||
|
||
int amx_playerInit(AMX *amx) | ||
{ | ||
return amx_Register(amx, player_Natives, -1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "main.hpp" | ||
#include "format.hpp" | ||
|
||
AMX_NATIVE_INFO util_Natives[] = | ||
{ | ||
{ "format", n_format }, | ||
{ NULL, NULL } | ||
}; | ||
|
||
int amx_utilInit(AMX *amx) | ||
{ | ||
return amx_Register(amx, util_Natives, -1); | ||
} |