Jemstar
13-06-2012, 10:04
Hi,
Need some help with a lua for autosetlevel written by "Perlo_0ung?!" for N!tmod
it works fine on NQ except for thew noguid function, Here is what it was:
function noGuid(playerID)
local userinfo = et.trap_GetUserinfo( playerID )
local guid = et.Info_ValueForKey( userinfo, "cl_guid" )
if guid == "unkown" then
The issue is NQ uses "NO_GUID" so I changed it to:
function noGuid(playerID)
local userinfo = et.trap_GetUserinfo( playerID )
local guid = et.Info_ValueForKey( userinfo, "cl_guid" )
if guid == "NO_GUID" then
It works well except that some players remain as "unkown" unless they do the /pb_cl_enable command. So I added:
function noGuid(playerID)
local userinfo = et.trap_GetUserinfo( playerID )
local guid = et.Info_ValueForKey( userinfo, "cl_guid" )
if guid == "NO_GUID" then
return true
elseif guid == "unkown" then
return true
end
end
It still blocks "NO_GUID" how ever "unkown" still gets promoted!!
Any suggestions?
Was thinking about loading a lua to get the client to send a server command thru:
function et_ClientBegin( _clientNum )
et.trap_SendConsoleCommand(et.EXEC_NOW, "csay " .. _clientNum .. "\"/pb_cl_enable"\n")
end
Im new at writting (my first attempt - well second first was way tooooo ambitious!) can edit ok tho, is this something that would work? Or am I way off the mark!!(probably).
Or is it possible to get the original edit to work for both "NO_GUID" and "unkown"?
Any advice is very appreciated,
Jem.
Need some help with a lua for autosetlevel written by "Perlo_0ung?!" for N!tmod
it works fine on NQ except for thew noguid function, Here is what it was:
function noGuid(playerID)
local userinfo = et.trap_GetUserinfo( playerID )
local guid = et.Info_ValueForKey( userinfo, "cl_guid" )
if guid == "unkown" then
The issue is NQ uses "NO_GUID" so I changed it to:
function noGuid(playerID)
local userinfo = et.trap_GetUserinfo( playerID )
local guid = et.Info_ValueForKey( userinfo, "cl_guid" )
if guid == "NO_GUID" then
It works well except that some players remain as "unkown" unless they do the /pb_cl_enable command. So I added:
function noGuid(playerID)
local userinfo = et.trap_GetUserinfo( playerID )
local guid = et.Info_ValueForKey( userinfo, "cl_guid" )
if guid == "NO_GUID" then
return true
elseif guid == "unkown" then
return true
end
end
It still blocks "NO_GUID" how ever "unkown" still gets promoted!!
Any suggestions?
Was thinking about loading a lua to get the client to send a server command thru:
function et_ClientBegin( _clientNum )
et.trap_SendConsoleCommand(et.EXEC_NOW, "csay " .. _clientNum .. "\"/pb_cl_enable"\n")
end
Im new at writting (my first attempt - well second first was way tooooo ambitious!) can edit ok tho, is this something that would work? Or am I way off the mark!!(probably).
Or is it possible to get the original edit to work for both "NO_GUID" and "unkown"?
Any advice is very appreciated,
Jem.