Raised This Month: $ Target: $400
 0% 

register touch problem,two players touching the same entity in the same time


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mrshark45
Member
Join Date: Jan 2016
Old 11-23-2018 , 07:21   register touch problem,two players touching the same entity in the same time
Reply With Quote #1

I made an entity and I want to call a function everytime a player touches it , but if two players touch it in the same time the function will not be called,how can I deal with this?




PHP Code:
    register_touch(gszFinish"player""fwTouch");
    
register_touch("player"gszFinish"fwTouch2");
    
register_touch(gszStart"player""fwTouch3");
    
register_touch("player"gszStart"fwTouch4");


public 
fwTouch(entid){
    if(
gfStartRun[id] <= 0.0)
        return;
        
    if(!
gbFinished[id]){
        
Create_Box(ident);
        
gbFinished[id] = true;
        
fwFinished(id);
    }
    
}
public 
fwTouch2(ident){
    
fwTouch(entid);
}
public 
fwTouch3(entid){
        
//Create_Box(id, ent);
        
gbFinished[id] = false;
        
fwStarted(id);
}

public 
fwTouch4(ident){
    
fwTouch3(ent,id);

mrshark45 is offline
 



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 07:29.


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