Updatehouse pickup's,MapIcons and 3dtext -
EvgeniyHostel1992 - 15.02.2018
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], 31, 0,-1,-1,-1,200.0);
hl[idx][hPickup] = CreatePickup(1273, 0, hl[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], 32, 0,-1,-1,-1,200.0);
hl[idx][hPickup] = CreatePickup(19522, 0, hl[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;
}
Re: Updatehouse pickup's,MapIcons and 3dtext -
EvgeniyHostel1992 - 16.02.2018
update
Re: Updatehouse pickup's,MapIcons and 3dtext -
GTLS - 16.02.2018
Didnt actually get the actual problem? Does it not update or what? and if it does updated, then when and how?
Also, you sure the coordinates are updated before you update?
Re: Updatehouse pickup's,MapIcons and 3dtext -
PepsiCola23 - 16.02.2018
show us the buy house command
Re: Updatehouse pickup's,MapIcons and 3dtext -
EvgeniyHostel1992 - 16.02.2018
PHP код:
CMD:changehpos(playerid, params[]){
new idx;
if(sscanf(params,"d", idx))return send(playerid, COLOR_GRAD1, "USAGE: /changehpos house");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
send(playerid,COLOR_GRAD1,"Äîì ïåðåíåñ¸í íà íîâóþ ïîçèöèþ");
hl[idx][hEnterx] = X;
hl[idx][hEntery] = Y;
hl[idx][hEnterz] = Z;
format(query1, sizeof(query1), "UPDATE `house` SET `Enterx` = '%2.f', `Entery` = '%2.f', `Enterz` = '%2.f' WHERE `hID` = '%d'", hl[idx][hEnterx],hl[idx][hEntery],hl[idx][hEnterz],hl[idx][hID]);
mysql_function_query(mysql_connect_ID, query1, false, "", "");
UpdateHouse(idx);
return true;}
Re: Updatehouse pickup's,MapIcons and 3dtext -
GTLS - 17.02.2018
try not to use %2.f while saving.
Re: Updatehouse pickup's,MapIcons and 3dtext -
EvgeniyHostel1992 - 18.02.2018
nothing changed