SA-MP Forums Archive
Textdraw bug? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Textdraw bug? (/showthread.php?tid=575491)



Textdraw bug? - SetPlayerNameTag - 27.05.2015

I got a script and there is a bug when I enter a checkpoint and the textdraw will be displayed and If I then leave the checkpoint and the textdraw will not be disabled and I have printed OnPlayerLeaveDynamicCP this callback out, it won't be called, could anyone tell me what bug it is?

Here is code.


Код:
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
    TextDrawHideForPlayer(playerid, TD_AD_HeadBox);
	TextDrawHideForPlayer(playerid, TD_AD_BoxTwo);
	TextDrawHideForPlayer(playerid, TD_AD_BoxThree);
	TextDrawHideForPlayer(playerid, TD_AD_BoxOne);
	TextDrawHideForPlayer(playerid, TD_AD_Seller);
	PlayerTextDrawHide(playerid, TD_AD_Price);
	PlayerTextDrawHide(playerid, TD_AD_CityZip);
	PlayerTextDrawHide(playerid, TD_AD_Headline);
	PlayerTextDrawHide(playerid, TD_AD_Taxes);
	PlayerTextDrawHide(playerid, TD_AD_PriceValue);
	PlayerTextDrawHide(playerid, TD_AD_TaxesValue);
	PlayerTextDrawHide(playerid, TD_AD_SellerValue);
	PlayerTextDrawHide(playerid, TD_AD_HousenumberStreet);
	PlayerTextDrawHide(playerid, TD_Mid_Info);
	return 1;
}



Re: Textdraw bug? - Luis- - 27.05.2015

Shouldn't you check to see what checkpoint the player is actually leaving?


Re: Textdraw bug? - SetPlayerNameTag - 27.05.2015

Quote:
Originally Posted by Luis-
Посмотреть сообщение
Shouldn't you check to see what checkpoint the player is actually leaving?
Yep, I have checked it they are working fine.


Re: Textdraw bug? - Toxik - 27.05.2015

mhm .. maybe you need add a new cp;
cp = IfPlayerInRangeOfPont ..... CP point
Show me OnPlayerEnterDynamicCp


Re: Textdraw bug? - SetPlayerNameTag - 28.05.2015

Quote:
Originally Posted by Toxik
Посмотреть сообщение
mhm .. maybe you need add a new cp;
cp = IfPlayerInRangeOfPont ..... CP point
Show me OnPlayerEnterDynamicCp
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{

TextDrawHideForPlayer(playerid, TD_AD_HeadBox);
TextDrawHideForPlayer(playerid, TD_AD_BoxTwo);
TextDrawHideForPlayer(playerid, TD_AD_BoxThree);
TextDrawHideForPlayer(playerid, TD_AD_BoxOne);
TextDrawHideForPlayer(playerid, TD_AD_Seller);
PlayerTextDrawHide(playerid, TD_AD_Price);
PlayerTextDrawHide(playerid, TD_AD_CityZip);
PlayerTextDrawHide(playerid, TD_AD_Headline);
PlayerTextDrawHide(playerid, TD_AD_Taxes);
PlayerTextDrawHide(playerid, TD_AD_PriceValue);
PlayerTextDrawHide(playerid, TD_AD_TaxesValue);
PlayerTextDrawHide(playerid, TD_AD_SellerValue);
PlayerTextDrawHide(playerid, TD_AD_HousenumberStreet);
PlayerTextDrawHide(playerid, TD_Mid_Info);
if(checkpointid = something)
{
....
}
return 1;
}