[Tutorial] Make your own house system (with vehicles)
#21

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.)
Reply
#22

I know the script, and you forget some functions

First

1. The split.
2. The mapicon include
Reply
#23

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
Reply
#24

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

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)
Reply
#26

I is confused, how to add houses

Sory for my bad English
Reply
#27

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
Reply
#28

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
Reply
#29

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;
Reply
#30

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
Reply
#31

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

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
Reply
#33

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

EDIT:

nvm i fixed
Reply
#34

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

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

eyy,

very good tutorial!
very detailed
very nice

-J
Reply
#36

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
Reply
#37

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

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!
Reply
#39

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

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
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)