18 lines
526 B
Plaintext
18 lines
526 B
Plaintext
|
//set_trespass
|
||
|
void main()
|
||
|
{
|
||
|
object oArea=OBJECT_SELF;
|
||
|
string sID=GetLocalString(oArea,"sTeamID");
|
||
|
object oEnter=GetEnteringObject();
|
||
|
string sEID=GetLocalString(oEnter,"sTeamID");
|
||
|
object oMod=GetModule();
|
||
|
string sPrefix="nAITrespass"+sID+"_";
|
||
|
int nCount;
|
||
|
if (GetStringLength(sEID)>2&&sID!=sEID&&!GetIsPC(oEnter))
|
||
|
{ // this is a trespasser
|
||
|
nCount=GetLocalInt(oMod,sPrefix+sEID);
|
||
|
nCount++;
|
||
|
SetLocalInt(oMod,sPrefix+sEID,nCount);
|
||
|
} // this is a trespasser
|
||
|
}
|