SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 27/06/2014, 06:19 AM   #1
JonathanW
Huge Clucker
 
JonathanW's Avatar
 
Join Date: May 2014
Location: Montgomery Trailers, Red County.
Posts: 366
Reputation: 53
Default Dynamic Housing [Scratch]




Today,I'll be releasing my DYNAMIC HOUSING system.It's from Scratch and has many features.Let's continue with this thingy.

Features

Saving These Variables.
Code:
[HOUSE INFO]
Owner,
Owned,
Price,
Float: EnterX,
Float: EnterY,
Float: EnterZ,
Float: EnterA,
Float: ExitX,
Float: ExitY,
Float: ExitZ,
Float: ExitA,
EnterInt,
EnterVW,
ExitInt,
ExitVW,
Money,
Text3D: Label,
PickupID,
Locked
[PLAYER INFO]
House Owner,
House Key
Commands


Code:

/createhouse [level] - [L1 - L2 - L3 - L4]
/deletehouse [HouseID] - Deletes a Selected House ID
/edithloc [houseid] - Sets an House Exterior to your Current Pos
/edithprice [HouseID] [Price] - Sets the price of an house
/sethmoney [houseID] [Amount] - Sets a house ID's Vault money
Player Commands
/buy - Stand near a House Icon(Buys a house)
/sell - Stand near your house(Sells . It gives you 50% of the money)
/lock - Stand near your house(Locks)
/putmoney [amount] - self explanatory
/takemoney [amount] - self explanatory
/knock - Stand near a House and the person inside the house will get a message
/shout [text] - To Shout from outside a House
Screenshots


/createhouse


/deletehouse


/buyhouse


Lock




/sellhouse


NEW NEW NEW
/knock


/shout


[NOTE]: When you sell a house,it gives you 50% of the total money you bought if for.To edit it,edit "#define SELLPERCENT 50" to your needs
Credits
SAMP - For Samp? (For the addiction xD)


How to Install?

- Use the Pawn File from the Download Link,provided below.
- Create a Folder "Users" and "Houses" in scriptfiles.
- Add the filterscript in 'server.cfg'.
- Login as RCON ADMIN.
- Enjoy

Downloads


Pastebin (Version 1)

Pastebin (Version 2)

Solidfiles

__________________

I left Samp. The world is beautiful, just so beautiful, but shit, it took me quite a bit to realize it.

Last edited by JonathanW; 29/06/2014 at 02:28 PM.
JonathanW is offline   Reply With Quote
Old 27/06/2014, 06:31 AM   #2
KayJ
Gangsta
 
KayJ's Avatar
 
Join Date: Apr 2014
Posts: 678
Reputation: 64
Default Re: Dynamic Housing [Scratch]

Awesome! +rep
Keep it up
KayJ is offline   Reply With Quote
Old 27/06/2014, 06:51 AM   #3
AviPeker
Big Clucker
 
AviPeker's Avatar
 
Join Date: Apr 2014
Location: Home :)
Posts: 87
Reputation: 9
Default Re: Dynamic Housing [Scratch]

Very Nice!
AviPeker is offline   Reply With Quote
Old 27/06/2014, 07:51 AM   #4
Nitin
Little Clucker
 
Join Date: Dec 2012
Location: Over there, over there!!
Posts: 35
Reputation: 0
Default Re: Dynamic Housing [Scratch]

Awesome, Good efforts.
__________________
om nom nom
Nitin is offline   Reply With Quote
Old 27/06/2014, 09:13 AM   #5
Mark_Samp
Huge Clucker
 
Mark_Samp's Avatar
 
Join Date: Oct 2012
Posts: 331
Reputation: 30
Default Re: Dynamic Housing [Scratch]

Good job
maybe you can try to add House Icon on map
__________________
Quote:
Originally Posted by Tvietnam View Post
Hello all members in forum.sa-mp.com .
I would like to introduce myself tiny in.
I was the first person in Vietnam . sociable fun like especially like looking inquisitive learning . I posted this article so that you can only create one people to recognize me for Samp . Hope you can only thanks very much
because I am the one who should not fluent in Vietnam of your country , so I have to use the ****** translation tool . What if there is no proper word or not , please ignore
Mark_Samp is offline   Reply With Quote
Old 27/06/2014, 09:22 AM   #6
JonathanW
Huge Clucker
 
JonathanW's Avatar
 
Join Date: May 2014
Location: Montgomery Trailers, Red County.
Posts: 366
Reputation: 53
Default Re: Dynamic Housing [Scratch]

Hm...Good idea.
Thanks Guys!
__________________

I left Samp. The world is beautiful, just so beautiful, but shit, it took me quite a bit to realize it.
JonathanW is offline   Reply With Quote
Old 27/06/2014, 09:33 AM   #7
Excel™
Gangsta
 
Excel™'s Avatar
 
Join Date: Jul 2012
Posts: 548
Reputation: 95
Default Re: Dynamic Housing [Scratch]

Bad idea:
pawn Code:
stock Showlock(playerid)
{
    new txdstring[128];
    format(txdstring, sizeof(txdstring), "Locked");
    TextDrawSetString(boxtext, txdstring);
    TextDrawShowForPlayer(playerid, Box);
    TextDrawShowForPlayer(playerid, boxtext);
    SetTimerEx("HideTextdraws", 4000, false, "i", playerid);
    return 1;
}

Why the usage of string "txdstring", where you could make that even without it. Here you go:
pawn Code:
stock Showlock(playerid)
{
    TextDrawSetString(boxtext, "Locked");
    TextDrawShowForPlayer(playerid, Box);
    TextDrawShowForPlayer(playerid, boxtext);
    SetTimerEx("HideTextdraws", 4000, false, "i", playerid);
    return 1;
}

Secondly the textdraw "new Text:Statement;" must be a Player textdraw, Its because it may be irritating for users. If multiple users use 2 different commands that have usage of this textdraw, then its collapsing.

Third thing is that everywhere you have made usage of "formats" by creating string and so on.
just like this one:
pawn Code:
format(txdstring, sizeof(txdstring), "Locked");
Instead you could simply use TextDrawSetString.

* Actually must be a PlayerTextDraw.

Here, SetTimerEx("HideTextdraws", 4000, false, "i", playerid);, this timer, What if this timer is callback again after 2000 ms. You know, the text will disappear after 2000ms instead of 4000ms and after continuous interals, for some reason, it will be hided. So you need to have a variable for the timer and also KillTimer before setting it.

No unloading of houses or i may say no resetting of vars and destroying the 3Dtexts,mapicons,.....


>> This is some of the things i noticed were wrong. (just got quick through your code)
So i may say, you must correct it.
__________________
NO MORE CODING SAMP :V
JUST PLAYING...
Excel™ is offline   Reply With Quote
Old 27/06/2014, 10:11 AM   #8
JonathanW
Huge Clucker
 
JonathanW's Avatar
 
Join Date: May 2014
Location: Montgomery Trailers, Red County.
Posts: 366
Reputation: 53
Default Re: Dynamic Housing [Scratch]

Thank you very much.In Version 2,I'll fix it.Plus I never actually knew that String of a Textdraw can be set directly.
Thanks!
__________________

I left Samp. The world is beautiful, just so beautiful, but shit, it took me quite a bit to realize it.
JonathanW is offline   Reply With Quote
Old 27/06/2014, 10:51 AM   #9
ReD_HunTeR
Gangsta
 
ReD_HunTeR's Avatar
 
Join Date: Nov 2012
Posts: 572
Reputation: 54
Default Re: Dynamic Housing [Scratch]

Awesome, ill use ur v2 in my gm
ReD_HunTeR is offline   Reply With Quote
Old 27/06/2014, 12:41 PM   #10
wanted428
Big Clucker
 
wanted428's Avatar
 
Join Date: Feb 2013
Location: Mass Effect
Posts: 147
Reputation: 6
Default Re: Dynamic Housing [Scratch]

Good job bud, rep'ed you.
__________________

Project Reality Role-play
www.forum.pr-rp.com
Since 2009' - We are back
wanted428 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] [TUT] How to make Dynamic housing for your server. Mowgli Tutorials 51 01/03/2013 11:51 PM
Help with my dynamic housing! RyanPetersons Scripting Help 0 20/09/2012 11:37 AM
Dynamic Housing PickUp Help deathdealer Help Archive 3 28/02/2011 12:05 AM
SZR:GTA Roleplay housing / Dynamic Housing [Request] Oi! Help Archive 2 08/07/2009 09:13 AM
Help me with my Dynamic Housing System Sean12 Help Archive 2 30/04/2009 08:26 AM


All times are GMT. The time now is 12:56 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.