Jump to content

PurpleLePro

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by PurpleLePro

  1. So today i was trying to do a few things with lua and just messing around with it but i think something is wrong yet i can't figure it out..

     

    Modname = "asd"
    Version = "asd"
    Author  = "asd"
    
    
    donguids = { 
    "SilentGuid",
    }
    
    
    
    
    function et_InitGame(levelTime,randomSeed,restart)
            maxclients = tonumber( et.trap_Cvar_Get( "sv_maxClients" ) )
            et.RegisterModname(Modname .. " by "..Author.." " .. Version)
                           
    end
     
    
    function et_ClientCommand(client, command)
    	local sguid = et.gentity_get(client, "sess.guid")
    	local cmd = string.lower(command)
    	
    	if sguid == table.getn(donguids) then
    		if cmd == "don1" then
    			et.trap_SendServerCommand(client, "print \"You are a donator! \n")
    		end
    	else
    		et.trap_SendServerCommand(client, "print \"^1You are not a Donator, Donate to the server to use these commands! \n")
    	end
    

     

    What im trying to do is to check the users Silent Guid(silentID) then check if there ID is is the donguids table then if so allow them to use the command, if not tell them you are not a donator. But each time i try it out it just auto prints outs

    et.trap_SendServerCommand(client, "print \"^1You are not a Donator, Donate to the server to use these commands! \n")
    

     

    Does anyone have any ideas or suggestions? Would appreciate it thanks c;

×
×
  • Create New...