PIPICHE Posted March 21, 2012 Share Posted March 21, 2012 (edited) Good morning.I use a LUA script to make the protection of tag and other uses (custom sounds, ect).This script is based on the level of player. but it appears that the guid is different depending on silent because this script runs on NQ but not on the Silent.I put the main lines.Thank you for telling me that do not agree.Thank you in advance function Player.Connect(Slot) local player = {} --setmetatable(player,Player) player.Slot=Slot player.Country=et.gentity_get(Slot, "sess.uci") player.ProfileName = et.Info_ValueForKey(et.trap_GetUserinfo(Slot), "name") player.Name="" --Sera renseigne apres player.Password = et.Info_ValueForKey(et.trap_GetUserinfo(Slot), "password") player.IP = et.Info_ValueForKey( et.trap_GetUserinfo(Slot ), "ip" ) player.GUID = et.Info_ValueForKey( et.trap_GetUserinfo(Slot ), "cl_guid" ) player.Team =et.gentity_get(Slot, "sess.sessionTeam") player.Level = et.G_shrubbot_level( Slot ) player.ConnectTime=os.time() player.EnterTime=os.time() player.TagViolation=false player.Alias={} --Enleve le port player.IP=string.match(player.IP,"(.*)%:") return player end function Player.IsSame(ancien) --Recupere le GUID actuel local guid=et.Info_ValueForKey( et.trap_GetUserinfo(ancien.Slot ), "cl_guid" ) -- Joueur different ou absent if guid ~= ancien.GUID then return false end return true; end Edited March 21, 2012 by PIPICHE Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted March 21, 2012 Management Share Posted March 21, 2012 Untested but I would think changing "cl_guid" fields into "sil_guid" might make it work. The cl_guid should work also for those players that have the PunkBuster enabled in the client side. Quote Link to comment Share on other sites More sharing options...
PIPICHE Posted March 21, 2012 Author Share Posted March 21, 2012 HiI thank you for your quick response.unfortunately this is not the right solution.I myself try for testing by enabling punkbuster on my side but there is nothing and if I put the variable that you ask me to change it does not work more.I am taking other ideas!thank you Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted March 21, 2012 Management Share Posted March 21, 2012 Maybe you could post the whole script for a look. One thing that comes to mind is that the mod has not yet determined the level of the player when the Connect is called. Because of the silent guid, the players are attached to the database records little later then they were before. Quote Link to comment Share on other sites More sharing options...
Sol Posted March 21, 2012 Share Posted March 21, 2012 Like gao said, changing "cl_guid" fields into "sil_guid" is the best solution, and It's your best and simplest solution. Quote Link to comment Share on other sites More sharing options...
PIPICHE Posted March 29, 2012 Author Share Posted March 29, 2012 (edited) Hello I joined more information about my script.I changed what you told me in cl_guid sil_guid but it did not work either function Player.Connect(Slot) local player = {} --setmetatable(player,Player) player.Slot=Slot player.Country=et.gentity_get(Slot, "sess.uci") player.ProfileName = et.Info_ValueForKey(et.trap_GetUserinfo(Slot), "name") player.Name="" --Sera renseigne apres player.Password = et.Info_ValueForKey(et.trap_GetUserinfo(Slot), "password") player.IP = et.Info_ValueForKey( et.trap_GetUserinfo(Slot ), "ip" ) player.GUID = et.Info_ValueForKey( et.trap_GetUserinfo(Slot ), "cl_guid" ) player.Team =et.gentity_get(Slot, "sess.sessionTeam") player.Level = et.G_shrubbot_level( Slot ) player.ConnectTime=os.time() player.EnterTime=os.time() player.TagViolation=false player.Alias={} --Enleve le port player.IP=string.match(player.IP,"(.*)%:") return player end function Player.IsSame(ancien) --Recupere le GUID actuel local guid=et.Info_ValueForKey( et.trap_GetUserinfo(ancien.Slot ), "cl_guid" ) StartLevelOfTagProtection=3 if isNewName then -- Protection tag Team local wocolor=string.lower(et.Q_CleanStr(name)) -- Interception de certains nom de joueurs qui resistent aux bans (non ip fixe) if wocolor=="demonen" then et.trap_DropClient( cno, "Your IP isn't valid!", 180 ) end --interception team NDK local res=string.match(wocolor,"^ndk ") if res~=nil then et.trap_DropClient( cno, "Team Banned.", 180 ) end res=string.match(wocolor,"^%*ndk%*") if res~=nil then et.trap_DropClient( cno, "Team Banned.", 180 ) end res=string.match(wocolor,"(m)([^a-z]?)(t)(.?)(c)") if res~=nil then if Players[cno].Level<StartLevelOfTagProtection then Players[cno].TagViolation=true et.trap_SendConsoleCommand(et.EXEC_APPEND, string.format("!rename \"%d ^1<^8TIPIAK^1>\"\n",cno )) et.G_globalSound( "sound/weapons/radio/callArty_axis.wav") end end -- Protection tag BOT res=string.match(wocolor,"(%[bot%])") if res~=nil then if Players[cno].Level<StartLevelOfTagProtection then et.trap_SendConsoleCommand(et.EXEC_APPEND, string.format("!rename \"%d %s\"\n",cno,Players[cno].Alias[1] )) et.G_globalSound( "sound/weapons/radio/callArty_axis.wav") end end end My script makes sure that if a person does not have the level 3 if he puts his name to our "tag" I renamed it to "Tipiak"it works on the NQ not Silent.even worse with me a superadmin level 7 if I put on a private slot I renamed "Tipiak" but if I go with a level 0 on a normal slot nothing happens?I confess that I understand anything can you help me? Edited March 29, 2012 by PIPICHE Quote Link to comment Share on other sites More sharing options...
PIPICHE Posted April 2, 2012 Author Share Posted April 2, 2012 Hello I joined more information about my script.I changed what you told me in cl_guid sil_guid but it did not work either function Player.Connect(Slot) local player = {} --setmetatable(player,Player) player.Slot=Slot player.Country=et.gentity_get(Slot, "sess.uci") player.ProfileName = et.Info_ValueForKey(et.trap_GetUserinfo(Slot), "name") player.Name="" --Sera renseigne apres player.Password = et.Info_ValueForKey(et.trap_GetUserinfo(Slot), "password") player.IP = et.Info_ValueForKey( et.trap_GetUserinfo(Slot ), "ip" ) player.GUID = et.Info_ValueForKey( et.trap_GetUserinfo(Slot ), "cl_guid" ) player.Team =et.gentity_get(Slot, "sess.sessionTeam") player.Level = et.G_shrubbot_level( Slot ) player.ConnectTime=os.time() player.EnterTime=os.time() player.TagViolation=false player.Alias={} --Enleve le port player.IP=string.match(player.IP,"(.*)%:") return player end function Player.IsSame(ancien) --Recupere le GUID actuel local guid=et.Info_ValueForKey( et.trap_GetUserinfo(ancien.Slot ), "cl_guid" ) StartLevelOfTagProtection=3 if isNewName then -- Protection tag Team local wocolor=string.lower(et.Q_CleanStr(name)) -- Interception de certains nom de joueurs qui resistent aux bans (non ip fixe) if wocolor=="demonen" then et.trap_DropClient( cno, "Your IP isn't valid!", 180 ) end --interception team NDK local res=string.match(wocolor,"^ndk ") if res~=nil then et.trap_DropClient( cno, "Team Banned.", 180 ) end res=string.match(wocolor,"^%*ndk%*") if res~=nil then et.trap_DropClient( cno, "Team Banned.", 180 ) end res=string.match(wocolor,"(m)([^a-z]?)(t)(.?)(c)") if res~=nil then if Players[cno].Level<StartLevelOfTagProtection then Players[cno].TagViolation=true et.trap_SendConsoleCommand(et.EXEC_APPEND, string.format("!rename \"%d ^1<^8TIPIAK^1>\"\n",cno )) et.G_globalSound( "sound/weapons/radio/callArty_axis.wav") end end -- Protection tag BOT res=string.match(wocolor,"(%[bot%])") if res~=nil then if Players[cno].Level<StartLevelOfTagProtection then et.trap_SendConsoleCommand(et.EXEC_APPEND, string.format("!rename \"%d %s\"\n",cno,Players[cno].Alias[1] )) et.G_globalSound( "sound/weapons/radio/callArty_axis.wav") end end end My script makes sure that if a person does not have the level 3 if he puts his name to our "tag" I renamed it to "Tipiak"it works on the NQ not Silent.even worse with me a superadmin level 7 if I put on a private slot I renamed "Tipiak" but if I go with a level 0 on a normal slot nothing happens?I confess that I understand anything can you help me? Hello I joined more information about my script.I changed what you told me in cl_guid sil_guid but it did not work either function Player.Connect(Slot) local player = {} --setmetatable(player,Player) player.Slot=Slot player.Country=et.gentity_get(Slot, "sess.uci") player.ProfileName = et.Info_ValueForKey(et.trap_GetUserinfo(Slot), "name") player.Name="" --Sera renseigne apres player.Password = et.Info_ValueForKey(et.trap_GetUserinfo(Slot), "password") player.IP = et.Info_ValueForKey( et.trap_GetUserinfo(Slot ), "ip" ) player.GUID = et.Info_ValueForKey( et.trap_GetUserinfo(Slot ), "cl_guid" ) player.Team =et.gentity_get(Slot, "sess.sessionTeam") player.Level = et.G_shrubbot_level( Slot ) player.ConnectTime=os.time() player.EnterTime=os.time() player.TagViolation=false player.Alias={} --Enleve le port player.IP=string.match(player.IP,"(.*)%:") return player end function Player.IsSame(ancien) --Recupere le GUID actuel local guid=et.Info_ValueForKey( et.trap_GetUserinfo(ancien.Slot ), "cl_guid" ) StartLevelOfTagProtection=3 if isNewName then -- Protection tag Team local wocolor=string.lower(et.Q_CleanStr(name)) -- Interception de certains nom de joueurs qui resistent aux bans (non ip fixe) if wocolor=="demonen" then et.trap_DropClient( cno, "Your IP isn't valid!", 180 ) end --interception team NDK local res=string.match(wocolor,"^ndk ") if res~=nil then et.trap_DropClient( cno, "Team Banned.", 180 ) end res=string.match(wocolor,"^%*ndk%*") if res~=nil then et.trap_DropClient( cno, "Team Banned.", 180 ) end res=string.match(wocolor,"(m)([^a-z]?)(t)(.?)(c)") if res~=nil then if Players[cno].Level<StartLevelOfTagProtection then Players[cno].TagViolation=true et.trap_SendConsoleCommand(et.EXEC_APPEND, string.format("!rename \"%d ^1<^8TIPIAK^1>\"\n",cno )) et.G_globalSound( "sound/weapons/radio/callArty_axis.wav") end end -- Protection tag BOT res=string.match(wocolor,"(%[bot%])") if res~=nil then if Players[cno].Level<StartLevelOfTagProtection then et.trap_SendConsoleCommand(et.EXEC_APPEND, string.format("!rename \"%d %s\"\n",cno,Players[cno].Alias[1] )) et.G_globalSound( "sound/weapons/radio/callArty_axis.wav") end end end My script makes sure that if a person does not have the level 3 if he puts his name to our "tag" I renamed it to "Tipiak"it works on the NQ not Silent.even worse with me a superadmin level 7 if I put on a private slot I renamed "Tipiak" but if I go with a level 0 on a normal slot nothing happens?I confess that I understand anything can you help me? Even this simple command does not return the correct information.It returns well my number slot but not my level! Tools.PrintToConsoleClient(cno,string.format("\031 ^x[DEBUG INFO.]Level #%d",Players[cno].Level)) Tools.PrintToConsoleClient(cno,string.format("\031 ^x[DEBUG INFO.]Slot #%d",Players[cno].Slot)) Quote Link to comment Share on other sites More sharing options...
Sol Posted April 2, 2012 Share Posted April 2, 2012 (edited) Even this simple command does not return the correct information.It returns well my number slot but not my level! Players[cno].LevelI don't see Players declaration, could you show all the code? Edited April 2, 2012 by Sol Quote Link to comment Share on other sites More sharing options...
Purple Posted September 12, 2014 Share Posted September 12, 2014 I really hate to bump this, but i've had this problem before, here is a simple fix that i use. local sguid = string.sub(string.upper(et.Info_ValueForKey( et.trap_GetUserinfo( client ), "sil_guid" )), 1, 32) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.