Raised This Month: $ Target: $400
 0% 

End button help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
drakeris
Senior Member
Join Date: Jul 2009
Old 05-28-2010 , 05:50   End button help
Reply With Quote #1

the title says all:
PHP Code:
public FwdCmdStart(identuc_handleseed)
{
    if (
is_user_connected(id) && get_pcvar_num(ff_stat))
        return 
FMRES_IGNORED;
    
    new 
button get_uc(uc_handleUC_Buttons);

    new 
target[32]
    
pev(entpev_targetnametarget31)
        
    if ((
button IN_USE))
    {
        if(
equal(target"endbut")) 
        {
            
set_task1.0 "text" 2356 "a" );
        }
    }
    return 
FMRES_IGNORED;
}

public 
text()
{
    
client_print(0print_chat"gratz You almost won the fear factory left only one victory...")

im using this everything wokrs except when i push button i do not get message...
__________________

Last edited by drakeris; 05-31-2010 at 02:59.
drakeris is offline
minato
Senior Member
Join Date: May 2010
Location: Rosario
Old 05-28-2010 , 09:41   Re: need help with button...
Reply With Quote #2

It tries with this code
PHP Code:
    new button pev(idpev_button)
   
    if ((
button IN_USE) && !(pev(idpev_oldbuttons) & IN_USE)) {

        
//Your Code
    

minato is offline
Send a message via MSN to minato
drakeris
Senior Member
Join Date: Jul 2009
Old 05-30-2010 , 08:54   Re: need help with button...
Reply With Quote #3

Quote:
Originally Posted by minato View Post
It tries with this code
PHP Code:
    new button pev(idpev_button)
   
    if ((
button IN_USE) && !(pev(idpev_oldbuttons) & IN_USE)) {

        
//Your Code
    

srry didn`t understand you...
any solutions?
__________________
drakeris is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-30-2010 , 09:32   Re: need help with button...
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define TASK_ENDBUT    2356

public plugin_init() 
{
    
register_forwardFM_CmdStart "FwdCmdStart" );
}

public 
FwdCmdStartid uc_handle seed )
{
    
//if (is_user_connected(id) && get_pcvar_num(ff_stat))
    //    return FMRES_IGNORED;
    
    //this is your problem code
    
static target[32]
    
peventpev_targetname target 31 )
    
//&& equal( target , "endbut" )
    
    
if ( ( get_ucuc_handle UC_Buttons ) & IN_USE ) && !( pevid pev_oldbuttons ) & IN_USE ) )
    {
        
set_task1.0 "text" TASK_ENDBUT id );
    }
    
    return 
FMRES_IGNORED;
}

public 
texttaskid )
{
    
client_printtaskid TASK_ENDBUT print_chat"gratz You almost won the fear factory left only one victory...")

__________________
Bugsy is offline
drakeris
Senior Member
Join Date: Jul 2009
Old 05-30-2010 , 12:36   Re: need help with button...
Reply With Quote #5

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

#define TASK_ENDBUT    2356

public plugin_init() 
{
    
register_forwardFM_CmdStart "FwdCmdStart" );
}

public 
FwdCmdStartid uc_handle seed )
{
    
//if (is_user_connected(id) && get_pcvar_num(ff_stat))
    //    return FMRES_IGNORED;
    
    //this is your problem code
    
static target[32]
    
peventpev_targetname target 31 )
    
//&& equal( target , "endbut" )
    
    
if ( ( get_ucuc_handle UC_Buttons ) & IN_USE ) && !( pevid pev_oldbuttons ) & IN_USE ) )
    {
        
set_task1.0 "text" TASK_ENDBUT id );
    }
    
    return 
FMRES_IGNORED;
}

public 
texttaskid )
{
    
client_printtaskid TASK_ENDBUT print_chat"gratz You almost won the fear factory left only one victory...")

thanks it worked :} now i know my problem
P.S.Your the best :}
__________________
drakeris is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-31-2010 , 02:06   Re: need help with button...
Reply With Quote #6

Your topic title must be descriptive.
Fix it before posting again.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
drakeris
Senior Member
Join Date: Jul 2009
Old 05-31-2010 , 03:01   Re: End button help
Reply With Quote #7

im using bugsy method, and i just know saw that when i push E button it shows the text but i wanted that only if i push button that is called endbut
P.S.title edited
__________________
drakeris 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 05:26.


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