06.05.2016, 11:40
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:
The picture how it's spamming:
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;
}
