mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 11:43:04 +08:00
[server] Implement and match n_gpci(...)
This commit is contained in:
@@ -54,6 +54,11 @@ public:
|
||||
return m_bPlayerSlotState[playerId];
|
||||
};
|
||||
|
||||
PCHAR GetPlayerClientID(PLAYERID playerId) {
|
||||
if(playerId >= MAX_PLAYERS) { return NULL; }
|
||||
return m_szPlayerClientID[playerId];
|
||||
};
|
||||
|
||||
void ResetPlayerScoresAndMoney() {
|
||||
memset(&m_iPlayerScore[0],0,sizeof(int) * MAX_PLAYERS);
|
||||
memset(&m_iPlayerMoney[0],0,sizeof(int) * MAX_PLAYERS);
|
||||
|
||||
@@ -3,10 +3,17 @@
|
||||
|
||||
#define CHECK_PARAMS(n)
|
||||
|
||||
int set_amxstring(AMX *amx,cell amx_addr,const char *source,int max);
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// native gpci(playerid, const clientid[], len)
|
||||
static cell AMX_NATIVE_CALL n_gpci(AMX *amx, cell *params)
|
||||
{
|
||||
// TODO: gpci
|
||||
return 0;
|
||||
PLAYERID playerId = (PLAYERID)params[1];
|
||||
if (playerId >= MAX_PLAYERS || !pNetGame->GetPlayerPool()->GetSlotState(playerId)) return 0;
|
||||
return set_amxstring(amx, params[2], pNetGame->GetPlayerPool()->
|
||||
GetPlayerClientID(playerId), params[3]);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user