mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-23 06:57:31 +08:00
[server] Implement and match n_gpci(...)
This commit is contained in:
parent
362480c54e
commit
ea1a2cb2b3
@ -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]);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user