Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
How to refresh the playerlist linkedlist

 
Post new topic   Reply to topic Printable version
 View previous topic  Credits PLugin Post :: Post Duel bot help!  View next topic  
Author Message
the_snake
Guest


Offline

PostPosted: Thu Jul 19, 2007 6:06 am    Post subject: How to refresh the playerlist linkedlist Reply to topic Reply with quote

I was trying to have a mervbot keep track of scores with the player->score struct.
But as there is also a ?buy command available i found it impossible to have the bot display the correct scores after a ?buy was issued. It keeps showing the old score and just adds any new score to it.

Lets say that i had 400 points overall and spent 100 buying a rocket.
so now i have 300 points but the bot will display 400 for player->score
If i gain 200 more points, I will have 500 points, but bot will display 600.

If the bot rejoins the arena, the scores will be just fine, as it is probably refreshing the playerlist..

My question is if there is a way to refresh the list without actually rejoining the arena...

thanks,

-the_snake
Back to top
BugZap
Guest


Offline

PostPosted: Wed Aug 15, 2007 3:56 am    Post subject: Reply to topic Reply with quote

I used this to display the scores.

Code: Show/Hide
   case EVENT_PlayerScore:
      {
      Player *p = (Player*)event.p[0];
      
        sendPublic("*arena Player killScore: " + (String)p->score.killPoints);
        sendPublic("*arena Player flagScore: " + (String)p->score.flagPoints);
        sendPublic("*arena Player wins: " + (String)p->score.wins);
        sendPublic("*arena Player losses: " + (String)p->score.losses);
   
      }
      break;


p->score.flagPoints is being correctly updated after a ?buy
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 52 page(s) served in previous 5 minutes.

phpBB Created this page in 0.472066 seconds : 26 queries executed (89.5%): GZIP compression disabled