PDA

View Full Version : Prevent doubling messages on chat


zoom12
01-06-2012, 13:37
Hello. I made a plugin that hooks to player spawn, creates a timer, and after 10 seconds it calls a function:
public Action:timer_prot(Handle:timer, any:client)
{
prot[client] = false;
PrintToChat(client, "%c[SpawnProtection] %c%t", 0x03, 0x01, "announce");
}
How can I prevent it from doubling this message on chat? I mean, after 10 seconds from FIRST spawn it prints 2 messages, but on further spawns (on next round etc.) it prints only one message.