Recent Posts

Pages: [1] 2 3 ... 10
1
Community Servers / The Hundred Acre Bloodbath
« Last post by Edwardevive on Yesterday at 05:12:38 PM »
i could fix it if i had a copy of the script. Can you isolate the flag hud script and email it to me?

[EDIT-JamminR] - This user post access now limited - potential bot, gibberish off-topic text)
2
Developers Corner / Re: Some table management mishaps
« Last post by BlueNova on March 22, 2019, 02:21:16 PM »
The way you are doing this is the 'hard' way.

in this method, it will only match exact strings of words.. so to use your 'cheese' example...

I like cheese   --->> "I like"

But you can get around it easily by cramming words together.

I like cheese.  --->> "I like cheese."

since 'cheese.' != 'cheese'

The way I would do it is reverse.


Instead of making a table of words in your sentence and then checking each against your table of bad words.. why don't you iterate through your table of bad words and check against the entire string of your sentence.


Hadn't thought of that, I'mma try it
3
Developers Corner / Re: Some table management mishaps
« Last post by MrPresident on March 22, 2019, 01:20:17 PM »
The way you are doing this is the 'hard' way.

in this method, it will only match exact strings of words.. so to use your 'cheese' example...

I like cheese   --->> "I like"

But you can get around it easily by cramming words together.

I like cheese.  --->> "I like cheese."

since 'cheese.' != 'cheese'

The way I would do it is reverse.


Instead of making a table of words in your sentence and then checking each against your table of bad words.. why don't you iterate through your table of bad words and check against the entire string of your sentence.
4
Developers Corner / Some table management mishaps
« Last post by BlueNova on March 22, 2019, 12:03:58 PM »
So I've been writing a simple word/slur filter for a plugin I'm making with just custom lua I write as a collection of that sort of thing. And when I got to writing the word/slur/chat filter I found a weird bug.

It seems to only want to filter a set amount. For example if I have it filter out the word "cheese" then if I type cheese once it'll filter it out fine, if I do it again it'll work but if I type cheese 3 or more times it won't grab all of them, only the first two instances, it's weird.

Here's the logic behind it.

Code: Lua
  1. local message = string.Split(text, " ") --Text comes from a PlayerSay hook
  2.  
  3. for _, word in pairs(message) do
  4.    local prev_word = word
  5.    word = string.gsub(word, "[%p]", "")
  6.  
  7.    if badWords[string.lower(word)] then
  8.       table.insert(message, getIndex(message, prev_word), cleanWords[math.random(#cleanWords)])
  9.       table.remove(message, getIndex(message, prev_word))
  10.    end
  11. end

Thinking I was missing something that a second pair of eyes could point me towards, if you need more just let me know.
Thanks
5
General Chat & Help and Support / Re: Assistance with a rank
« Last post by JamminR on March 21, 2019, 06:52:06 PM »
Not really.
"superadmin" is a Gmod constraint. Highest level of access in Garry's mod - we only use it to add highest ULX features/functions.
If you were to try to remove/rename it, you break Gmod and any other Gmod code that expect superadmin as highest level control.

6
General Chat & Help and Support / Assistance with a rank
« Last post by ripjaw567 on March 21, 2019, 02:41:24 PM »
This sub-forum is only for help or discussion regarding projects created by Team Ulysses. If you are requesting help, please search the forums FIRST to make sure your question has not already been answered. If you still need help, fill in the following information.

My ULib/ULX versions (run "ulx version" in console):
ULib v2.63d
ULX v3.73w

Game mode(s) I am having this problem on: DarkRP (Not problem but question/support thing)

Is their a way to change the group considered "superadmin" without everything up?

7
Developers Corner / Re: Am I missing something?
« Last post by Timmy on March 08, 2019, 01:37:35 AM »
...everytime I use [the command] in-game no one has access to it, not even me and doesn't appear in the ULX menu so missing something else.

The first time ULib’s Access Control List (UCL) is informed about the existence of a command, it will give the groups specified in cmd:defaultAccess access. After that, never again!

Sure, you corrected nodeath:defaultaccess( ULib.ACCESS_ADMIN ) to nodeath:defaultAccess( ULib.ACCESS_ADMIN ) later. But UCL already knew about the command, so default access was ignored.

Solution - Manually add to a group's access
Code: [Select]
ulx groupallow admin "ulx nodeath"
8
Developers Corner / Re: Am I missing something?
« Last post by BlueNova on March 07, 2019, 11:25:05 PM »
Third time lucky, I'm a Junior Dev so this is all new to me.

--snip long code piece--

Works but just need to add in usergroups I think, everytime I use it in-game no one has access to it, not even me and doesn't appear in the ULX menu so missing something else. Tried adding it into fun.lua then onto the server, nodeath.lua and using CATEGORY_NAME = "Nodeath" but nothing again.

Thinking it's something with category name here:
Code: Lua
  1. local nodeath = ulx.command( "CATEGORY_NAME", "ulx nodeath", ulx.nodeath, "!nodeath", true )
but might be wrong.

You're trying to pass CATEGORY_NAME as a string when it's usually a variable. At the top of every ULX command file it'll have like
Code: Lua
  1. local CATEGORY_NAME = "some name here"

So just take the quotes off of category name.
As for access for the command you could do

Code: Lua
  1. nodeath:defaultAccess(ULib.ACCESS_ADMIN) --Access default to admin only

Alternatively you could just specifiy in your code specific access like
Code: Lua
  1. if not calling_ply:IsAdmin() then return end

In regards to the health thing that JamminR brought up, you are making it search for exactly 5. You could make it look for less than six but you could also do
Code: Lua
  1. ply:Health() =< 5

Just some speculation on my part
9
Off-Topic / Re: UE4 Project
« Last post by MrPresident on March 07, 2019, 09:10:47 PM »
Yes, and no.

I've been working a lot more lately (Substitute Teaching) which is why I haven't been making as regular of updates, but the main reason is that the things I'm doing aren't really ready to be shown off yet.

Here are some examples:

Working on some new building tiles for overwork houses (learning blender along the way)


Working on more advanced AI for NPCs.
http://g4p.org/uploads/knTh2pv1ot.webm

Been working on getting some animals added:


Toying around with bows and bow animations:
http://g4p.org/uploads/6ye0wU4mCF.webm

NPC Dialogue:


Farming.. which is nearly complete (or at least the shell of it is)


Lots of other small things that I can't remember.
Maybe this weekend I'll push an update that you guys can look at, it's just there really isn't any more content yet.. just working on some systems.
10
Off-Topic / Re: UE4 Project
« Last post by JamminR on March 07, 2019, 08:02:39 PM »
I've not noticed any updates in a while... real life getting in the way?
(even if so, hope the real's is good stuffs and not bad)
Pages: [1] 2 3 ... 10