Raised This Month: $12 Target: $400
 3% 

Shove Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Gameplay        Approver:   Zenith77 (33)
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 09-24-2007 , 22:10   Shove Mod
Reply With Quote #1

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
Attached Files
File Type: sma Get Plugin or Get Source (shovemod.sma - 8014 views - 2.2 KB)

Last edited by Styles; 11-10-2007 at 19:00.
Styles is offline
Send a message via AIM to Styles
MadDogg9o1
Junior Member
Join Date: Oct 2005
Old 09-24-2007 , 22:41   Re: Shove Mod
Reply With Quote #2

I'm pretty sure there is already an admin push mod..

EDIT: Yep

Last edited by MadDogg9o1; 09-24-2007 at 22:46.
MadDogg9o1 is offline
Send a message via AIM to MadDogg9o1 Send a message via MSN to MadDogg9o1
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 09-24-2007 , 22:45   Re: Shove Mod
Reply With Quote #3

This is for every user. If a person guards a doorway shove them outa of it.
Styles is offline
Send a message via AIM to Styles
MadDogg9o1
Junior Member
Join Date: Oct 2005
Old 09-24-2007 , 22:47   Re: Shove Mod
Reply With Quote #4

That could get really annoying/abused. But I guess if you want it you could have it =P
MadDogg9o1 is offline
Send a message via AIM to MadDogg9o1 Send a message via MSN to MadDogg9o1
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 09-24-2007 , 22:53   Re: Shove Mod
Reply With Quote #5

Thats why theres a cooldown... And thats why theres a "shove force" so it doesn't bother you that much.
Styles is offline
Send a message via AIM to Styles
Jheshka
Senior Member
Join Date: Dec 2005
Old 09-24-2007 , 22:55   Re: Shove Mod
Reply With Quote #6

It's a good plugin...

And admin push sucks anyways...
__________________
James
Jheshka is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 09-24-2007 , 22:56   Re: Shove Mod
Reply With Quote #7

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!!
Styles is offline
Send a message via AIM to Styles
Jheshka
Senior Member
Join Date: Dec 2005
Old 09-24-2007 , 23:09   Re: Shove Mod
Reply With Quote #8

Quote:
Originally Posted by styles View Post
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...
__________________
James
Jheshka is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 09-24-2007 , 23:14   Re: Shove Mod
Reply With Quote #9

lol no screw him ;) Jk love u hawk No its Wilson [29th ID]
Styles is offline
Send a message via AIM to Styles
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-25-2007 , 04:28   Re: Shove Mod
Reply With Quote #10

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.

Last edited by ConnorMcLeod; 09-25-2007 at 04:33.
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

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 20:59.


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