Files

> > CS2D > Maps > de_dildo mod
Files overviewCS2D overviewMaps overview

English de_dildo mod >

8 comments1.98 mb, 265 Downloads

old de_dildo mod

tontonEd
User Off Offline

Hello Happy new year everybody,

I have worked on that script/mod last year but I didn't post it. let me repair that!

I just looked on the code now and some part can, maybe, interrest some of you.

for exemple; my way to deal have balance based on rank using a bubble algorithm or the way you can change bots behavious.

the rest stay pretty basic and fancy, but fun eh?

--------------------------------------------------------------------------

In less serious way let me introduce you de_dildo;

it's basicly a normal game mode (so it stays dynamic) but you can also slap people with a dildo and transform them into dickhead (litterally).

you can also fight a old pirate (see the picture bellow), which throw nade like a pro.

IMG:https://i.ibb.co/fpHwRNd/pirate-bomber.png


make sure you checked the mod in server setting, see the screen below.

Awesome original map made by Lobwver / FDK !

With great power comes great responsibility
tontonEd
edited 4×, last 06.01.22 02:39:27 pm
Approved by DC

Download Download

1.98 mb, 265 Downloads

Comments

8 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

MaksDragon
User Off Offline

what a hell happening here

old

Mami Tomoe
User Off Offline

I meant that I was in the example comment on how to ban someone.

Also, why is there a ban function to begin with?
Plus, remember that the ban load happens on the server as well.
The server will initialise an otherwise banned player only to ban them a second later.
Quite inefficient and won't be a good idea on the long run.

old

tontonEd
User Off Offline

@user Mami Tomoe: thanks for your develloped feedback and thanks for proposing better version of my code for this community.

I double checked, nobody is in the ban list.

About the ban ; hoppefully this function isn't the reason I posted and made this mod.

I do believe there is more efficient way to achieve a ban function.

If I'm not wrong, as it has been months I didn't code in cs2d lua, the join hook is trigerred after the client did download all the server files.. which should be even more annoying from client perspective to get banned at that moment.. that's very sadic

Thanks and feel free contribute for the community. if you see something else to correct in the code.

old

Mami Tomoe
User Off Offline

It's uploads like these that make me think there should be age rating for user uploads on this website, and in servers.

The variable names and strings inside the main file are questionable at best.

Also, why am I banned?
That's a little... Sussy.
Regardless, your ban on join function is flawed.
Not only is it useless considering CS2D already has a ban feature, but also it uses the cs2d lua hook join hook, instead of the cs2d lua hook connect_attempt hook, which means the player will still appear on the server.
And, more importantly, you're banning using the cs2d lua cmd player function to get the variables to ban, whilst this works when you only want to ban an IP, U.S.G.N., STEAM or a name, you can't use this to ban more than one of those at a time.
Why? The player won't exist anymore and the second time will attempt to request data from a player that doesn't exist, since the player was banned.

Wrong:
1
2
3
4
5
6
7
8
9
10
11
12
13
function banOnJoin(id)
	for _, usgn in pairs(bannedList) do
		if player(id,"usgn") == usgn then
			if player(id,"ip") ~= "0.0.0.0" then    
				parse('banip '..player(id,"ip")..' 0 ')
			end
			if player(id,"steamid") ~= "0" then 
				parse('bansteam '..player(id,"steamid")..' 0 ')
			end 
			parse('banusgn '..usgn..' 0 ')
		end
	end 
end

Right:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
local BAN_REASON = 'pp'
local NO_IP      = { ['0.0.0.0'] = true, ['127.0.0.1'] = true }

function banOnJoin(p)
	local usgnId = player(p, 'usgn')

	-- No need to use pairs or ipairs,
	-- they're slower.
	for i = 1, #bannedList do
		local entry  = bannedList[i]

		-- Is this player banned?
		if entry == usgnId then
			local success

			-- Make sure to request all data
			-- before removing the player.
			local steamId   = player(p, 'steamid')
			local ipAddress = player(p, 'ip')

			-- Remove the player.
			if usgnId > 0 then
				parse('banusgn "' .. usgnId .. '" "0" "' .. BAN_REASON .. '"')

				success = true
			end

			if steamId ~= '0' then
				parse('bansteam "' .. steamId .. '" "0" "' .. BAN_REASON .. '"')

				success = true
			end

			if not NO_IP[ipAddress] then
				parse('banip "' .. ipAddress .. '" "0" "' .. BAN_REASON .. '"')

				success = true
			end

			if not success then
				-- No need to pre-request the name,
				-- because the player wasn't removed.
				print('FATAL ERROR: Could not ban player "' .. player(p, 'name') .. '".')
			end

			break -- We're finished here.
		end
	end
end

That is obviously overkill in many ways, but it will work much better and be a lot more reliable.
Again, useless since the game already has a ban system.
edited 3×, last 12.01.22 03:07:53 pm

old

tontonEd
User Off Offline

@user Lobwver: thanks for the map, I 'm the fan n1 of the map. thx for you kinds words.

@user Xirot: thanks !

old

Xirot
Idiot Off Offline

nice one bro
I like it!

old

Lobwver
User Off Offline

The map of the screenshots is made by me lmao

Pretty chaotic and fun mod
I like it!

old

komasio
User Off Offline

what you did
To the start Previous 1 Next To the start