SA-MP Forums Archive
[Tutorial] [TUT]Creating Simple Buyable Houses! - 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] [TUT]Creating Simple Buyable Houses! (/showthread.php?tid=118379)

Pages: 1 2 3 4


Re: [TUT]Creating Simple Buyable Houses! - kmzr - 03.01.2010

Quote:
Originally Posted by kmzr
//edit.. ok so i used this instead: http://thekiller.pastebin.com/ff793d52
But i'm getting these errors.
Code:
C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\RP2.pwn(111) : error 021: symbol already defined: "Pname"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
fixed the strtok problem.
anyone?


Re: [TUT]Creating Simple Buyable Houses! - [03]Garsino - 03.01.2010

Quote:
Originally Posted by kmzr
Quote:
Originally Posted by kmzr
//edit.. ok so i used this instead: http://thekiller.pastebin.com/ff793d52
But i'm getting these errors.
Code:
C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\RP2.pwn(111) : error 021: symbol already defined: "Pname"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
fixed the strtok problem.
anyone?
http://thekiller.pastebin.com/m6206ee79

Replace the one you had with this one.


Re: [TUT]Creating Simple Buyable Houses! - Ehab1911 - 03.01.2010

Awesome, Thanks. But i don't understand it cuz im still pawno noob lol, hmm will you make some buyable houses for me IN LS. But [FS] please


Re: [TUT]Creating Simple Buyable Houses! - kmzr - 03.01.2010

Thanks, that worked. But for some reason it hasn't created:
Code:
\GTA San Andreas\scriptfiles\houses
and prints out "This house is up for sale, type /buy to buy it" like 20x maybe less maybe more lol.


Re: [TUT]Creating Simple Buyable Houses! - [03]Garsino - 03.01.2010

Quote:
Originally Posted by kmzr
Thanks, that worked. But for some reason it hasn't created:
Code:
\GTA San Andreas\scriptfiles\houses
and prints out "This house is up for sale, type /buy to buy it" like 20x maybe less maybe more lol.
Yeah, I had that too, reported it already.


Re: [TUT]Creating Simple Buyable Houses! - HydraX - 03.01.2010

Quote:
Originally Posted by kmzr
//edit.. ok so i used this instead: http://thekiller.pastebin.com/ff793d52
But i'm getting these errors.
Code:
C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\RP2.pwn(111) : error 021: symbol already defined: "Pname"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
fixed the strtok problem.
change it to a different variable

pname = change it to sname?


Re: [TUT]Creating Simple Buyable Houses! - [HiC]TheKiller - 03.01.2010

Quote:
Originally Posted by X Cutter
Seems greatly inspired by the house script by antironix

Great tuto, bit complicated for beginners though.
I haven't even seen the house system by antironix, this was written by scratch straight into this post.

Quote:
Originally Posted by [03
Garsino ]
Could you make a command to create houses easily?
Well, um, cant you just save the 2 positions with /save?

Quote:
Originally Posted by [03
Garsino ]
OK, so I replaced the parts in the script as you said in your post. But when I join server I get spammed by 500 messages "You Can Buy This House By Using /buy" etc..

Im not even in the checkpoint :#
Hold on, I'll try fix it :P.

Quote:
Originally Posted by HydraX
pawn Code:
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1258) : error 021: symbol already defined: "Pname"
Fixed

Quote:
Originally Posted by kmzr
//edit.. ok so i used this instead: http://thekiller.pastebin.com/ff793d52
But i'm getting these errors.
Code:
C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\RP2.pwn(111) : error 021: symbol already defined: "Pname"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
fixed the strtok problem.
Fixed

Quote:
Originally Posted by kmzr
Quote:
Originally Posted by kmzr
//edit.. ok so i used this instead: http://thekiller.pastebin.com/ff793d52
But i'm getting these errors.
Code:
C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts\RP2.pwn(111) : error 021: symbol already defined: "Pname"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
fixed the strtok problem.
Fixed

Also, for the \GTA San Andreas\scriptfiles\houses, I decided to change it just to Owners.ini in the scriptfiles because there was only 1 piece of data to save.


Re: [TUT]Creating Simple Buyable Houses! - HydraX - 04.01.2010

This is more of a strcmp bug but

pawn Code:
if (strcmp("/Buy", cmdtext) == 0)
pawn Code:
if (strcmp("/Sell", cmdtext) == 0)
pawn Code:
if (strcmp("/Enter", cmdtext) == 0)
pawn Code:
if (strcmp("/Exit", cmdtext) == 0)
change the following command

pawn Code:
if (strcmp("/buy", cmdtext, true, 10) == 0)
pawn Code:
if (strcmp("/sell", cmdtext, true, 10) == 0)
pawn Code:
if (strcmp("/enter", cmdtext, true, 10) == 0)
pawn Code:
if (strcmp("/exit", cmdtext, true, 10) == 0)
The Current one has to be typed exactly as shown in the script or else it will be an Unknown Command. the one I'm giving you should fix it.


Re: [TUT]Creating Simple Buyable Houses! - ToPhrESH - 17.07.2010

Quote:
Originally Posted by Unte99
View Post
1 question, when i buy a house, do a rr, and the house isn't mine anymore, i have to buy it again ? Because in my gm, when i buy a house, do a rr, i must buy it again that it would be mine, or the houses mix between players Its the same with the business. Or even better, is there something i can do, that after a server rr everything stays in their places.
how do we make houses with their puckups yo unever showed us


Re: [TUT]Creating Simple Buyable Houses! - Stefan_Toretto - 17.07.2010

very useful Thanks


Re: [TUT]Creating Simple Buyable Houses! - Smokey619 - 17.07.2010

how can i add a lock house command?


Re: [TUT]Creating Simple Buyable Houses! - Scenario - 17.07.2010

How efficient is it to do it this way? Will it work quickly?


Re: [TUT]Creating Simple Buyable Houses! - [HiC]TheKiller - 18.07.2010

It will work propperly but it isn't that great efficient wise.


Re: [TUT]Creating Simple Buyable Houses! - Scenario - 18.07.2010

Quote:
Originally Posted by [HiC]TheKiller
View Post
It will work propperly but it isn't that great efficient wise.
Oh, so it wouldn't be good for a server with a possible capacity of 300+ players? Okay... Can you make a tutorial on something that is completely efficient? Otherwise, nice tutorial!


Re: [TUT]Creating Simple Buyable Houses! - [HiC]TheKiller - 18.07.2010

Quote:
Originally Posted by RealCop228
View Post
Oh, so it wouldn't be good for a server with a possible capacity of 300+ players? Okay... Can you make a tutorial on something that is completely efficient? Otherwise, nice tutorial!
I'll make a MySQL one if enough people are keen for it?


Re: [TUT]Creating Simple Buyable Houses! - Unte99 - 18.07.2010

Could someone tell me what do i have to do that after a server rr the houses stay in places, dont switch between their owners, or just magicaly sell themselves.


Re: [TUT]Creating Simple Buyable Houses! - [HiC]TheKiller - 19.07.2010

Quote:
Originally Posted by Unte99
View Post
Could someone tell me what do i have to do that after a server rr the houses stay in places, dont switch between their owners, or just magicaly sell themselves.
Does the file Houses.txt or whatever it was save? If not you have something blocking sa-mp such as vista or windows 7. Make sure your firewall settings are to allow the sa-mp server and that your virus program allows it.


Re: [TUT]Creating Simple Buyable Houses! - Scenario - 19.07.2010

If your running a home server on Windows Vista or Windows 7 and your server root folder is on a "Local Disk", than it will need administrator rights to be able to right to the "disk". You can simply set the compatibly to run as administrator, in a lower version of Windows mode, or if you just right click it and select the run as administrator button, it will all do the same.


Re: [TUT]Creating Simple Buyable Houses! - multinfs - 13.11.2010

Quote:
Originally Posted by [03]Garsino
Посмотреть сообщение
Nice

But would be better with checkpoints :P
you know what? im using ur script and all i find is bugs! truckingmissions uses checkpoints and if you go too close to house then load point becomes the house enterance.


Re: [TUT]Creating Simple Buyable Houses! - iTorran - 28.11.2010

Can anyone help? I set house cost to 1000 but it says its 0