SASA 扩展SAMPFUNCS
玩家 SampPlayer
远程玩家状态、数据与 NPC
sa · 扩展 SAMPFUNCS · 仅 SA-MP;需 SAMPFUNCS
共 19 条。远程玩家句柄 / 血甲 / 昵称 / 同步缓冲。调用见 Lua / Redux。
句柄 / 连接
SAMP_GET_PLAYER_CHAR_BY_ID · 0B20
SampPlayer.GetChar
按玩家 ID 返回角色句柄;不在流送区则返回 -1。
0B20 SAMP_GET_PLAYER_CHAR_BY_ID
in: self
out: handleSAMP_IS_REMOTE_PLAYER_CONNECTED · 0B23
SampPlayer.IsRemotelyConnected
若指定 ID 的远程玩家已连接则为真。
0B23 SAMP_IS_REMOTE_PLAYER_CONNECTED
in: selfSAMP_GET_PLAYER_POINTER · 0B24
SampPlayer.GetPtr
返回该玩家的 SA-MP 结构体指针;未连接则返回 0。
0B24 SAMP_GET_PLAYER_POINTER
in: self
out: address状态
SAMP_GET_PLAYER_HEALTH · 0B25
SampPlayer.GetHealth
返回指定玩家的生命值。
0B25 SAMP_GET_PLAYER_HEALTH
in: self
out: healthSAMP_GET_PLAYER_ARMOR · 0B26
SampPlayer.GetArmor
返回指定玩家的护甲值。
0B26 SAMP_GET_PLAYER_ARMOR
in: self
out: armorSAMP_GET_PLAYER_PING · 0B2A
SampPlayer.GetPing
返回指定玩家的 ping。
0B2A SAMP_GET_PLAYER_PING
in: self
out: pingSAMP_GET_STREAMED_OUT_PLAYER_COORDS · 0B2F
SampPlayer.GetStreamedOutCoords
若服务器允许,返回流送区外玩家的三维坐标。
0B2F SAMP_GET_STREAMED_OUT_PLAYER_COORDS
in: self
out: x, y, zSAMP_GET_PLAYER_NICKNAME · 0B36
SampPlayer.GetName
返回指定玩家昵称的指针。
0B36 SAMP_GET_PLAYER_NICKNAME
in: self
out: nicknameSAMP_GET_PLAYER_COLOR · 0B37
SampPlayer.GetColor
以 0xAARRGGBB 格式返回指定玩家颜色。
0B37 SAMP_GET_PLAYER_COLOR
in: self
out: colorSAMP_GET_PLAYER_ANIMATION · 0B57
SampPlayer.GetAnim
返回指定玩家当前播放动画的 SA-MP ID。
0B57 SAMP_GET_PLAYER_ANIMATION
in: self
out: animIdSAMP_IS_PLAYER_PAUSED · 0B5C
SampPlayer.IsPaused
若指定玩家处于暂停/AFK 则为真。
0B5C SAMP_IS_PLAYER_PAUSED
in: selfSAMP_GET_PLAYER_SPECIAL_ACTION · 0B62
SampPlayer.GetSpecialAction
返回指定玩家的特殊动作 ID。
0B62 SAMP_GET_PLAYER_SPECIAL_ACTION
in: self
out: specialActionIdSAMP_IS_PLAYER_NPC · 0B64
SampPlayer.IsNpc
检查指定玩家是否为 NPC。
0B64 SAMP_IS_PLAYER_NPC
in: selfSAMP_GET_PLAYER_SCORE · 0B65
SampPlayer.GetScore
返回指定玩家当前分数。
0B65 SAMP_GET_PLAYER_SCORE
in: self
out: score同步缓冲
SAMP_STORE_PLAYER_ONFOOT_DATA · 0BBA
SampPlayer.StoreOnFootData
把该玩家当前 onFootData 结构写入 buffer。
0BBA SAMP_STORE_PLAYER_ONFOOT_DATA
in: self
out: bufferSAMP_STORE_PLAYER_DRIVING_DATA · 0BBB
SampPlayer.StoreDrivingData
把该玩家当前 inCarData 结构写入 buffer。
0BBB SAMP_STORE_PLAYER_DRIVING_DATA
in: self
out: bufferSAMP_STORE_PLAYER_PASSENGER_DATA · 0BBC
SampPlayer.StorePassengerData
把该玩家当前 passengerData 结构写入 buffer。
0BBC SAMP_STORE_PLAYER_PASSENGER_DATA
in: self
out: bufferSAMP_STORE_PLAYER_TRAILER_DATA · 0BBD
SampPlayer.StoreTrailerData
把该玩家当前 trailerData 结构写入 buffer。
0BBD SAMP_STORE_PLAYER_TRAILER_DATA
in: self
out: bufferSAMP_STORE_PLAYER_AIM_DATA · 0BBE
SampPlayer.StoreAimData
把指定玩家 aimData 结构写入 buffer。
0BBE SAMP_STORE_PLAYER_AIM_DATA
in: self
out: buffer