更新了通过cid获取用户的方法
This commit is contained in:
parent
3bcc8e5323
commit
4b7b4672a4
|
|
@ -268,9 +268,5 @@ Gm_InputFunc_Handle["test"] <- function(SUser, CmdString) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Timer.SetTimeOut(function ()
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
}, 1);
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,14 @@ class World {
|
||||||
else
|
else
|
||||||
return null;
|
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) {
|
function GetUserByName(Name) {
|
||||||
local CUser = Sq_GameWorld_GetUserByName(Sq_Get_GameWorld(), Name);
|
local CUser = Sq_GameWorld_GetUserByName(Sq_Get_GameWorld(), Name);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue