Guys, can you help me ?
#1

Hello guys .. today i want to try make House system, basic one ..But i don't know how to make it on my own..

Okey , i defined :

pawn Код:
#define MAX_HOUSES 50
#define HDATA "/Houses/%s.ini"
Do i need to define where is my database for houses ?!

pawn Код:
enum hInfo
{
    hOwner[MAX_PLAYER_NAME],
    hOwned,
    hPrice,
    hInterior,
    Float:EnterX,
    Float:EnterY,
    Flota:EnterZ,
    Float:ExitX,
    Float:ExitY,
    Flota:ExitZ,
    hIcon,
    h3DTextLabel
}
new HouseCount;
new HouseInfo[MAX_PLAYER_HOUSE],[hInfo];
Is this good ?

Anyways my biggest problem is what to do next ?
I wanted to make /createhouse cmd , but then i realized that i don't know how to get Exit and Enter coordinates in the same time ..

p.s. Sorry for my bad English , if u didn't understand something ill try to explain better ..
Reply
#2

You're on the right track. Are you using MySQL or INI?

GetPlayerPos is one to get the coords.
Reply
#3

Thank you .. I'm using INI , i cant understand way of the MySQL works :/

Yes, but how can i be in the same time on two position ?! (When i cmd Createhouse , server will take Pos where i stand and write it in EnterPos XYZ ) and how i will take Exit ones ?!
Reply
#4

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

Maybe this can help.
Reply
#5

Use this when you are editing the enter position:
PHP код:
GetPlayerPos(playeridHouseInfo[houseid][EnterX], HouseInfo[houseid][EnterY], HouseInfo[houseid][EnterZ]); 
And than you can set the exit pos to any default coordinates.. And add a command for admins to set the exit coordinates.

And also, Please use proper title for the thread.
Don't use "Please Help" or any thing like that..The good title will be: "How to get the users position ?" so other people can find the thread when they need help easily.

To avoid any problems again, Make sure you read the rules here: http://forum.sa-mp.com/announcement.php?f=12
Reply
#6

@Mrki_Drakula
Thanks m8 it will help a lot when i find out how to make /createhouse cmd.
@Ahmad45123
Oh im sorry ,i changed topic name.. Hmm i will , but is there any way to get Enter and Exit positions in same time ?!

Lets say im going to create first house on my server, i stand in front of doors and i type /createhouse [price] [interiorid] , and server will make new file with coordinates where i stand (Enter X Y Z) .. I will enter in house, but i wont find Exit because i never saved Exit Position , did i ?!

Do i need to make something like Interior database where i will put Exit positions for all Interiors, so when i use /createhouse [price] [interiorid] script will take Exit positions from Interior database and write it in new house file ?!

Sorry i have no clear view on this system, i cant imagine what i need to do to make this work ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)