Raised This Month: $ Target: $400
 0% 

Starting Screen


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
razieljohn619
Senior Member
Join Date: May 2011
Location: Philippines
Old 06-24-2011 , 22:43   Starting Screen
Reply With Quote #1

hey guys i need some help with this.. please..

what this plugin should do is at round start, every one's screen should be black and the blackness has transparency, every player will freeze and there will be a countdown that Match Begins in 3..2..1.. .,and after the countdown has stop., the blackness and freezing of players should stop and the game starts killing

PHP Code:
#include <amxmodx>
#include <fun>
#include <csx>
#include <amxmisc>
#include <engine>

#define PLUGIN "Starting Screen"
#define VERSION "1.0"
#define AUTHOR "razieljohn619"

#define NORMAL_VELOCITY        240.0
#define FROZEN_VELOCITY        0.1

#define ID_UNFREEZE ( taskid - TASK_UNFREEZE )
#define IsPlayer(%1)    ( 1 <= %1 <= g_iMaxPlayers )

new const Version[] = "1.0";

const 
iCountTime 1500;

new 
g_iCountdownEntity;
new 
g_iCounter;
new 
g_iMaxPlayersmsgScreenFade
const TASK_UNFREEZE 1589;

new 
g_frozen[33]

public 
plugin_init()
{
    
register_plugin("Starting Screen""1.0" "razieljohn619")
    
register_event("HLTV""freezeplayers""a""1=0""2=0");
    
register_event("HLTV""ShowCountdown""a""1=0""2=0");
    
g_iCountdownEntity create_entity"info_target" );
    
entity_set_stringg_iCountdownEntity EV_SZ_classname "countdown_entity" );
    
    
register_think"countdown_entity" "fw_CountdownEntThink" );
    
msgScreenFade get_user_msgid("ScreenFade")
    
g_iMaxPlayers get_maxplayers()
}

public 
freezeplayers(id)
{
    if(!
is_user_alive(id) || g_frozen[id] || task_exists(id+TASK_UNFREEZE))
        return;
        
    
g_frozen[id] = 1
    
    set_user_maxspeed
(idFROZEN_VELOCITY)
    
    
fadeblack(idamount)
    
set_task(3.0"remove_freeze"id+TASK_UNFREEZE)
}

public 
remove_freeze(taskid)
{
    
g_frozen[ID_UNFREEZE] = 0
    set_user_maxspeed
(ID_UNFREEZENORMAL_VELOCITY)


public 
countdown


stock fadeblack
(idammount)
{    
    if (
ammount 255)
    
ammount 255
    
    message_begin
(MSG_ONE_UNRELIABLEmsgScreenFade, {0,0,0}, id)
    
write_short(ammount 3)    //Durration
    
write_short(0)        //Hold
    
write_short(0)        //Type
    
write_byte(100)    //R
    
write_byte(100)    //G
    
write_byte(100)    //B
    
write_byte(ammount)    //B
    
message_end()
}  

public 
ShowCountdown()
{
    
g_iCounter iCountTime;
    
entity_set_floatg_iCountdownEntity EV_FL_nextthink get_gametime() + 0.01 );
}

public 
fw_CountdownEntThinkiEntity )
{
    if ( 
iEntity == g_iCountdownEntity 
    {
        
set_hudmessage255 255 255 , -1.0 , -1.0 0.1 0.1 );
        
show_hudmessage" Match Begins in %d " , --g_iCounter );
        
        if ( 
g_iCounter )
            
entity_set_floatg_iCountdownEntity EV_FL_nextthink get_gametime() + 0.01 );
        else
            
    }

THANKS
__________________


Last edited by razieljohn619; 06-26-2011 at 19:36.
razieljohn619 is offline
Send a message via Yahoo to razieljohn619
 



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 23:24.


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