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(ent, id){
if(gfStartRun[id] <= 0.0)
return;
if(!gbFinished[id]){
Create_Box(id, ent);
gbFinished[id] = true;
fwFinished(id);
}
}
public fwTouch2(id, ent){
fwTouch(ent, id);
}
public fwTouch3(ent, id){
//Create_Box(id, ent);
gbFinished[id] = false;
fwStarted(id);
}
public fwTouch4(id, ent){
fwTouch3(ent,id);
}