==--==PROBLEM WITH 3DTEXT LABEL UPDATE==--==
#1

Hi all.
I make system on my server 3dlabels on the all houses.
This system put 3dlabels on all houses with house number and house price.
When you buy house on the house been 3dlabel with house id and your name.
But I have problem now with house sale,when i sell house anyway write house owner Name
i need help with that.
I want to do,when I sell house 3D LABEL Been Updated And Write not owner name but house price and id.
If someone can help me please help i try everything..

This Is The Code Of My House Sale:

Код:
if(!strcmp(cmdtext, "/sellhouse", true))
		{
            if(!strcmp(houseDB[GetPlayerVirtualWorld(playerid)][owner_name],"no",true))
			{
				SendClientMessage(playerid,COLOR,"* This house not your.");
				return 1;
			}
			if(GetPlayerScore(playerid) < 3500)
            {
               SendClientMessage(playerid,0xD9E916FF,"* Your xp to low (3500XP)");
               return 0;
            }
			new msg[128];
		   	new mokestis = houseDB[GetPlayerVirtualWorld(playerid)][nkaina]-50000;
		    format(msg,sizeof(msg),"You sell your house %i $.",mokestis);
		    SendClientMessage(playerid,COLOR,msg);
		    GivePlayerMoneyA(playerid,mokestis);
		    SetPlayerScore(playerid,(GetPlayerScore(playerid)-80)-random(80));
			strmid(houseDB[GetPlayerVirtualWorld(playerid)][owner_name],"no",0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
			format(msg,sizeof(msg),"saves/house/%i",GetPlayerVirtualWorld(playerid));
			if(fexist(msg)) dini_Remove(msg);
           new text[128];
           format(text,sizeof(text),"House {00FF00}%i{FFFFFF} Number\n{FFFFFF} House For Sale!\nPrice: {00FF00}%i $",house,houseDB[house][nkaina],houseDB[house][setting]);
           Update3DTextLabelText(houseDB[house][housetext],COLOR_WHITE,text);{
		   return 1;
		   }}
But i always get 2 errors:

Код:
error 017: undefined symbol "house"
error 017: undefined symbol "house"
What can be wrong?
Reply
#2

pawn Код:
new house = GetPlayerVirtualWorld(playerid);
That's what you need by the looks of it and comparing the code to the top row where you are just using the virtual world to find what house ID it is. There is a few other errors in the coding. If someone actually has the name 'no' then they will own most houses. You also should never return 0 inside a command because it will return that it's a server unknown command.
Reply
#3

Working!!!!

Thanks man very much you are good man

But can you tell my.With my code everything good ?
I want to say or in code is no problem its good ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)