How to destroy PCs henchman on client leave?
I tried add a tag when creating the henchmans with the PC name:
object oPC = GetPCSpeaker();
CreateObject(..., "hen_"+GetName(oPC));
and on client leave this code:
object oPC = GetExitingObject();
object oHenchman = GetObjectByTag("hen_"+GetName(oPC));
if(oHenchman != OBJECT_INVALID) DestroyObject(oHenchman);
This didn't work because there is players with TWO names like (White Tiger) and the space beetwen White and Tiger does not match to search for tags
the tag is: "hen_WhiteTiger"
and I search for "hen_White Tiger" does not work