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

[REQ] Event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 01-27-2016 , 12:25   [REQ] Event
Reply With Quote #1

Hi ,
I want to make event that will start after "x" seconds , every round.
some help pls
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-27-2016 , 12:40   Re: [REQ] Event
Reply With Quote #2

The simple way is to set a task at the start of a new round.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Hedgehog Fog
Senior Member
Join Date: Jun 2010
Location: Ukraine
Old 01-27-2016 , 13:21   Re: [REQ] Event
Reply With Quote #3

PHP Code:
#include <amxmodx>

/*--------[Constants]--------*/

#define TASKID_NEW_ROND_EVENT 1

#define NEW_ROUND_EVENT_DELAY 10.0

/*--------[Init]--------*/

public plugin_init()
{
  
register_plugin("""""");

  
//New round hook
  
register_event("HLTV""onNewRound""a""1=0""2=0");
}

/*--------[Events]--------*/

public onNewRound()
{
  if(
task_exists(TASKID_NEW_ROND_EVENT))
    
remove_task(TASKID_NEW_ROND_EVENT);
  
  
set_task(NEW_ROUND_EVENT_DELAY"task_new_round_event"TASKID_NEW_ROND_EVENT);
}

public 
task_new_round_event(taskID)
{
  
//Do something here

__________________

❄️ CS Snow Wars - Mod based on snowballs fights
🧟 CS Zombie Panic - A port of HL Zombie Panic!
🎃 CS Halloween Mod - Completely new gamemode for Halloween Holidays
📦 AMXXPack - CLI and build system for amxx projects
🔧 Custom Entities API - API to register custom entities

Last edited by Hedgehog Fog; 01-27-2016 at 13:22.
Hedgehog Fog is offline
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 01-27-2016 , 13:23   Re: [REQ] Event
Reply With Quote #4

Quote:
Originally Posted by Hedgehog95 View Post
PHP Code:
#include <amxmodx>

/*--------[Constants]--------*/

#define TASKID_NEW_ROND_EVENT 1

#define NEW_ROUND_EVENT_DELAY 10.0

/*--------[Init]--------*/

public plugin_init()
{
  
register_plugin("""""");

  
//New round hook
  
register_event("HLTV""onNewRound""a""1=0""2=0");
}

/*--------[Events]--------*/

public onNewRound()
{
  if(
task_exists(TASKID_NEW_ROND_EVENT))
    
remove_task(TASKID_NEW_ROND_EVENT);
  
  
set_task(NEW_ROUND_EVENT_DELAY"task_new_round_event"TASKID_NEW_ROND_EVENT);
}

public 
task_new_round_event(taskID)
{
  
//Do something here

Thnnx So Much
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd 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 09:32.


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