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:
Code:
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:

Code:
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:

Code:
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:

Code:
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.