[QUOTE=qTY3;47150282]That also happens to us XD
We havent banned much people though so its not a huge problem for us :p[/QUOTE]
it's not a huge issue, we banned one person and he kept joining, so i decided to try and ask around on how to fix it before it becomes a real issue
[QUOTE='[pG]Jailbreak;47150334']it's not a huge issue, we banned one person and he kept joining, so i decided to try and ask around on how to fix it before it becomes a real issue[/QUOTE]
Haha that guys a regular on my server XD
(if youre talking about the guy who you screenshotted)
[QUOTE='[pG]Jailbreak;47150247']hey grav im having an issue with banned players being able to spam chat with their ban reason and being disconnected after joining how would i go about fixing this?
[url]http://facepunch.com/showthread.php?t=1451274&p=47141100#post47141100[/url][/QUOTE]
Holy fuck you made a thread in the Development section for that...?
C'mon guys, put your brain to use.
Try following my line of thought here.
1. I'm getting a message that I don't want. Let's see what message it is (core_lang.lua)
2. Seems it's identified with "Connect", let's have a look where this is printed. Oh, how logical, Player:Load( ply )!
3. Let's see, I don't want this to show if they're banned, so I'll have to remove it fully on this place, and only print it after I know they're banned.
So we change that part from
[code]
if ply:IsBot() then
Core:Broadcast( "Print", { "General", Lang:Get( "BotEnter", { Bot.Recent and "The " .. Core:StyleName( Bot.Recent ) .. "" or "A multi" } ) } )
else
Core:Broadcast( "Print", { "General", Lang:Get( "Connect", { ply:Name(), ply:SteamID() } ) } )
end
[/code]
to
[code]
if ply:IsBot() then
Core:Broadcast( "Print", { "General", Lang:Get( "BotEnter", { Bot.Recent and "The " .. Core:StyleName( Bot.Recent ) .. "" or "A multi" } ) } )
end
[/code]
4. Let's find where we check if the player is banned. Ctrl + F in files and oh, Admin:CheckBan( ply ), who'd have expected to find that here.
5. We'll have to add the removed line back to where we know they're not banned. When they're not banned, Admin:CheckVIP( ply ) is called straight after, so we could easily put
[code]
Core:Broadcast( "Print", { "General", Lang:Get( "Connect", { ply:Name(), ply:SteamID() } ) } )
[/code]
at the top of that function!
6. Now for disconnecting, hmm. Let's find the string in core_lang.lua again and search for it!
7. We only want the message to display if their DCReason is Banned permanently, so let's add a simply IF check to it!
Function PlayerDisconnect:
[code]
if not ply.DCReason or (ply.DCReason and ply.DCReason != "Banned permanently") then
Core:Broadcast( "Print", { "General", Lang:Get( "Disconnect", { ply:Name(), ply:SteamID(), ply.DCReason or "Player left" } ) } )
end
[/code]
That should do it. I updated it in the main release so on the next version it should be in by default.
Also, you have autistic players on your server if they spam the chat with rejoins.
Sorry for the nature of this post, but I hope you can imagine you're putting me in a bad light here as well. I'm trying to create a new brand of innovative developers rather than unworthy people who don't even know how to objectively look at code.
I have looked everywhere about my problem and cant seem to fix it, but I am quite an idiot so Im just going to have my dev look at it later...
But we all appreciate this release, its great, and I havent had much problems... well I have had quite a few but those are all my fault :^)
[QUOTE=qTY3;47150434]I have looked everywhere about my problem and cant seem to fix it, but I am quite an idiot so Im just going to have my dev look at it later...
But we all appreciate this release, its great, and I havent had much problems... well I have had quite a few but those are all my fault :^)[/QUOTE]
Glad I was able to fix it for you now!
---
In the next update we'll also have the GUI version of server hop available as a snippet in "Lua Snippets" called GUIServerHop.lua!
[QUOTE=Gravious;47150053]That should be the clientside caching. I think I explained somewhere, possibly in a video, but if you've deleted them, all you have to do is go to "garrysmod/data/bhop/settings.txt" and increment the number by 1. Your client should notice the server is now running on a different version of the map list, and it'll update the local one.[/QUOTE]
All I see in the settings.txt is the number 2, Should I increase this to the amount of maps currently avalible on my server? I am using linux by the way. I noticed you mentioned something about it. I have allowed the server to read and write on the data folder.
[editline]16th February 2015[/editline]
Nevermind, I tried it and it did work! Thanks :)
Server I'm hosting is GmodBhops (I said I would make one, I did it for a friend c:)
[QUOTE=Dreeeaam;47151068]All I see in the settings.txt is the number 2, Should I increase this to the amount of maps currently avalible on my server? I am using linux by the way. I noticed you mentioned something about it. I have allowed the server to read and write on the data folder.
[editline]16th February 2015[/editline]
Nevermind, I tried it and it did work! Thanks :)
Server I'm hosting is GmodBhops (I said I would make one, I did it for a friend c:)[/QUOTE]
Just increasing it by 1 will work. Not the amount of maps. Even if you change the map multiplier of one map, it will increment by 1 updating the versions for everyone.
Linux is especially tricky when you're running Ubuntu. For me, I had to make sure the server could access everything. The sv.db file wasn't writable for some reason and it caused me a lot of stress.
If anyone is experiencing the same problems, I can post the script that I wrote to automatically CHMOD all the necessary items.
[QUOTE=Gravious;47153873]Just increasing it by 1 will work. Not the amount of maps. Even if you change the map multiplier of one map, it will increment by 1 updating the versions for everyone.
Linux is especially tricky when you're running Ubuntu. For me, I had to make sure the server could access everything. The sv.db file wasn't writable for some reason and it caused me a lot of stress.
If anyone is experiencing the same problems, I can post the script that I wrote to automatically CHMOD all the necessary items.[/QUOTE]
Could be useful, I get unwanted map on my RTV aswell ^^ Not sure why :L
[QUOTE=Dreeeaam;47167831]Could be useful, I get unwanted map on my RTV aswell ^^ Not sure why :L[/QUOTE]
Simply remove them by "Remove complete map".
You'll only get the maps that have been added to the database, nothing else.
Care to explain on how the mmr detection works? Or give translated variables that I can replace in the script that will make a bit of sense.
[QUOTE=itzaname;47168934]Care to explain on how the mmr detection works? Or give translated variables that I can replace in the script that will make a bit of sense.[/QUOTE]
It's not fool-proof as in you can bypass it if you know what it does. Because of that reason I'd rather not explain it here. If you want I can send you a private message back if you send me one first explaining what and why exactly you want to know.
Struggling to setup the automatic donations, any help? I've got as far as getting my IPN link.
[QUOTE=Dreeeaam;47171618]Struggling to setup the automatic donations, any help? I've got as far as getting my IPN link.[/QUOTE]
You'll have to be a little bit more detailed on that one, Dream.
What exactly isn't working? Where can't you figure out what to do? I've decided to not put up any tutorials for these as I thought that they'd be for server owners only and they usually know what to do, sorry.
[QUOTE=Gravious;47171851]You'll have to be a little bit more detailed on that one, Dream.
What exactly isn't working? Where can't you figure out what to do? I've decided to not put up any tutorials for these as I thought that they'd be for server owners only and they usually know what to do, sorry.[/QUOTE]
So I added the files to my website directory (var/www/html), when I load the page holding "ipn.php", it shows me all the code of that file. I believe I have installed PHP to the server correctly. After I put MySQL details the the area available, I am now receiving the error "_INVALID_". Unsure on why this is happening
[QUOTE=Dreeeaam;47172274]So I added the files to my website directory (var/www/html), when I load the page holding "ipn.php", it shows me all the code of that file. I believe I have installed PHP to the server correctly. After I put MySQL details the the area available, I am now receiving the error "_INVALID_". Unsure on why this is happening[/QUOTE]
It's meant to show that. Nobody except PayPal servers should be opening that file. (Have a look at the top of the PHP file, you'll see it'll die("__INVALID__"); whenever a plain request is being called by a normal webbrowser.
Since I'm a walking information box:
What IPN stands for is Instant Payment Notification, what it does is, whenever PayPal receives a payment and you have IPN on PayPal enabled and set to the URL of your ipn.php script on your site, it will POST to that script with all the data about the payment.
When the user starts a donation, their Steam ID is set on a field called "custom", this field, along with the donation amount is used to give the correct user the correct type of donation reward.
Hopefully that was clear.
[QUOTE=Gravious;47173216]It's meant to show that. Nobody except PayPal servers should be opening that file. (Have a look at the top of the PHP file, you'll see it'll die("__INVALID__"); whenever a plain request is being called by a normal webbrowser.
Since I'm a walking information box:
What IPN stands for is Instant Payment Notification, what it does is, whenever PayPal receives a payment and you have IPN on PayPal enabled and set to the URL of your ipn.php script on your site, it will POST to that script with all the data about the payment.
When the user starts a donation, their Steam ID is set on a field called "custom", this field, along with the donation amount is used to give the correct user the correct type of donation reward.
Hopefully that was clear.[/QUOTE]
"Set the IPN URL to the ipn.php script on the page you've opened."
I was just a bit confused on what this was asking me, hence why I was trying to open the page.
[QUOTE=Dreeeaam;47173324]"Set the IPN URL to the ipn.php script on the page you've opened."
I was just a bit confused on what this was asking me, hence why I was trying to open the page.[/QUOTE]
I don't know about the new PayPal interface but,
this URL: [url]https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-ipn-notify[/url]
Should take you to the correct page.
Then set the URL in [url=http://puu.sh/g48xw/25a111e7dc.png]this field[/url] to your PHP script.
[QUOTE=Gravious;47173437]I don't know about the new PayPal interface but,
this URL: [url]https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-ipn-notify[/url]
Should take you to the correct page.
Then set the URL in [url=http://puu.sh/g48xw/25a111e7dc.png]this field[/url] to your PHP script.[/QUOTE]
Yeah I did that, I am now currently getting this error when I try to go to paypal to make the payment.
"Your purchase couldn't be completed
There's a problem with the merchant's PayPal account. Please try again later."
I'm looking through it and not noticing anything out of place
[QUOTE=Dreeeaam;47173623]Yeah I did that, I am now currently getting this error when I try to go to paypal to make the payment.
"Your purchase couldn't be completed
There's a problem with the merchant's PayPal account. Please try again later."
I'm looking through it and not noticing anything out of place[/QUOTE]
On the pay button HTML code, do you have the right business ID setup?
I don't really know about this as I haven't encountered it yet, so try Google maybe.
[QUOTE=Gravious;47173671]On the pay button HTML code, do you have the right business ID setup?
I don't really know about this as I haven't encountered it yet, so try Google maybe.[/QUOTE]
<input type="image" name="submit" value="Donate using PayPal" alt="Donate using PayPal" src="assets/img/pp_checkout.png"></form>';
This is pretty much the only thing I can find about the button? currently in "index.php"
[editline]19th February 2015[/editline]
Nevermind, I was blind. There was a line with the name="business" and the value had to be my email. Thanks for the help anyway!
[editline]19th February 2015[/editline]
Oh Yeah forgot to mention, the icons for the ticks and crosses on the donation page are not in the assets folder ^^ Add in next update if there is one?
[QUOTE=Dreeeaam;47173741]<input type="image" name="submit" value="Donate using PayPal" alt="Donate using PayPal" src="assets/img/pp_checkout.png"></form>';
This is pretty much the only thing I can find about the button? currently in "index.php"
[editline]19th February 2015[/editline]
Nevermind, I was blind. There was a line with the name="business" and the value had to be my email. Thanks for the help anyway!
[editline]19th February 2015[/editline]
Oh Yeah forgot to mention, the icons for the ticks and crosses on the donation page are not in the assets folder ^^ Add in next update if there is one?[/QUOTE]
Glad it's fixed.
I updated the archive with the images, thanks for letting me know! If you want them early on, click [url=http://puu.sh/g4hq7/1658776818.zip]here[/url].
I just wanted to say how great it is to see so many people working with this mode. And Gravious, you are incredibly generous with the wealth of information you've been supporting us all with. The mode is working amazingly :)
Your code is wonderfully formatted, which is definitely much appreciated. It makes updating and forking the gamemode much easier. Your small code updates are great to see, too, because it involves the one wanting the mode that much more.
It's great to see you doing this like this. Instead of just giving it all away in one .zip file or addon releases. This is flashing me back to the old Modern Warfare 2 days of GSC scripting.
A huge +1 to you, sir. I'll keep watching the thread and working with this mode.
Hello,
I'm interested in converting a Bhop server of mine to the Flow gamemode, however I'd like to add a few more ranks than are included.
Looking at the sv_admin.lua file, located in GarrysModDS\garrysmod\gamemodes\bhop\gamemode\modules, I can see from line 6 to line 87 the different positions and their permissions. However, being rather inexperienced with lua and setting up servers, I'm not 100% sure where to start and how to add new positions, assuming it's even possible. Would somebody be able to help me out?
Thanks in advance.
Edit: Also, for some reason, after changing my own rank, I'm unable to open the admin panel, and simply receive a message: "The command 'admin' is not a valid command". Why would that be?
[QUOTE=ryan722;47180319]Hello,
I'm interested in converting a Bhop server of mine to the Flow gamemode, however I'd like to add a few more ranks than are included.
Looking at the sv_admin.lua file, located in GarrysModDS\garrysmod\gamemodes\bhop\gamemode\modules, I can see from line 6 to line 87 the different positions and their permissions. However, being rather inexperienced with lua and setting up servers, I'm not 100% sure where to start and how to add new positions, assuming it's even possible. Would somebody be able to help me out?
Thanks in advance.
Edit: Also, for some reason, after changing my own rank, I'm unable to open the admin panel, and simply receive a message: "The command 'admin' is not a valid command". Why would that be?[/QUOTE]
Just assume almost everything is possible.
On sv_admin.lua, look at the Admin.Level table:
[code]
Admin.Level = {
None = 0,
Base = 1,
Elevated = 2,
Moderator = 4,
Admin = 8,
Super = 16,
Developer = 32,
Owner = 64
}
[/code]
The key is the title of the rank and the number is used to show how high the rank is.
I initially wanted to use a bitwise permission system, but decided to let go of that after a thinking of this way of approaching the admin system.
If you don't care about disrupting the hierachy, you can simply add new ranks to it by adding a line in between like: DeveloperPlus = 33,
The Secure.Setup table simply contains all buttons and from what access level AND onwards they are visible for.
If you want the new rank to have a scoreboard icon, add a new entry to Admin.Icons: [Admin.Level.DeveloperPlus] = 8 -- (I suggest you use 8, you'll see later on with indexes of the cl_score.lua table)
Then go over to cl_score.lua and look at local icon_access. This table exactly shows which icon belongs to which number. Owner has the 7th icon in the table, so DeveloperPlus would have the 8th index, which isn't present yet, so add this to the end: , Material( "icon16/someimage.png" )
DeveloperPlus can be changed to anything, as well as someimage.png. If you want a rank with a space in it, you can call to it likewise: Admin.Level["Developer Plus"] and set it in the table like: ["Developer Plus"] = 33,
Hope that was somewhat clear!
---
About changing rank, getting that message means you simply don't have access. Make sure you actually have access by checking the scoreboard for example. If you've changed some code around I suggest you check that out because by default it should work.
Hey grav, is there an IP ban feature? I currently cannot look for it because we are offline...
[QUOTE=qTY3;47183424]Hey grav, is there an IP ban feature? I currently cannot look for it because we are offline...[/QUOTE]
If you want to seek out DDoSers, no. I've never had to deal with the idiots you're facing.
You can easily add a manual check for the time of being like:
[code]
if ply:IPAddress() == "127.0.0.1" then
ply.DCReason = "IP Banned"
ply:Kick( "You have been IP Banned." )
end
[/code]
It's really easy to circumvent, though.
I believe NFO has inbuilt DDoS/lockout protection where you can enter IPs to be completely blocked.
If you have root access to a Windows VPS for example, you can make a new rule in the Firewall to block a certain IP from receiving any packet.
[QUOTE=Gravious;47183523]If you want to seek out DDoSers, no. I've never had to deal with the idiots you're facing.
You can easily add a manual check for the time of being like:
[code]
if ply:IPAddress() == "127.0.0.1" then
ply.DCReason = "IP Banned"
ply:Kick( "You have been IP Banned." )
end
[/code]
It's really easy to circumvent, though.
I believe NFO has inbuilt DDoS/lockout protection where you can enter IPs to be completely blocked.
If you have root access to a Windows VPS for example, you can make a new rule in the Firewall to block a certain IP from receiving any packet.[/QUOTE]
Yes we have root access, but I will try the nfo protection thing to keep him out :^)
Hey Grav, fantastic work and always replying :)
Mind if I ask you how would I set chat tags and chat text colors for individual people? I'm 2noob2know :S
EDIT: and another thing, I have added that showkeys code but it's not appearing in game and I can't seem to figure out what the problem might be. I've added the code to cl_strafe, modified
[CODE]elseif szAction == "Timer" then
local szType = tostring( varArgs[ 1 ] )
if szType == "Start" then
Timer:SetStart( tonumber( varArgs[ 2 ] ) )
elseif szType == "Restart" then
if imstnit then imstnit( 1 ) end[/CODE]
but I cant quite figure out what the rest is supposed to mean, do I replace
[code]function Timer:SetCPSData( data )
CPSData = data[/code]
with
[code]function Timer:SetCPSData( data )
SetSyncData( data )[/code]
or do I add SetSyncData( data ) and also keep CPSData = data?
EDIT#2: aaaaaahhhhh, I've got to type !sync, right? anyway it's giving me errors, maybe you could help me figure out what is it? It says
[code][ERROR] gamemodes/bhop/gamemode/cl_timer.lua:288: attempt to call global 'SetSyncData' (a nil value)
1. SetCPSData - gamemodes/bhop/gamemode/cl_timer.lua:288
2. TransferHandle - gamemodes/bhop/gamemode/cl_receive.lua:268
3. func - gamemodes/bhop/gamemode/cl_receive.lua:341
4. unknown - lua/includes/modules/net.lua:32[/code]
[QUOTE=rikyy;47198611]Hey Grav, fantastic work and always replying :)
Mind if I ask you how would I set chat tags and chat text colors for individual people? I'm 2noob2know :S
EDIT: and another thing, I have added that showkeys code but it's not appearing in game and I can't seem to figure out what the problem might be. I've added the code to cl_strafe, modified
[CODE]elseif szAction == "Timer" then
local szType = tostring( varArgs[ 1 ] )
if szType == "Start" then
Timer:SetStart( tonumber( varArgs[ 2 ] ) )
elseif szType == "Restart" then
if imstnit then imstnit( 1 ) end[/CODE]
but I cant quite figure out what the rest is supposed to mean, do I replace
[code]function Timer:SetCPSData( data )
CPSData = data[/code]
with
[code]function Timer:SetCPSData( data )
SetSyncData( data )[/code]
or do I add SetSyncData( data ) and also keep CPSData = data?
EDIT#2: aaaaaahhhhh, I've got to type !sync, right? anyway it's giving me errors, maybe you could help me figure out what is it? It says
[code][ERROR] gamemodes/bhop/gamemode/cl_timer.lua:288: attempt to call global 'SetSyncData' (a nil value)
1. SetCPSData - gamemodes/bhop/gamemode/cl_timer.lua:288
2. TransferHandle - gamemodes/bhop/gamemode/cl_receive.lua:268
3. func - gamemodes/bhop/gamemode/cl_receive.lua:341
4. unknown - lua/includes/modules/net.lua:32[/code][/QUOTE]
You're doing everything right apart from the whole cl_strafe.lua module.
It looks like you missed the most important part of adding a module, including it in cl_init.lua.
Here's a better readme:
[code]
-- README.txt
--[[
Put this file in your modules folder.
On send.txt add a new line with: gamemodes\bhop\gamemode\modules\cl_strafe.lua
Then on your cl_init.lua top add: include( "modules/cl_strafe.lua" )
Note that in order to reset the strafes, you have go to cl_receive.lua (TransferHandle function)
And look for this part
elseif szAction == "Timer" then
local szType = tostring( varArgs[ 1 ] )
if szType == "Start" then
Timer:SetStart( tonumber( varArgs[ 2 ] ) )
elseif szType == "Restart" then
if imstnit then imstnit( 1 ) end
And below the "if imstnit then imstnit( 1 ) end"
Add this: if ResetStrafes then ResetStrafes() end
and on your cl_timer.lua file you'll have to replace Timer:SetCPSData( data ) with this:
function Timer:SetCPSData( data )
SetSyncData( data )
end
You might also want to disable ammo drawing or the displays will overlap
ALSO remove this text because it'll take some time to transfer to the client
]]
[/code]
Your cl_init will look like this:
[code]
include( "core.lua" )
include( "cl_timer.lua" )
include( "cl_receive.lua" )
include( "cl_gui.lua" )
include( "cl_score.lua" )
include( "modules/cl_admin.lua" )
include( "modules/cl_radio.lua" )
include( "modules/cl_strafe.lua" )
[/code]
Let me know if that helped! Otherwise check for errors in the cl_strafe.lua file!
Yep, that did it thanks a lot :3 but I still have one small question unanswered, how can I add chat tag and modify chat text? Or I need a plugin for that? I ask because I've seen another server with your gamemode and they had chat tags with chat text colors :)
EDIT: figured that out! I need to add VIPs in the SQL database and set the colors :3 but what are nType, nStart and nLenght?
Sorry, you need to Log In to post a reply to this thread.