Raised This Month: $ Target: $400
 0% 

Noclip


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
r14170
Veteran Member
Join Date: Dec 2009
Old 08-10-2011 , 13:31   Noclip
Reply With Quote #1

Is it possible to make when you are with noclip you can't go throught walls and if so how?
r14170 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-10-2011 , 13:48   Re: Noclip
Reply With Quote #2

Quote:
Originally Posted by r14170 View Post
Is it possible to make when you are with noclip you can't go throught walls and if so how?
This is called fly mode (MOVE_FLY)

Code:
// pev(entity, pev_movetype) values
#define	MOVETYPE_NONE                   0           // Never moves
#define	MOVETYPE_WALK                   3           // Player only - moving on the ground
#define	MOVETYPE_STEP                   4           // Gravity, special edge handling -- monsters use this
#define	MOVETYPE_FLY                    5           // No gravity, but still collides with stuff
#define	MOVETYPE_TOSS                   6           // Gravity/Collisions
#define	MOVETYPE_PUSH                   7           // No clip to world, push and crush
#define	MOVETYPE_NOCLIP                 8           // No gravity, no collisions, still do velocity/avelocity
#define	MOVETYPE_FLYMISSILE             9           // Extra size to monsters
#define	MOVETYPE_BOUNCE                 10          // Just like Toss, but reflect velocity when contacting surfaces
#define MOVETYPE_BOUNCEMISSILE          11          // Bounce w/o gravity
#define MOVETYPE_FOLLOW                 12          // Track movement of aiment
#define	MOVETYPE_PUSHSTEP               13          // BSP model that needs physics/world collisions (uses nearest hull for world collision)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
r14170
Veteran Member
Join Date: Dec 2009
Old 08-10-2011 , 14:42   Re: Noclip
Reply With Quote #3

how do i set movetype_fly to a player?
r14170 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-10-2011 , 14:45   Re: Noclip
Reply With Quote #4

Quote:
Originally Posted by r14170 View Post
how do i set movetype_fly to a player?
You have to constantly set it in PreThink, maybe also PostThink.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 08-10-2011 , 14:55   Re: Noclip
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
You have to constantly set it in PreThink, maybe also PostThink.
Wont it work if we set it one time (like playerspawn)
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-10-2011 , 15:01   Re: Noclip
Reply With Quote #6

Quote:
Originally Posted by abdul-rehman View Post
Wont it work if we set it one time (like playerspawn)
No. Player movetype is constantly forced to walk if it is not walk or noclip.
Therefore, to set a different movetype, we have to constantly override this setting.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-10-2011 , 15:12   Re: Noclip
Reply With Quote #7

Quote:
Originally Posted by Exolent[jNr] View Post
No. Player movetype is constantly forced to walk if it is not walk or noclip.
Therefore, to set a different movetype, we have to constantly override this setting.
This is done in PM_PlayerMove, set in PostThink only should be enough.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
r14170
Veteran Member
Join Date: Dec 2009
Old 08-10-2011 , 16:36   Re: Noclip
Reply With Quote #8

lol, tryed 2-3 ways but i cant get it to work
this way i cant even go in-game
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>


#define PLUGIN "plugin name"
#define VERSION "0.1"
#define AUTHOR "R14170"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd("say /noclip", "nocliptest");
	register_clcmd("say /nc", "nocliptest");
	// Add your code here...
}

public client_PreThink(id)
{
	if (get_user_noclip(id))
	{
		new ent = find_ent_by_class(id, "player");
		entity_set_int(ent, EV_INT_movetype, 1) == MOVETYPE_FLY
	}
}

public nocliptest(id)
{
	if(get_user_noclip(id) == 1)
	{
		set_user_noclip(id, 1)
	}
	
	if(is_user_alive(id) && !is_user_bot(id))
	{
		set_user_noclip(id, 1)
	}
	else
	{
		client_print(id, print_chat, "You cant use no clip when you are dead")
	}
}
help someone?
r14170 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-10-2011 , 17:01   Re: Noclip
Reply With Quote #9

It doesn't seem to work. Search for flightmode plugin and look at its code.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
r14170
Veteran Member
Join Date: Dec 2009
Old 08-11-2011 , 05:35   Re: Noclip
Reply With Quote #10

still can't get it to work.
r14170 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode