[FilterScript] [FS] v1.6e || Simple House System || 1 line = 1 house
#1

Name
Simple House System


Files:
aHouse.pawn
aHouse.amx

* a means Antironix


Info:
On a day i've maded my self a house system, but for twenty lines for each house, i started to make a simple system that will add a house with one line. And voila, i have created it.
Non bought houses are locked!


How to add houses:
1:
Put this line under public OnFilterScriptInit():

Code:
AddHouse(houseid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Cost, Sell, Interior, Virtualworld)
houseid: This starts always at 0!
icon- X/Y/Z: The housepickup infront of the door.(outside).
interior - X/Y/Z: The spawn place where you spawn as you enter the house.
Cost - The cost of the house.
Sell - If you sell the house, you get this value back.
Interior - The interior of your house.
Virtualworld - To make more rooms.
To make unique houses you must avoid that 2 AddHouses contain the same interior+Virtualworld world.

2:
Change MAX_HOUSES to the ammount of houses you have.


How to add housecars:
1:
Put this line under public OnFilterScriptInit():

Code:
AddHouseCar(houseid, modelid, Float:Carx, Float:Cary, Float:Carz, color1, color2, respawn_delay)
Just fill it in as normal. The houseid is for the house you want to be the car for.

2:
Want more cars?
Just edit #define MAX_BUY_CARS to the number of cars you have.
And edit this variable:

Code:
new Buyable_Cars[MAX_BUY_CARS][CarInfo] =
{
{411,"Infernus",50000},
{522,"NRG-500",50000},
{451,"Turismo",50000}
}
411=CarModel
"Infernus"=CarName that you have to use in /ordercar [carname]
50000=CarCost


Commands:
- /buy
- /sell
- /enter
- /exit
- /lock
- /unlock
- /home
- /rent
- /unrent
- /setrent [0/1] [Cost]
- /getrent
- /payrent
- /housestats
- /house
- /ordercar [carname]


Bugs:
None at the moment. Only the one I know


Example Houses:
AddHouse(0, 1442.9769,-629.5287,95.7186, 2317.8201,-1024.7500,1050.2109, 250000, 200000, 9, 0);
AddHouse(1, 1980.9896,-1719.0171,17.0304, 328.1465, 1478.4457,1084.4375, 200000, 150000, 15, 0);


Example Houses map:
Look at the red circles with the red arrow.
/imageshack/img171/4...osbribesw1.jpg


Download:
http://rapidshare.com/files/108023153/aHouse.rar
http://pastebin.com/f189fe528 <-- Fixed Pickups + Rent


Note:
- If you have done GMX, reload the fs.

Hope you like it.

Reply
#2

Im no RPG'er but i really like the sound of this! 1 line adds the house and does all the entering nd stuff? Well done, no doubt this will be very handy for people. also mabye add the native for AddHouse() to your post?

WeeDarr
Reply
#3

Native added
Reply
#4

has it got a map icon streamer cause i thought the limit was 32 or something?

WeeDarr
Reply
#5

wow ,nice work ! 10/10.
you can post more screens (how do it look outside etc..)

btw: when i started my scriptin career i collected all houses coordinates in LV ,ill just add em in now
(~300tk) + (100+tk in LS ! )

man your the best xD

going to test it asap.
Reply
#6

wht bout the pickup limit ? NVM

Quote:
Originally Posted by wiki
Pickup limit increased to 400.
who touches that limit, is either nuts and has no fckin limit OR has a fckin big RP or somethin like that

so, NICE Paul
Reply
#7

oh ,nice if its 400.

btw: commands : /buy ,/sell ,enter don't work (couldn't test exit )
Reply
#8

AddHouse(houseid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Cost, Sell, Interior)

how to know what interior to put?

and what to put here:houseid,
Float:iconX,
Float:iconY,
Float:iconZ,
Float:interiorX,
Float:interiorY,
Float:interiorZ

i'm not a good scripter
but will this house when u make it will it have housecar?
Reply
#9

no theres no house car.

what abt interiors - try to find them somewhere ,wiki ,forum. (i will search fort hem to ,if i will find - i will Post link here).
Reply
#10

houseid can be 1 , 2, 3, 4, 5, 6, 7, 8, 9 so when u do somethin with that house u have her ID
Reply
#11

ok then,but still i don\'t knwo what to do with this
Float:iconX,
Float:iconY,
Float:iconZ,
Float:interiorX,
Float:interiorY,
Float:interiorZ

with this iconx,y,z is that when u start debug and type /save and u get in savepositions AddPlayerStats or something?
but with interionx,y,z what with that?
Reply
#12

iconX, Y, Z .... ....

means the coordinates

then Interior x, y, z ... ...

means the Interior coordinates, like when u "enter" the house will set ur coordinates there AND dont forget the last number is the INTERIOR ID
Reply
#13

Quote:
Originally Posted by cmg4life
wht bout the pickup limit ? NVM

Quote:
Originally Posted by wiki
Pickup limit increased to 400.
who touches that limit, is either nuts and has no fckin limit OR has a fckin big RP or somethin like that

so, NICE Paul
thats pickups not icons -_-
Reply
#14

ok,i got that,now how can i know all interior IDs,lucky guess or...
Reply
#15

P. : LEARN TO USE WIKIPEDIA SA MP part


SNIPE:yea =)) i kno =)) ...

so =)))

the icon... err... im too lazy to look
Reply
#16

Quote:
Originally Posted by Luxeon[P7
]
oh ,nice if its 400.

btw: commands : /buy ,/sell ,enter don\'t work (couldn\'t test exit )
you need to add

Code:
dcmd(buy,3, cmdtext);
  dcmd(sell,4, cmdtext);
	dcmd(enter,5, cmdtext);
	dcmd(exit,4, cmdtext);
under your onplayercommandtext i think

WeeDarr
Reply
#17

Code:
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(21) : error 017: undefined symbol "dini_Exists"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(23) : error 017: undefined symbol "dini_Create"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(24) : error 017: undefined symbol "dini_Set"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(25) : error 017: undefined symbol "dini_IntSet"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(26) : error 017: undefined symbol "dini_IntSet"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(27) : error 017: undefined symbol "dini_IntSet"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(28) : error 017: undefined symbol "dini_Set"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(29) : error 017: undefined symbol "dini_FloatSet"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(30) : error 017: undefined symbol "dini_FloatSet"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(31) : error 017: undefined symbol "dini_FloatSet"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(17) : warning 203: symbol is never used: "Interior"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(17) : warning 203: symbol is never used: "Sell"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(17) : warning 203: symbol is never used: "Cost"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(17) : warning 203: symbol is never used: "interiorZ"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(17) : warning 203: symbol is never used: "interiorY"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(17) : warning 203: symbol is never used: "interiorX"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(47) : error 017: undefined symbol "dini_Get"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(47) : error 033: array must be indexed (variable "str1")
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(53) : error 017: undefined symbol "dini_Get"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\pawno\include\aHouse.inc(53) : error 033: array must be indexed (variable "str1")
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\gamemodes\Clemens.pwn(169) : warning 203: symbol is never used: "dcmd_buy"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\gamemodes\Clemens.pwn(169) : warning 203: symbol is never used: "dcmd_enter"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\gamemodes\Clemens.pwn(169) : warning 203: symbol is never used: "dcmd_exit"
C:\Documents and Settings\Clemens\Bureaublad\Clemens\' Real Life\gamemodes\Clemens.pwn(169) : warning 203: symbol is never used: "dcmd_sell"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


14 Errors.
Help?
Reply
#18

u need dini.
Reply
#19

Ok. Imma add it now.

EDIT: I add it, and still 14 errors!
Reply
#20

post em here:



btw:
for those who will add that 4 dcmd things (WeeDarr posted em) ,also add this:

#define dcmd(%1,%2,%3) if ((strcmp(%3, "/%1", true, %2+1) == 0)&&(((%3[%2+1]==0)&&(dcmd_%1(playerid,"")))||((%3[%2+1]==32)&&(dcmd_%1(playerid,%3[%2+2]))))) return 1


edit:
zomg man ,r u trying to compile it?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)