02/10/2025 21:43
usando a função tickcount
Código:
new
casa,
contagem[MAX_PLAYERS]
;
public OnGameModeInit()
{
casa = CreatePickup(1274, 1, 0.0, 0.0, 3.0, 1);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == casa)
{
if(tickcount() <= contagem[playerid])
return 0;
contagem[playerid] = tickcount() + 5000;
SendClientMessage(playerid, -1, "Pressione a tecla 'F' para adentrar a casa!");
return 1;
}
return 1;
}