[HELP] House Owner
#1

Hey im trying to make "OWNED BY "NAME" when a house is owned so it shows up on the house icon
im not sure what im doing wrong here:

Код:
^        if(HouseInfo[h][hOwned] == 0)
        {
            format(string1, sizeof(string), "[SALE]\n$ %d",HouseInfo[h][hValue]);
            housesale = Create3DTextLabel(string1,0x006400FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,15,0,1);
            AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
            pickups++;
        }
        if(HouseInfo[h][hOwned] == 1)
        {
            format(string1,sizeof(string),"OWNED BY %d", HouseInfo[h][hOwner],HouseInfo[h][hWorld], HouseInfo[h][hRent], HouseInfo[h][hDiscription]);
            AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
            pickups++;
        }
Reply
#2

what are you exacly asking because if you have a command /buyhouse then does
Quote:

new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
HouseInfo[houseid][hOwner] = name

Reply
#3

I mean like outside on the House Icon
i wan't the players names to show up and "OWNED BY" when they buy the house.
Reply
#4

it should work then already
unless you mean a 3d text label because that makes more sceas then lol
Reply
#5

You must create 3d text label...
Reply
#6

oh i get it now you do it like this lol
Quote:

format(PropertyString,sizeof(PropertyString),"Hous e is Owned by %s \n House ID: %d \n Rent Price: $%d \n Description: %s \n To Rent Type /rentroom", HouseInfo[h][hOwner],HouseInfo[h][hWorld], HouseInfo[h][hRent], HouseInfo[h][hDiscription]);
Create3DTextLabel(String1 ,0x00FFFFAA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, 0, 1);

or just add
Quote:

Create3DTextLabel(string1,0x00FFFFAA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, 0, 1);

under it
Reply
#7

Heey i got the TextLabel done now
but it still doesent show player's name it says "OWNED BY 78" xD

i think its the "%d" what shall i change that to
Reply
#8

I made it work!
thank's for the help guys
Reply
#9

lil tip: i thought if u do %d it will come out as playerid
if u do %s it will come out as playername but also alot of other things too.
dno the page where it gets explained :P
Reply
#10

alright thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)