Raised This Month: $ Target: $400
 0% 

Shove Mod


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 09:50.


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