17.02.2019, 04:12
Hey! So my problem is pretty self explanatory cause the video but I'll explain it as much as I can. When I enter the CP the textdraws are made and the timer goes off at the same time which hides the textdraws after 5 seconds. Well its working fine, but when I enter twice in a row the second textdraw just dont disappear after 5 seconds. Here is some code:
Whats the best work-around for this problem? Thanks for the help in advance.
PHP код:
hook OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(pData[playerid][pGroup] == GROUP_TYPE_LAW)
{
if(checkpointid == checkpoint)
{
Law_VS_Pressy(playerid);
SetTimerEx("DLaw_VS_Pressy", 4000, 0, "i", playerid);
PlayerPlaySound(playerid,1150,1568.5251,-1610.2024,11);
}
}
return 1;
}
forward DLaw_VS_Pressy(playerid);
public DLaw_VS_Pressy(playerid)
{
TextDrawHideForPlayer(playerid, Law_VS_Pressy1);
TextDrawDestroy(Law_VS_Pressy1);
}