SA-MP Forums Archive
[Tutorial] Make your own house system (with vehicles) - 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: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Make your own house system (with vehicles) (/showthread.php?tid=179206)

Pages: 1 2 3 4


Re: Make your own house system (with vehicles) - ••• ĤБĶБM ••• - 08.11.2010

Make it Dynamic (In other words, make administrators able to create sell-able houses instead of doing that in scriptfiles which a little bit takes ages.)


Re: Make your own house system (with vehicles) - sjvt - 08.11.2010

I know the script, and you forget some functions

First

1. The split.
2. The mapicon include


Re: Make your own house system (with vehicles) - Kwarde - 08.11.2010

Quote:
Originally Posted by sjvt
View Post
I know the script, and you forget some functions

First

1. The split.
2. The mapicon include
Quote:
Originally Posted by Kwarde
There where some functions, that aren't builded in SA:MP standard, so they are here: http://www.rpdsamp.nl/other/sampforu...ousesystem.txt
I didn't forget those
But whatever, if I had forgotten it, thanks for saying it :P


Re: Make your own house system (with vehicles) - sjvt - 08.11.2010

Haha i'm sorry, i thought it + i didnt download it because i don't like .cfg :P MySQL FTW


Re: Make your own house system (with vehicles) - Kwarde - 08.11.2010

Quote:
Originally Posted by sjvt
View Post
Haha i'm sorry, i thought it + i didnt download it because i don't like .cfg :P MySQL FTW
MySQL FTW indeed
But I don't know how to get a SQL host :$
I am always using Hosts, so I can't just use "localhost"
But whatever,
To everyone by who the server is crashing:
Do you have the Houses.cfg?
Like I said, you need to make it yourself :O (read the tutorial exactly :P)


Re: Make your own house system (with vehicles) - CSMajor - 08.11.2010

I is confused, how to add houses

Sory for my bad English


Re: Make your own house system (with vehicles) - DaneAMattie - 09.11.2010

Quote:
Originally Posted by CSMajor
View Post
I is confused, how to add houses

Sory for my bad English
just start the game, type /savehouses (or so that command to save all houses)

then you see in the scriptfiles folder a houses.cfg or so, open it and you see 0,0.0000,0.000 etc

now that is just the same following as the house info's so the first character is the ID, then the X cord's after the first ',' etc


Re: Make your own house system (with vehicles) - Kwarde - 11.11.2010

public OnPlayerDisconnect(playerid)
{
//Set everything to 0 etc
}

It ain't a bug, I just didn't add it; I was tired of typing everything xD


Re: Make your own house system (with vehicles) - DaneAMattie - 11.11.2010

lolol its still not working, i still can sell unbought houses so free money xD

try something that if the house isnt bought (so unbought) then it returns 1 so return 1;


Re: Make your own house system (with vehicles) - Kwarde - 11.11.2010

pawn Code:
dcmd_sellhouse(playerid, params[])
{
    #pragma unused params
   
    for(new h = 0; h < MAX_HOUSES; h++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2, HouseInfo[h][hEntrancePosX], HouseInfo[h][hEntrancePosY], HouseInfo[h][hEntrancePosZ]))
        {
            new pName[MAX_PLAYER_NAME],string[128];GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
            if(!strcmp(HouseInfo[h][hOwner], pName, false) && HouseInfo[h][hOwned] == 1) //You have to be the owner of the house ;) (the only problem is, if you are using someone elses name, you can sell it too, but you can integrate this script with another script of course ;)
            {
                HouseInfo[h][hOwned] = 0;
                strdel(HouseInfo[h][hOwner], 0, strlen(HouseInfo[h][hOwner]));
                GivePlayerMoney(playerid, (HouseInfo[h][hPrice]/2)); //Let's return the half of the price
                DestroyMapIcon(HOUSE_ICON[h]); DestroyPickup(HOUSE_PICKUP[h]);
                HOUSE_ICON[h] = CreateMapIcon(31, 0, HouseInfo[h][hEntrancePosX], HouseInfo[h][hEntrancePosY], HouseInfo[h][hEntrancePosZ]);
                HOUSE_PICKUP[h] = CreatePickup(1272, 1, HouseInfo[h][hEntrancePosX], HouseInfo[h][hEntrancePosY], HouseInfo[h][hEntrancePosZ]);
                format(string, sizeof(string), "** %s has selled a house", pName);
                SendClientMessageToAll(0x00FF00AA, string);
                SaveAllHouses();
                return 1;
            }
            else return SendClientMessage(playerid, 0xFF0000AA, "** You can only sell your own houses ;)");
        }
    }
    return 1;
}
And this? I don't have time to compile/test it xD


Re: Make your own house system (with vehicles) - DaneAMattie - 11.11.2010

Good job man, it worked thanks for taking the time to fix this


Re: Make your own house system (with vehicles) - Kwarde - 11.11.2010

No problem, I saw it was easy xD
I'll update it as soon as possible (the first message of this topic)
And by the way, thank you for reporting it


Re: Make your own house system (with vehicles) - DaneAMattie - 11.11.2010

omg new bug, cuz of your house system i can create any new map icons with SetPlayerMapIcon :/ any fix?

EDIT:

nvm i fixed


Re: Make your own house system (with vehicles) - TheHoodRat - 12.11.2010

It looks really similar to TheKiller's system...

https://sampforum.blast.hk/showthread.php?tid=118379


Re: Make your own house system (with vehicles) - Jantjuh - 17.11.2010

eyy,

very good tutorial!
very detailed
very nice

-J


Re: Make your own house system (with vehicles) - sjvt - 17.11.2010

Quote:
Originally Posted by TheHoodRat
View Post
It looks really similar to TheKiller's system...

https://sampforum.blast.hk/showthread.php?tid=118379
But it's not its denver but then edited


Re: Make your own house system (with vehicles) - doreto - 25.11.2010

whe i put download mod on servar and start servar servar is crash me pls help me


Re: Make your own house system (with vehicles) - Ricardo187 - 12.12.2010

I want to use it on my Deveployement GM but it give mutch errors when i try to "instal" on GameMode and when i try use like Filter Script server don't start! Mybe this is some noob think i didn't do but by the way i hope you can help me!


Re : Make your own house system (with vehicles) - pseudonyme - 11.08.2012

You should use Djson to have only one file for all your houses.


Re: Make your own house system (with vehicles) - Qur - 11.08.2012

Enjoy your holiday,

anyone could help set this system to Yini?

I'm almsot done.. but the only problem is this lines in /buyhouse /sellhouse:

pawn Code:
SaveHouse(playerid);
                LoadHouseVisual(playerid, true);
which giving me undefined symbols errors...

pawn Code:
cgrp.pwn(589) : error 017: undefined symbol "DestroyDynamicPickup"
cgrp.pwn(593) : error 017: undefined symbol "CreateDynamicPickup"
cgrp.pwn(597) : error 017: undefined symbol "CreateDynamicPickup"
cgrp.pwn(605) : error 017: undefined symbol "ini_FloatSet"
cgrp.pwn(606) : error 017: undefined symbol "ini_FloatSet"
cgrp.pwn(607) : error 017: undefined symbol "ini_FloatSet"
cgrp.pwn(608) : error 017: undefined symbol "ini_FloatSet"
cgrp.pwn(609) : error 017: undefined symbol "ini_FloatSet"
cgrp.pwn(610) : error 017: undefined symbol "ini_FloatSet"
cgrp.pwn(611) : error 017: undefined symbol "ini_IntSet"
cgrp.pwn(612) : error 017: undefined symbol "ini_IntSet"
cgrp.pwn(613) : error 017: undefined symbol "ini_IntSet"
cgrp.pwn(614) : error 017: undefined symbol "ini_IntSet"
cgrp.pwn(615) : error 017: undefined symbol "ini_BoolSet"
cgrp.pwn(616) : error 017: undefined symbol "ini_Get"
cgrp.pwn(617) : error 017: undefined symbol "ini_IntSet"

anyone?

btw.. i have Yini.. i'm using it for the register/login system