更新了通过cid获取用户的方法

This commit is contained in:
lenheart 2025-12-16 21:00:16 +08:00
parent 3bcc8e5323
commit 4b7b4672a4
2 changed files with 8 additions and 4 deletions

View File

@ -268,9 +268,5 @@ Gm_InputFunc_Handle["test"] <- function(SUser, CmdString) {
Timer.SetTimeOut(function ()
{
}, 1);

View File

@ -26,6 +26,14 @@ class World {
else
return null;
}
//更具CID获取玩家
function GetUserByCid(Cid) {
local CUser = Sq_CallFunc(S_Ptr("0x86C4D40"), "pointer", ["pointer", "int"], Sq_Get_GameWorld(), Cid);
if (CUser)
return User(CUser);
else
return null;
}
// 根据名字获取玩家
function GetUserByName(Name) {
local CUser = Sq_GameWorld_GetUserByName(Sq_Get_GameWorld(), Name);