AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Shove Mod (https://forums.alliedmods.net/showthread.php?t=61237)

Styles 09-24-2007 22:10

Shove Mod
 
5 Attachment(s)
Shove Mod - Push a player away from you.

Cvars:
Code:

shove_force 7
shove_cooldown 10
shove_allow_inuse 1

What the cvars do:
shove_force - How strong the force for shoving is.
shove_cooldown - How long you must wait in order to shove.
shove_allow_inuse - Is the user allowed to press the "e" (Default: +use) key

Modules:
AmxModX
FakeMeta

This should work for all games too.

Hawk/Wilson [29th ID] helped a lot with velocity and helping me with that. Ive never used it.


Version [1.0]:
(shovemod.sma - 48 views - 2.1 KB)
Version [1.1]:
(shoveMod.sma - 169 views - 2.2 KB)

Change Log:
[1.0]
Made it so admins can change the "+use" during a game. (Sorry thought it was more efficient.)
[1.1]
Made it more efficient so that no set_tasks had to be used. ( Thanks Hawk552, connorr )
Also added a how long left in parentheses.

Thank You

MadDogg9o1 09-24-2007 22:41

Re: Shove Mod
 
I'm pretty sure there is already an admin push mod..

EDIT: Yep

Styles 09-24-2007 22:45

Re: Shove Mod
 
This is for every user. If a person guards a doorway shove them outa of it.

MadDogg9o1 09-24-2007 22:47

Re: Shove Mod
 
That could get really annoying/abused. But I guess if you want it you could have it =P

Styles 09-24-2007 22:53

Re: Shove Mod
 
Thats why theres a cooldown... And thats why theres a "shove force" so it doesn't bother you that much.

Jheshka 09-24-2007 22:55

Re: Shove Mod
 
It's a good plugin...

And admin push sucks anyways...

Styles 09-24-2007 22:56

Re: Shove Mod
 
Well this is much more simple. You can't do it while crouched or anything. Only while standing or jumping ( since jumping u can actually push people ). Yeah. I forgot a credit !! Noo!!

Jheshka 09-24-2007 23:09

Re: Shove Mod
 
Quote:

Originally Posted by styles (Post 535303)
Well this is much more simple. You can't do it while crouched or anything. Only while standing or jumping ( since jumping u can actually push people ). Yeah. I forgot a credit !! Noo!!

Don't want hawk yelling at you on here too... :P

Styles 09-24-2007 23:14

Re: Shove Mod
 
lol no screw him ;) Jk love u hawk :D No its Wilson [29th ID]

ConnorMcLeod 09-25-2007 04:28

Re: Shove Mod
 
Nice plugin ;)


I guess you should replace :
Code:
isCooldown[id] = true     set_task(get_pcvar_float(cCooldown), "endCooldown", id, "", 0, "")
with something like :
Code:
g_lastshove_time[id] = get_systime()


and replace
Code:
if(isCooldown[id])     {         client_print(id, print_chat, "[Shove Mod] Your muscles are weak from shoving the player. You must wait to do it again.")         return PLUGIN_HANDLED     }
with
Code:
if( get_systime() - g_lastshove_time[id] < get_pcvar_num(cCooldown) ) {         client_print(id, print_chat, "[Shove Mod] Your muscles are weak from shoving the player. You must wait to do it again.")         return PLUGIN_HANDLED     }



Then you don't need a task.


All times are GMT -4. The time now is 18:28.

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