help with message
#1

hey guys i have a f**** error
pawn Код:
public ExportStart()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    SetPlayerCheckpoint(i, -1539.262817, 133.987518, 2.613937, 8);
    SendClientMessageToAll(YELLOW, "[CAR-EXPORT]:We need some cars (/carlist)");
    SetTimer("GatesOpen", 3000, 0);
    }
  return 1;
}
the Message to all comes 100 (maybe) times why
Reply
#2

pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
  SendClientMessageToAll(YELLOW, "[CAR-EXPORT]:We need some cars (/carlist)");
}
now translated: a message is sent to everyone, 200 times in that loop (i <0-200>), so you need to move the message sending bit out of the loop
Reply
#3

Or you can just do SendClientMessage(i, YELLOW, "your msg");
Reply
#4

Quote:
Originally Posted by [M2S
moe ]
Or you can just do SendClientMessage(i, YELLOW, "your msg");
i fixed it ...
Reply
#5

Hope you took the SetTimer out of there also
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)