Question about noclip
Is it possible to have noclip and NOT be able to go through walls, to simulate something similar to flying?
|
Re: Question about noclip
This is just a code snippet, not a working plugin.
You should add checks to see if player is able to use this and other stuff. This is very generic and not advanced. It only goes the direction the player is aiming, instead of following the player's keys. I could probably find out how to match the keys, but I decided to be lazy until you asked for it :P PHP Code:
|
Re: Question about noclip
bind "key" +hook
|
Re: Question about noclip
Not all servers have the hook mod.
|
Re: Question about noclip
You could set their gravity to 0 and then set their velocity with velocityByAim in their prethink, whenever they're holding IN_FORWARD (and when they aren't, set it to 0).
You'll have to simulate strafing and moving backwards too. Moving backwards would be the same but with a negative velocity. For strafing, it's a little more complicated. You'll have to use angle_vector ( Float:vector[3], FRU, Float:vReturn[3] ). The first parameter is an array containing their view angles; you can get it with something like this if you use Fakemeta: Code:
new Float:viewAngles[3]So for example, if you want to simulate a left strafe movement, you check if the player is holding IN_MOVELEFT, then you use ANGLEVECTOR_RIGHT as your "FRU" value and get a vector pointing in that direction. Then you can set their velocity in the left direction by doing something like this: Code:
angleVector[0] = -angleVector[0] * desiredVelocity |
Re: Question about noclip
What about MOVETYPE_FLY? Did somebody test it?
|
Re: Question about noclip
Player pev_movetype values are restricted to MOVETYPE_WALK and MOVETYPE_NOCLIP.
|
Re: Question about noclip
Quote:
omg Prajch that was a Genius idea! Mind posting the full code? i'm going to try to code it right now myself but it will take years for me, especially with the angle_vector part. IN_LEFT and IN_RIGHT has to be simulated, too. Many many +karmas for this code, i promise. |
| All times are GMT -4. The time now is 05:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.