Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function count_pawns()
- {
- local int basecnt,i,tempilit;
- local scriptedpawn s_pawn;
- local bool befound;
- local initpawnlist initlist[200];
- basecnt = 0;
- foreach AllActors(Class'scriptedpawn',s_pawn)
- {
- if ( s_pawn != None )
- {
- befound = false;
- basecnt=(basecnt+1);
- // if the entry existes , increment
- For( i = 0; i < 200 ; i++ )
- {
- if(string(s_pawn.class) == initlist[i].pawnname && !befound)
- {
- befound = true;
- initlist[i].pawncount++;
- //dbobject.addintvalue("test" , initlist[i].pawnname);
- }
- }
- if (!befound)
- {
- // if we look and didnt find
- For( i = 0; i < 200 ; i++ )
- {
- if (initlist[i].pawnname == "" && !befound)
- {
- initlist[i].pawnname = string(s_pawn.class);
- //dbobject.addintvalue("test" , initlist[i].pawnname);
- befound = true;
- initlist[i].pawncount++;
- }
- }
- }
- }//none
- }//for
- //our counting was done!
- tempp.ClientMessage(txtclr() $ "Monstercount is " $ basecnt $ " enities");
- Log(" Monstercount is " $ basecnt $ " enemy enity",stringtoname("[Essentials]"));
- //Log("Spread:",'MobManager');
- // Dump the spread
- For( tempilit = 0; tempilit < 200 ; tempilit++ )
- {
- if ( initlist[tempilit].pawnname != "")
- {
- if (initlist[tempilit].pawncount < 10)
- {
- tempp.ClientMessage(txtclr() $"Found 0" $ initlist[tempilit].pawncount $ " Of Entity " $ initlist[tempilit].pawnname);
- }else{
- tempp.ClientMessage(txtclr() $"Found " $ initlist[tempilit].pawncount $ " Of Entity " $ initlist[tempilit].pawnname);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement