AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help starting this plugin. (https://forums.alliedmods.net/showthread.php?t=58382)

Sllipindk 07-24-2007 22:47

Need help starting this plugin.
 
I need some help starting this off. This plugin will be for The Specialists mod, the purpose is to modify movement, due to the fact that The Specialists has so many dynamic movements I want to try and limit a few.

This would be my very first plugin attempt and I may need your help. Let's say that I want to change my regular run forward, backward and strafe speed to the slow walking speed and change my slow walking speed to the run speed. How can I start off and go about this ?

Thanks alot.

-Sllipindk

potatis_invalido 07-24-2007 23:15

Re: Need help starting this plugin.
 
You should start with something less advanced.

Sllipindk 07-24-2007 23:29

Re: Need help starting this plugin.
 
Can you please specify or tell me more on what I should try and code ?

To be more specific what was your first type of plugin you coded ?

Thanks for your positive reply.

-Sllipindk

potatis_invalido 07-24-2007 23:39

Re: Need help starting this plugin.
 
Quote:

Originally Posted by Sllipindk (Post 507909)
Can you please specify or tell me more on what I should try and code ?

To be more specific what was your first type of plugin you coded ?

Thanks for your positive reply.

-Sllipindk

First I started editing others plugins (of corse I didnt publish them, it was other people's plugins). Then I made a god mode & noclip plugin (even though there already are hundreds of them. Not published). Then I made a plugin that would set player's hp (Not published. Don't publish trash ^^).

Sllipindk 07-25-2007 12:05

Re: Need help starting this plugin.
 
Thanks alot for your generous response, handful of people would say something that would discourage newbies. Im sure you all know the feeling of being a newbie and how hard it is.

-Sllipindk

stupok 07-25-2007 12:58

Re: Need help starting this plugin.
 
The only way I know how to determine whether a user is running or walking is by measuring their actual speed.

You can see that there are problems with this already, if you're hoping to swap running speed with walking speed. I think it may be doable, but it will be fishy. If I have some time I'll give it a try...

Rolnaaba 07-25-2007 13:07

Re: Need help starting this plugin.
 
Quote:

Originally Posted by stupok69 (Post 508096)
The only way I know how to determine whether a user is running or walking is by measuring their actual speed.

You can see that there are problems with this already, if you're hoping to swap running speed with walking speed. I think it may be doable, but it will be fishy. If I have some time I'll give it a try...

or use pev button to determine if they are holding walk...

stupok 07-25-2007 13:53

Re: Need help starting this plugin.
 
Where's the walk constant?

Code:

// pev(entity, pev_button) or pev(entity, pev_oldbuttons) values
#define IN_ATTACK                      (1<<0)
#define IN_JUMP                        (1<<1)
#define IN_DUCK                        (1<<2)
#define IN_FORWARD                      (1<<3)
#define IN_BACK                        (1<<4)
#define IN_USE                          (1<<5)
#define IN_CANCEL                      (1<<6)
#define IN_LEFT                        (1<<7)
#define IN_RIGHT                        (1<<8)
#define IN_MOVELEFT                    (1<<9)
#define IN_MOVERIGHT                    (1<<10)
#define IN_ATTACK2                      (1<<11)
#define IN_RUN                          (1<<12)
#define IN_RELOAD                      (1<<13)
#define IN_ALT1                        (1<<14)
#define IN_SCORE                        (1<<15)    // Used by client.dll for when scoreboard is held down

The only thing I think may work is IN_RUN, but I'm not sure until I test it.

potatis_invalido 07-25-2007 13:54

Re: Need help starting this plugin.
 
Quote:

Originally Posted by Sllipindk (Post 508073)
Thanks alot for your generous response, handful of people would say something that would discourage newbies. Im sure you all know the feeling of being a newbie and how hard it is.

-Sllipindk

Yea I know how it is. I hadnt played surf maps for 5 months until 3 days ago and every1 complained and said I sucked (and of corse, called me a "n00b". I do suck at surf now. I used to be "pro". But that's no reason to complain).

Rolnaaba 07-26-2007 12:44

Re: Need help starting this plugin.
 
Code:
if(!(pev(ent, pev_button) & IN_RUN)) {}
that wont work?


All times are GMT -4. The time now is 21:33.

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