SendClientMessage spamming the chat
#1

So, I made something that if the player targets actor and its robbed recently then the message comes as "This store has been robbed recently......."

but when I aim at the actor, the message is like spamming on the mainchat, how to make that message appear only once?

The code:
pawn Код:
public OnPlayerUpdate(playerid)
{
    new playerTargetActor = GetPlayerTargetActor(playerid);

    if(playerTargetActor != INVALID_ACTOR_ID)
    {
        if(baseactorrobbed >= 1 && robbingstore[playerid] == 0)
        {
        SendClientMessage(playerid, -1, "{1E90FF}[ERROR] {FFFFFF}This store has been robbed recently. Please try again later.");
        return 1;
        }
        return 1;
    }
The picture how it's spamming:
Reply


Messages In This Thread
SendClientMessage spamming the chat - by humayunaftabkhan02 - 06.05.2016, 11:40
Re: SendClientMessage spamming the chat - by cdoubleoper - 06.05.2016, 12:22
Re: SendClientMessage spamming the chat - by Dayrion - 06.05.2016, 12:31
Re: SendClientMessage spamming the chat - by MBilal - 06.05.2016, 12:33

Forum Jump:


Users browsing this thread: 2 Guest(s)