Updatehouse pickup's,MapIcons and 3dtext
#1

When moving the house (FIRST time) - the pickup is not transferred, (it is transferred SECOND TIME, created in a new place and DOES NOT disintegrate on the old one).
The house icon at the time of purchase is deleted immediately and transferred to a new location, but it is not always updated when purchasing, remains old.
3dTEXT is not deleted in the old place and is not created in a new place.
i from ukraine, bad writing in english
code >
PHP код:
stock UpdateHouse(idx)
{
    
DestroyDynamicMapIcon(hl[idx][hMapIcon]);
    
DestroyPickup(hl[idx][hPickup]);
    
DestroyDynamic3DTextLabel(htext[idx]);
    if(
hl[idx][hOwned]==0)
    {
        
hl[idx][hMapIcon] = CreateDynamicMapIcon(hl[idx][hEnterx], hl[idx][hEntery], hl[idx][hEnterz], 310,-1,-1,-1,200.0);
        
hl[idx][hPickup] = CreatePickup(12730hl[idx][hEnterx], hl[idx][hEntery], hl[idx][hEnterz]);
        
format(hstr2,sizeof(hstr2),"ID: %d - %s\nLevel:%d\nHouseName:%d $",hl[idx][hID],hl[idx][hOwner],hl[idx][hLevel],hl[idx][hPrice]);
        
Update3DTextLabelText(htext[idx],COLOR_BLUE,hstr2);
    }
    else
    {
        
hl[idx][hMapIcon] = CreateDynamicMapIcon(hl[idx][hEnterx], hl[idx][hEntery], hl[idx][hEnterz], 320,-1,-1,-1,200.0);
        
hl[idx][hPickup] = CreatePickup(195220hl[idx][hEnterx], hl[idx][hEntery], hl[idx][hEnterz]);
        
format(hstr2,sizeof(hstr2),"ID: %d\nHouseName:%s",hl[idx][hID],hl[idx][hOwner]);
        
Update3DTextLabelText(htext[idx],COLOR_LIGHTRED,hstr2);
    }
    return 
true;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)