anti prone :-)

Discussions about ET modding (sdk code, player/weapon modeling)

Moderators: Forum moderators, developers

User avatar
mortis
Posts: 360
Joined: Tue Jul 06, 2004 11:57 pm
Location: at the center of the e-universe
Contact:

Post by mortis »

mortis wrote:ETpro already has pronedelay as a server cvar. Properly configured it should handily discourage proning.
the answer is simple, make prone unappealing..
User avatar
dutchmeat
Posts: 62
Joined: Tue Jan 28, 2003 8:08 am
Location: Netherlands
Contact:

Post by dutchmeat »

or just 'hex' the +prone out of the cgame dll, put it in a pack and be done with it.
crazyfrag
Posts: 105
Joined: Fri Oct 01, 2004 1:17 pm

Post by crazyfrag »

is there anyway to give out the current used entity numberof a player??
crazyfrag
Posts: 105
Joined: Fri Oct 01, 2004 1:17 pm

Post by crazyfrag »

mortis wrote:
mortis wrote:ETpro already has pronedelay as a server cvar. Properly configured it should handily discourage proning.
the answer is simple, make prone unappealing..

this won't work cause if a guy laysdown on a headshot server he won't stand up again so prone delay isn't effective enouggh

cool would be if a player laysdown he will be gibbed instantly
crazyfrag
Posts: 105
Joined: Fri Oct 01, 2004 1:17 pm

Post by crazyfrag »

bani should now the number he used 4 pronedelay :s
crazyfrag
Posts: 105
Joined: Fri Oct 01, 2004 1:17 pm

Post by crazyfrag »

is this the thing?

Code: Select all

// entityState_t->eFlags
#define	EF_DEAD				0x00000001		// don't draw a foe marker over players with EF_DEAD
#define EF_NONSOLID_BMODEL	0x00000002		// bmodel is visible, but not solid
#define	EF_FORCE_END_FRAME	EF_NONSOLID_BMODEL	// force client to end of current animation (after loading a savegame)
#define	EF_TELEPORT_BIT		0x00000004		// toggled every time the origin abruptly changes
#define	EF_READY			0x00000008		// player is ready

#define	EF_CROUCHING		0x00000010		// player is crouching
#define	EF_MG42_ACTIVE		0x00000020		// currently using an MG42
#define	EF_NODRAW			0x00000040		// may have an event, but no model (unspawned items)
#define	EF_FIRING			0x00000080		// for lightning gun
#define	EF_INHERITSHADER	EF_FIRING		// some ents will never use EF_FIRING, hijack it for "USESHADER"

#define EF_SPINNING			0x00000100		// (SA) added for level editor control of spinning pickup items
#define EF_BREATH			EF_SPINNING		// Characters will not have EF_SPINNING set, hijack for drawing character breath
#define	EF_TALK				0x00000200		// draw a talk balloon
#define	EF_CONNECTION		0x00000400		// draw a connection trouble sprite
#define	EF_SMOKINGBLACK		0x00000800		// JPW NERVE -- like EF_SMOKING only darker & bigger

#define EF_HEADSHOT			0x00001000		// last hit to player was head shot (Gordon: NOTE: not last hit, but has BEEN shot in the head since respawn)
#define EF_SMOKING			0x00002000		// DHM - Nerve :: ET_GENERAL ents will emit smoke if set // JPW switched to this after my code change
#define	EF_OVERHEATING		(EF_SMOKING | EF_SMOKINGBLACK)	// ydnar: light smoke/steam effect
#define	EF_VOTED			0x00004000		// already cast a vote
#define	EF_TAGCONNECT		0x00008000		// connected to another entity via tag
#define EF_MOUNTEDTANK		EF_TAGCONNECT	// Gordon: duplicated for clarity

#define EF_SPARE3			0x00010000		// Gordon: freed
#define	EF_PATH_LINK		0x00020000		// Gordon: linking trains together
#define EF_ZOOMING			0x00040000		// client is zooming
#define	EF_PRONE			0x00080000		// player is prone

#define EF_PRONE_MOVING		0x00100000		// player is prone and moving
#define EF_VIEWING_CAMERA	0x00200000		// player is viewing a camera
#define EF_AAGUN_ACTIVE		0x00400000		// Gordon: player is manning an AA gun
#define EF_SPARE0			0x00800000		// Gordon: freed
crazyfrag
Posts: 105
Joined: Fri Oct 01, 2004 1:17 pm

Post by crazyfrag »

ok i tried to hax it out dont get it workin :-(

why is there no way grrrrr ^^ :-(
crazyfrag
Posts: 105
Joined: Fri Oct 01, 2004 1:17 pm

Post by crazyfrag »

if someone is interessted! heres the code!
the player gets gibbed in this script.... i've modiefied it to disarm him for 10 seconds

Code: Select all


samplerate = 200
--

function et_InitGame(levelTime,randomSeed,restart)
	mclients = tonumber( et.trap_Cvar_Get( "sv_maxClients" ) )	--gets the maxclients

function et_RunFrame( levelTime )
 	
	if math.mod(levelTime, samplerate) ~= 0 then return end
	-- for all clients
			for j = 0, mclients - 1 do
		if (et.gentity_get(j, "s.eFlags")) > 500000 then
			if (tonumber(et.trap_Cvar_Get( "gamestate" ))) == 0 then
			local cname = et.gentity_get(j, "pers.netname")
			soundindex = et.G_SoundIndex("sound/player/hurt_barbwire.wav" )
			et.gentity_set(j, "health", -200)
			et.G_Sound(j, soundindex )
			et.trap_SendServerCommand(-1 , "chat \""..cname.." ^3proned and has been gibbed!\n\"" )	
				end
			end
		end
	end
end
Last edited by crazyfrag on Sun Feb 08, 2009 8:48 am, edited 1 time in total.
User avatar
Luk4ward
Posts: 236
Joined: Sun Jul 30, 2006 1:55 pm
Location: Poland
Contact:

Post by Luk4ward »

You cant freeze a player :>. You can move under map if u want :D
wolFTeam.pl
crazyfrag
Posts: 105
Joined: Fri Oct 01, 2004 1:17 pm

Post by crazyfrag »

lolo
crazyfrag
Posts: 105
Joined: Fri Oct 01, 2004 1:17 pm

Post by crazyfrag »

Luk4ward wrote:You cant freeze a player :>. You can move under map if u want :D
sure u can u save his location and set it every 200 ms :DDD


this is what i found out (eflags= bitflag)

Code: Select all

active 			4
Ready   		8
crouch  			16
mg42 fix		32
Firing   			128
console /talking		512      (limbo etc.)
voted			16384
tank			32768
prone			524288
prone moving 		1048580
User avatar
Luk4ward
Posts: 236
Joined: Sun Jul 30, 2006 1:55 pm
Location: Poland
Contact:

Post by Luk4ward »

yes, this will be the easiest way. But if u only change his location then he will be able to stand up...It is not the 100% method to freeze a player. You can try to set him fieldname speed to very low value:

Code: Select all

et.gentity_set( j, "speed", 0.0 ) -- 0.0 coz speed is a float value
this should work very well :)

p.s standard speed is 320
wolFTeam.pl
crazyfrag
Posts: 105
Joined: Fri Oct 01, 2004 1:17 pm

Post by crazyfrag »

Luk4ward wrote:yes, this will be the easiest way. But if u only change his location then he will be able to stand up...It is not the 100% method to freeze a player. You can try to set him fieldname speed to very low value:

Code: Select all

et.gentity_set( j, "speed", 0.0 ) -- 0.0 coz speed is a float value
this should work very well :)

p.s standard speed is 320
this is not working :D
User avatar
Luk4ward
Posts: 236
Joined: Sun Jul 30, 2006 1:55 pm
Location: Poland
Contact:

Post by Luk4ward »

try this

Code: Select all

samplerate = 500
--

function et_InitGame(levelTime,randomSeed,restart)
   mclients = tonumber( et.trap_Cvar_Get( "sv_maxClients" ) )   --gets the maxclients
end

function et_RunFrame( levelTime )

   if math.mod(levelTime, samplerate) ~= 0 then return end
   -- for all clients
      for j = 0, mclients - 1 do
      if ( ((et.gentity_get(j, "s.eFlags")) == 524292) or ( (et.gentity_get(j, "s.eFlags")) == 1572868 ) ) then
      --if ( ((et.gentity_get(j, "s.eFlags")) == 524288 ) or ( (et.gentity_get(j, "s.eFlags")) == 1048580 ) ) then
      
         if (tonumber(et.trap_Cvar_Get( "gamestate" ))) == 0 then
         local cname = et.gentity_get(j, "pers.netname")
         soundindex = et.G_SoundIndex("sound/player/land_hurt.wav" )

         local player_origin = et.gentity_get(j,"r.currentOrigin")
         player_origin[3] = player_origin[3] + 100
         et.gentity_set( j, "origin", player_origin )

         if math.mod(levelTime, samplerate*2) ~= 0 then
         et.G_Sound(j, soundindex )
         et.trap_SendServerCommand(j, "cpm \"^7"..cname.."^3, you have been proned! ^1Stand up or ^0die!\n\"" )
         end
         
         end
         
       end
      end

end
The better way is to turn him with 90 degree. Just use "rotate" instead of "origin". I havent got so much time to play with this now :)
wolFTeam.pl
crazyfrag
Posts: 105
Joined: Fri Oct 01, 2004 1:17 pm

Post by crazyfrag »

Luk4ward wrote:


if ( ((et.gentity_get(j, "s.eFlags")) == 524292) or ( (et.gentity_get(j, "s.eFlags")) == 1572868 ) ) then
this wont work cuz if u press console or fire or anything else while prone the bitflag gets to high ... and sometimes u start playing ur bitflag is 4 and sometimes ist 0 so i used greater than function ... cuz this is for a headshot server so i dont have the really high bitflags so its working without problems!

the loweset bitfalg for prone has to be 524288
Post Reply