Raised This Month: $ Target: $400
 0% 

Godmode for (x) seconds.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dark Kingdom
BANNED
Join Date: Apr 2007
Location: VT
Old 04-07-2007 , 18:26   Godmode for (x) seconds.
Reply With Quote #1

The title says it all.
What would the code be to have godmode last for x amount of seconds?
Dark Kingdom is offline
Howdy!
Senior Member
Join Date: Feb 2007
Old 04-07-2007 , 18:52   Re: Godmode for (x) seconds.
Reply With Quote #2

Syntax
set_user_godmode ( index, [ godmode = 0 ] )

and

set_task(15.0,"MyFunction")




__________________
[IMG]http://img221.**************/img221/5608/howdyfinnishhq2.jpg[/IMG]
Howdy! is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-07-2007 , 18:59   Re: Godmode for (x) seconds.
Reply With Quote #3

Is this what you looking for?
Code:
#include <fun>

#define GODTASK = 1977;
....
....

public Godmode(id)
{
      new godid = id + GODTASK;
      set_user_godmode (id, 1);
      set_task(Time_goes_here!, "removeGod", godid);
      return PLUGIN_CONTINUE;
}

public removeGod(god_id)
{
     new id = god_id - GODTASK;
     set_user_godmode(id);
}
greetz regalis
__________________
regalis is offline
Reply



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 06:39.


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