Results 1 to 6 of 6
  1. #1
    Spamming the boards! Jemstar's Avatar
    Join Date
    Apr 2011
    Replies
    173
    Country
    Australia
    Xfire
    jemxs
    Steam
    http://steamcommunity.com/profiles/76561198053307056/
    Clan
    |*BS*|BloodSquadClan

    Help with a lua script!

    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.

  2. #2
    Spamming the boards! testforecho's Avatar
    Join Date
    Oct 2011
    Replies
    103
    I don't think you can force a client to do pb_cl_enable, and anyway it would disconnect them from the server when they do it

    you typed 'unkown' instead of 'unknown', I didn't spot it at first, maybe that? :p

  3. #3
    Spamming the boards! Jemstar's Avatar
    Join Date
    Apr 2011
    Replies
    173
    Country
    Australia
    Xfire
    jemxs
    Steam
    http://steamcommunity.com/profiles/76561198053307056/
    Clan
    |*BS*|BloodSquadClan
    Quote Originally Posted by testforecho View Post
    you typed 'unkown' instead of 'unknown', I didn't spot it at first, maybe that? :p
    LOLOL I did too, I should stop editing stuff when I drunk and with no sleep. The number of times I looked at that and didnt see my typo!!

    Thanks for pointing that out...fresh eyes FTW. Will see how it goes!!

    BTW yep it did disconnect me with that additional script LOL. Was just an idea!!

    Thanks again for your help, will see if it works now!!

    Jem.

  4. #4
    Spamming the boards! Jemstar's Avatar
    Join Date
    Apr 2011
    Replies
    173
    Country
    Australia
    Xfire
    jemxs
    Steam
    http://steamcommunity.com/profiles/76561198053307056/
    Clan
    |*BS*|BloodSquadClan
    Yep works a treat, so besides the typo the original edit was fine!!

    Dam me and my dyslexai!!! jk

  5. #5
    Spamming the boards! testforecho's Avatar
    Join Date
    Oct 2011
    Replies
    103
    Quote Originally Posted by Jemstar View Post
    Yep works a treat, so besides the typo the original edit was fine!!
    good

    Quote Originally Posted by Jemstar View Post
    Dam me and my dyslexai!!! jk
    well, it took me a while to find out as well :p
    I had even tested it, and I even added a debug function to print the guid,

    Code:
    function print_debug( text )
    	et.trap_SendConsoleCommand(et.EXEC_APPEND, "qsay \""  .. text .. "\"\n")
    end
    when I realized it was just a typo...

    btw I never got the 'NO_GUID' text (I've tested it with an etkey but pb disabled, and I got 'unknown'), when is that 'NO_GUID' supposed to happen, just curious

  6. #6
    Spamming the boards! Jemstar's Avatar
    Join Date
    Apr 2011
    Replies
    173
    Country
    Australia
    Xfire
    jemxs
    Steam
    http://steamcommunity.com/profiles/76561198053307056/
    Clan
    |*BS*|BloodSquadClan
    on our server it seems to be after /pb_cl_enable is typed in console (if there is no key ofc). The shrubb was filling up with admin levels for players with guid "NO_GUID" and a few "unknown" so was deleting them nightly after saving as lvl 0!! but since typo fixed all is good..so thanks for your fresh eyes hehe.
    Last edited by Jemstar; 20-06-2012 at 10:45.

Posting Permissions