SA-MP Forums Archive
Dynamic3DTextLabel not destroying - 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: Dynamic3DTextLabel not destroying (/showthread.php?tid=663537)



Dynamic3DTextLabel not destroying - akib - 04.02.2019

Hello, I am having problem, whenever i try to destroy Dynamic3Dtext it doesn't destroy..

COde
PHP код:
UpdatePoint(id){
    new 
m[512];
    if(
PointInfo[id][point_text]){
        
DestroyDynamic3DTextLabel(PointInfo[id][point_text]);
    }
    if(
PointInfo[id][point_pickup]){
        
DestroyDynamicPickup(PointInfo[id][point_pickup]);
    }
    if(
PointInfo[id][capturedby]){
        
format(msizeof(m), "%s\nCaptured By %s"PointInfo[id][point_name],GetFamilyName(PointInfo[id][capturedbyf]));
        
printf("%s"m);
    }else{
        
format(msizeof(m), "%s\nAvailable"PointInfo[id][point_name]);
    }
    
PointInfo[id][point_pickup] = CreateDynamicPickup(125423PointInfo[id][point_pos][0],PointInfo[id][point_pos][1],PointInfo[id][point_pos][2], -1, -1, -130.0,-1,0);
    
PointInfo[id][point_text] = Create3DTextLabel(mCOLOR_YELLOWPointInfo[id][point_pos][0],PointInfo[id][point_pos][1],PointInfo[id][point_pos][2], 30.000);

Pickup destroying well but 3dtext doesn't

PHP код:
if(PointInfo[id][point_text]){
        
DestroyDynamic3DTextLabel(PointInfo[id][point_text]);
    } 
tried with debugger(printf)
if(PointInfo[id][point_text] -> it says point_text don't exist


Re: Dynamic3DTextLabel not destroying - UFF - 04.02.2019

it should be Delete3DTextLabel since you aren't creating a CreateDynamic3DTextLabal.
pawn Код:
if(PointInfo[id][point_text] != -1)
{
        Delete3DTextLabel(PointInfo[id][point_text]);
}



Re: Dynamic3DTextLabel not destroying - akib - 04.02.2019

Quote:
Originally Posted by UFF
Посмотреть сообщение
it should be Delete3DTextLabel since you aren't creating a CreateDynamic3DTextLabal.
pawn Код:
if(PointInfo[id][point_text] != -1)
{
        Delete3DTextLabel(PointInfo[id][point_text]);
}
ahh thanks didn't noticed that <3