SA-MP Forums Archive
[HELP] House Owner - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] House Owner (/showthread.php?tid=177866)



[HELP] House Owner - NotoriousMOB - 19.09.2010

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++;
        }



Re: [HELP] House Owner - prez_jake - 19.09.2010

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




Re: [HELP] House Owner - NotoriousMOB - 19.09.2010

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.


Re: [HELP] House Owner - prez_jake - 19.09.2010

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


Re: [HELP] House Owner - DRIFT_HUNTER - 19.09.2010

You must create 3d text label...


Re: [HELP] House Owner - prez_jake - 19.09.2010

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


Re: [HELP] House Owner - NotoriousMOB - 19.09.2010

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


Re: [HELP] House Owner - NotoriousMOB - 19.09.2010

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


Re: [HELP] House Owner - Mike_Peterson - 19.09.2010

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


Re: [HELP] House Owner - NotoriousMOB - 19.09.2010

alright thank you.