更新世界通过cid获取用户的方法
This commit is contained in:
@@ -26,13 +26,13 @@ class World {
|
||||
else
|
||||
return null;
|
||||
}
|
||||
//更具CID获取玩家
|
||||
// 根据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;
|
||||
local PlayerList = GetOnlinePlayer();
|
||||
foreach(Player in PlayerList) {
|
||||
if (Player.GetCID() == Cid) return Player;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
// 根据名字获取玩家
|
||||
function GetUserByName(Name) {
|
||||
|
||||
Reference in New Issue
Block a user