The online racing simulator
[HELP]Insim spams message
Hello i've got a problem with my InSim application.

I'm making an Place that show's something like bank, but i have the button: WITHDRAWN and i programmed it to delete all buttons and appaer intructions saying what should make etc...

But that another buttons delete for 1 sec and appaer again and the instructions appaer too :S

Please can someone solve? I tried to add a message, so i go to place i stop and this message SPAM'S a lot. When i get out of this place this message stop.


Please help.
Quote from impresora :Hello i've got a problem with my InSim application.

I'm making an Place that show's something like bank, but i have the button: WITHDRAWN and i programmed it to delete all buttons and appaer intructions saying what should make etc...

But that another buttons delete for 1 sec and appaer again and the instructions appaer too :S

Please can someone solve? I tried to add a message, so i go to place i stop and this message SPAM'S a lot. When i get out of this place this message stop.


Please help.

Are you actually British? Terrible Engrish.
No i'm not, and sorry for bad english.

Please, helpme.
Spam :s
Something is wrong with your app's logic. It looks like it's sending the commands over and over in the main loop. It's impossible to tell you exactly what's wrong until you show us some code.
Code:

InSim.Send_BTN_CreateButton("", Flags.ButtonStyles.ISB_DARK, 80, 100, 50, 50, 180, Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID, 2, true);
InSim.Send_BTN_CreateButton("^0[^4DDR^0]^7BANK", Flags.ButtonStyles.ISB_LIGHT, 10, 100, 50, 50, 181, Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID, 2, true);

lol using MCI to get those messages

MCI updates every 500ms or customized time so probably it messes your insim code
The code for the button itself looks OK to me, but that's not the issue here. Am I correct assuming that your app is doing something like this?

while(true) {
foreach(i in players) {
if (IsPlayerInTheBank(players[i])) {
SendButtons();
}
}
}

Your app has to remember that the player has entered the bank, send those buttons only once and then wait until the player leaves the bank.

FGED GREDG RDFGDR GSFDG