Raised This Month: $ Target: $400
 0% 

How to check if door func has been executed.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
danonix
Senior Member
Join Date: Dec 2012
Old 09-26-2014 , 12:45   How to check if door func has been executed.
Reply With Quote #1

Hello,
How to check if this function
PHP Code:
    new ent = -1
    
while((ent fm_find_ent_by_class(ent"func_door")))
    {                
        
dllfunc(DLLFunc_Useent0)
    } 
was executed already?
On jailbreak, I am using a native, which "open cells", but it doesn't include buttons on map, so some function is beeing executed only, if native is executed - but doesn't when buttons pressed.
I want to know if cells were opened already, or not.

If you don't understand, what I said, then I'd like to know, how to check, if cell-button was pressed on map on mod jailbreak.

Last edited by danonix; 09-26-2014 at 13:01.
danonix is offline
FromTheFuture
Senior Member
Join Date: Jan 2013
Old 09-26-2014 , 13:21   Re: How to check if door func has been executed.
Reply With Quote #2

HamUse + func_button?
FromTheFuture is offline
danonix
Senior Member
Join Date: Dec 2012
Old 09-26-2014 , 13:25   Re: How to check if door func has been executed.
Reply With Quote #3

But how to detect that I have pressed this one certain button, that open cells?
danonix is offline
FromTheFuture
Senior Member
Join Date: Jan 2013
Old 09-26-2014 , 13:47   Re: How to check if door func has been executed.
Reply With Quote #4

Quote:
Originally Posted by danonix View Post
But how to detect that I have pressed this one certain button, that open cells?
You need to detect one door(cell) only?
FromTheFuture is offline
danonix
Senior Member
Join Date: Dec 2012
Old 09-26-2014 , 16:23   Re: How to check if door func has been executed.
Reply With Quote #5

No, sometimes there are more than one cell, for example 15 for each player.
danonix is offline
FromTheFuture
Senior Member
Join Date: Jan 2013
Old 09-26-2014 , 16:34   Re: How to check if door func has been executed.
Reply With Quote #6

Code for detect/hook a button press.
PHP Code:
RegisterHam(Ham_Use"func_button""BlockUse")

public 
BlockUse(entidcalleridactivatoruse_typeFloat:value)
{
    if (
is_user_alive(idactivator)) 
    {     
                new 
szName[32];
                
get_user_name(idactivatorszName31);

                
client_print(0print_chat"%s have press on button"szName)     
    }   
    
    return 
HAM_IGNORED     

Don't know u need this or not.
FromTheFuture is offline
danonix
Senior Member
Join Date: Dec 2012
Old 09-26-2014 , 17:24   Re: How to check if door func has been executed.
Reply With Quote #7

Thanks, but I need to know, if this button is responsible for opening cells, because on jailbreak maps, there are a lot of buttons.

@ Got idea.

How to check then, that 2 functions were executed at same time? I mean right now, that someone pressed buttons, and then cells opened.

Last edited by danonix; 09-26-2014 at 17:32.
danonix is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 09-26-2014 , 17:55   Re: How to check if door func has been executed.
Reply With Quote #8

There are several public Jailbreak mods here on Alliedmods, that got these features.
__________________
Retired.
Xalus 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 19:57.


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