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

(req) help me with this


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 03-15-2012 , 12:35   (req) help me with this
Reply With Quote #1

don't know if i already created this some days ago, but could find it, so maybe no or i posted in incorrect section and it was deleted.

this image was taken not on my server, I talked with the coder, but he don't want give the code.. so maybe one of you know how to do it


when you type /pause, the screen turn in blue colour

and when you type /pause again, the screen back to normal..

PHP Code:
public Pause(id)
{
if (
get_pcvar_num(kz_pause) == 0)
{    
kz_hud_message(id"Pause is disabled")
return 
PLUGIN_HANDLED
}

if(! 
timer_started[id])
{
kz_hud_message(id"Timer is not started")
return 
PLUGIN_HANDLED
}

if(! 
is_user_alive(id) )
{
kz_hud_message(id"You must be alive to use this command")
return 
PLUGIN_HANDLED
}


if( ( 
pevidpev_flags ) & FL_ONGROUND2 ) )
{
if(!
IsPaused[id]) 
{
g_pausetime[id] = get_gametime() - timer_time[id]
timer_time[id] = 0.0
IsPaused
[id] = true
kz_hud_message
(id"Your timer has been paused")
set_pev(idpev_flagspev(idpev_flags) | FL_FROZEN)
pev(idpev_originPauseOrigin[id])
}
else
{
timer_time[id] = get_gametime() - g_pausetime[id] + timer_time[id]
IsPaused[id] = false
kz_hud_message
(id"Your timer has been unpaused")
set_pev(idpev_flagspev(idpev_flags) & ~FL_FROZEN)
}
}
else
kz_hud_message(id"You must be on ground to get paused")

return 
PLUGIN_HANDLED

what I need add to make this screen?

Last edited by bazhenov93; 03-15-2012 at 14:24.
bazhenov93 is offline
bilalpro
BANNED
Join Date: Jan 2011
Old 03-15-2012 , 12:36   Re: (req) help me with this
Reply With Quote #2

Try to search for screenfade information, in other plugins or on our forums.

Last edited by bilalpro; 03-15-2012 at 12:36.
bilalpro is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-15-2012 , 12:53   Re: (req) help me with this
Reply With Quote #3

https://forums.alliedmods.net/showthread.php?t=87623
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Old 03-15-2012, 13:06
bazhenov93
This message has been deleted by bazhenov93. Reason: adding new message
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 03-15-2012 , 14:32   Re: (req) help me with this
Reply With Quote #4

WHAT IS WRONG HERE?


PHP Code:
public Pause(id)
{
    
    if (
get_pcvar_num(kz_pause) == 0)
    {    
        
kz_hud_message(id"Pause is disabled")
        return 
PLUGIN_HANDLED
    
}

    if(! 
timer_started[id])
    {
        
kz_hud_message(id"Timer is not started")
        return 
PLUGIN_HANDLED
    
}
    
    if(! 
is_user_alive(id) )
    {
        
kz_hud_message(id"You must be alive to use this command")
        return 
PLUGIN_HANDLED
    
}


    if( ( 
pevidpev_flags ) & FL_ONGROUND2  ) )
    {
        if(!
IsPaused[id]) 
        {
            
      if( 
get_pcvar_numgCvar_Screenfade ))
            { 
            new 
Color_redColor_greenColor_blue;
            new 
color[16], red[4], green[4], blue[4];
            
get_pcvar_string(gCvar_Colorcolor15);
            
parse(colorred3green3blue3);
            
            
Color_red str_to_num(red);
            
Color_green str_to_num(green);
            
Color_blue str_to_num(blue);
                
            
UTIL_ScreenFadeid, {gCvar_Color},1.0,0.0,75  );
            }
            
            
g_pausetime[id] =   get_gametime() - timer_time[id]
            
timer_time[id] = 0.0
            IsPaused
[id] = true
            
            kz_hud_message
(id"Your timer has been paused")
            
set_pev(idpev_flagspev(idpev_flags) | FL_FROZEN)
            
pev(idpev_originPauseOrigin[id])
            
            
        }
        else
        {
            
timer_time[id] = get_gametime() - g_pausetime[id] + timer_time[id]
            
IsPaused[id] = false
            kz_hud_message
(id"Your timer has been unpaused")
            
set_pev(idpev_flagspev(idpev_flags) & ~FL_FROZEN)
        }
    }
    else
        
kz_hud_message(id"You must be on ground to get paused")

    return 
PLUGIN_HANDLED


Last edited by bazhenov93; 03-15-2012 at 14:41.
bazhenov93 is offline
Xvil
BANNED
Join Date: Feb 2012
Old 03-15-2012 , 14:51   Re: (req) help me with this
Reply With Quote #5

Post the full Script
Xvil is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 03-15-2012 , 15:03   Re: (req) help me with this
Reply With Quote #6

<removed code>

Last edited by Exolent[jNr]; 03-15-2012 at 15:04.
bazhenov93 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-15-2012 , 15:04   Re: (req) help me with this
Reply With Quote #7

Don't post long code. Attach the .sma file instead.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 03-15-2012 , 15:21   Re: (req) help me with this
Reply With Quote #8

here you go
Attached Files
File Type: sma Get Plugin or Get Source (kreedz_test.sma - 169 views - 61.1 KB)
bazhenov93 is offline
Old 03-17-2012, 02:32
bazhenov93
This message has been deleted by bazhenov93. Reason: no need this more :)
Reply


Thread Tools
Display Modes

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 21:44.


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