Raised This Month: $ Target: $400
 0% 

How to make firstround = freeday?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PWA
Junior Member
Join Date: May 2010
Old 08-16-2010 , 07:09   How to make firstround = freeday?
Reply With Quote #1

Hello every one, i wanted to ask, how to make firstround like freeday/ but others round is my code!

Here is my code,

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <colorchat>

// Define the Plugin Version
new const VERSION[] = "1.5";

// PREFIX
new const PREFIX[] = "[IDenty]";

const 
CountSeconds 60;
const 
CountSeconds2 20;
const 
CountSeconds3 15;
new 
g_iCountTime;

public 
plugin_init()
{
    
register_plugin("Identy Days"VERSION"1PWA");
    
register_logevent("LEV_RoundEnd"2"1=Round_End")
    
register_logevent("RoundStart"2"1=Round_Start")
}

public 
RoundStart(id)
{    
    
ColorChat0GREEN"^x03%s ^x04 Uzgaidiet mazliet, Dienu tulit izvelesies! "PREFIX)
    
set_task(10.0"nextday")
}

public 
LEV_RoundEnd()
{
    
remove_task()
}

public 
Count() 
{        
    
set_hudmessage255 , -1.0 0.28 1.1 1.1 0.01 0.01 );  
    
show_hudmessage"Ieslodzitajiem ir: %d sekundes - palikusas" g_iCountTime-- );


public 
nextday(id)
{
    switch(
random_num(113))
    {
        case 
1:
        {
            
ZombieDay(id)
        }
        case 
2:
        {
            
ColorChat0GREEN"^x03%s ^x04 Custom day! Klausies ko saka! "PREFIX)
        }
        case 
3:
        {
            
SpartanDay(id)
        }
        case 
4:
        {
            
ColorChat0GREEN"^x03%s ^x04 Brivdiena!"PREFIX)
        }
        case 
5:
        {
            
ColorChat0GREEN"^x03%s ^x04 Bura diena! VISI UZ BURI! "PREFIX)
        }
        case 
6:
        {
            
ColorChat0GREEN"^x03%s ^x04 Mix day! Klausies ko saka! "PREFIX)
        }
        case 
7:
        {
            
ColorChat0GREEN"^x03%s ^x04 Simon day! Klausies ko saka! "PREFIX)
        }
        case 
8:
        {
            
ColorChat0GREEN"^x03%s ^x04 Custom day! Klausies ko saka! "PREFIX)
        }
        case 
9:
        {
            
SuddenDay(id)
        }
        case 
10:
        {
            
CthnsDay(id)
        }
        case 
11:
        {
            
WarDay(id)
        }
        case 
12:
        {
            
ColorChat0GREEN"^x03%s ^x04 Stop n Go day! Klausies ko saka! "PREFIX)
        }
        case 
13:
        {
            
HideDay(id)
        }
    }
        
    return 
PLUGIN_HANDLED;
}

And 
lower here is day scriptwith all optionswhat i dont want to show
I just want to know, how to do that. Example
All peoples join server, and the first round always be Freeday, but second will the script choise, like Hide day or smtg like that! ;)
PWA is offline
fireattack
Senior Member
Join Date: Jul 2008
Old 08-16-2010 , 13:55   Re: How to make firstround = freeday?
Reply With Quote #2

Try this.

PHP Code:
 
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
 
new freeday[33]
 
public 
plugin_init() 
{
 
set_task(3.0"firstround");
}
 
public 
firstround(id)
{
 if(
freeday[id] > 0)
  return 
FMRES_IGNORED;
 
 if(
is_user_alive(id) || is_user_connected(id))
 {
  
//do something
  
freeday[id] = 1
 
}
 return 
PLUGIN_CONTINUE

fireattack is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 08-16-2010 , 14:31   Re: How to make firstround = freeday?
Reply With Quote #3

PHP Code:
#include <amxmodx>

new first_round

public plugin_init() {
    
    
register_plugin("Free Day""1.0""Mxnn")
    
register_event("ResetHUD""RoundStart""be")
}

public 
RoundStart() {
    
    if (!
first_round) {
        
first_round 1
        
//Free day
    
}
        
    return 
PLUGIN_CONTINUE

Mxnn is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 08-16-2010 , 14:52   Re: How to make firstround = freeday?
Reply With Quote #4

I don't think ResetHud is good to detect the first round.
I'd use this:
PHP Code:
register_event("Event_RoundStart"2"1=RoundStart); 
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 08-16-2010 , 15:25   Re: How to make firstround = freeday?
Reply With Quote #5

PHP Code:
register_logevent("round_first"2"0=World triggered""1&Restart_Round_")
register_logevent("round_first"2"0=World triggered""1=Game_Commencing")


public 
round_first()
{
// BLABLABLA
//

__________________
Javivi is offline
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 08-16-2010 , 17:38   Re: How to make firstround = freeday?
Reply With Quote #6

Javivi, if I'm not mistaken, those can happen in the middle of a map as long as there is only one person, and another person joins.
RedRobster is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-16-2010 , 23:56   Re: How to make firstround = freeday?
Reply With Quote #7

Quote:
Originally Posted by drekes View Post
I don't think ResetHud is good to detect the first round.
I'd use this:
PHP Code:
register_event("Event_RoundStart"2"1=RoundStart); 
That's register_logevent(), it's also "Round_Start" instead of "RoundStart" and you forgot a " at the end.

register_logevent("event_roundStart", 2, "1=Round_Start")
__________________
Hunter-Digital is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 08-17-2010 , 00:11   Re: How to make firstround = freeday?
Reply With Quote #8

Quote:
Originally Posted by Hunter-Digital View Post
That's register_logevent(), it's also "Round_Start" instead of "RoundStart" and you forgot a " at the end.

register_logevent("event_roundStart", 2, "1=Round_Start")
I was tired, i've would have seen it when i compiled
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 08-17-2010 , 06:02   Re: How to make firstround = freeday?
Reply With Quote #9

Quote:
Originally Posted by RedRobster View Post
Javivi, if I'm not mistaken, those can happen in the middle of a map as long as there is only one person, and another person joins.
Obviously... and if you do sv_restart 1 too.

But think about it... it would be the first round
__________________
Javivi is offline
PWA
Junior Member
Join Date: May 2010
Old 08-17-2010 , 07:31   Re: How to make firstround = freeday?
Reply With Quote #10

dont work, anyone of these scripts.. >.<
PWA 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 22:00.


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