SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 17/02/2012, 02:45 AM   #1
Abreezy
Gangsta
 
Abreezy's Avatar
 
Join Date: Jan 2011
Location: Bronx
Posts: 560
Reputation: 42
Default Making Street Addresses

What would be the easiest way to make an automatic address system? My issue is, Let's say we are on rich st. I would want the address to be say 2025 Rich St. for example. How could I determine where I am, and then make the address? Thank you in advance for any suggestions. All are appreciated!!
__________________

(Click the image for link to gamemode release)
| Completely dynamic gamemode, made completely from scratch, MySQL |
| Will script for cash, just send me a PM with information on what you want. |
Abreezy is offline   Reply With Quote
Old 17/02/2012, 02:48 AM   #2
Mark_Weston
Gangsta
 
Mark_Weston's Avatar
 
Join Date: Aug 2010
Location: Winnipeg, Manitoba, Canada
Posts: 952
Reputation: 70
Default Re: Making Street Addresses

Quote:
Originally Posted by Abreezy View Post
What would be the easiest way to make an automatic address system? My issue is, Let's say we are on rich st. I would want the address to be say 2025 Rich St. for example. How could I determine where I am, and then make the address? Thank you in advance for any suggestions. All are appreciated!!
I don't remember what I used but I think it was garhouse I think it did that you should check the source. If its not then I think it was on my custom GM . ( Not FC RP )
Mark_Weston is offline   Reply With Quote
Old 17/02/2012, 02:50 AM   #3
Abreezy
Gangsta
 
Abreezy's Avatar
 
Join Date: Jan 2011
Location: Bronx
Posts: 560
Reputation: 42
Default Re: Making Street Addresses

I see no gamemode releases from you. Could you post a link to that, or a download to garhouse.
__________________

(Click the image for link to gamemode release)
| Completely dynamic gamemode, made completely from scratch, MySQL |
| Will script for cash, just send me a PM with information on what you want. |
Abreezy is offline   Reply With Quote
Old 17/02/2012, 02:51 AM   #4
iggy1
High-roller
 
iggy1's Avatar
 
Join Date: Mar 2009
Location: One past the end.
Posts: 2,421
Reputation: 273
Default Re: Making Street Addresses

You could create 'areas'. Then use an "IsPlayerInArea" function to determine if a player is in the area (street). This would be very tough for roads that go in a diagonal direction tho. Streamer plugin also streams areas if you use that already i suggest using that. Make a count variable for that area and when you create a house give it that number and increment the var.
iggy1 is offline   Reply With Quote
Old 17/02/2012, 02:56 AM   #5
Abreezy
Gangsta
 
Abreezy's Avatar
 
Join Date: Jan 2011
Location: Bronx
Posts: 560
Reputation: 42
Default Re: Making Street Addresses

With the area idea, It might be a good way to do it, But seems like hell of a lot of work lol.
__________________

(Click the image for link to gamemode release)
| Completely dynamic gamemode, made completely from scratch, MySQL |
| Will script for cash, just send me a PM with information on what you want. |
Abreezy is offline   Reply With Quote
Old 17/02/2012, 02:59 AM   #6
iggy1
High-roller
 
iggy1's Avatar
 
Join Date: Mar 2009
Location: One past the end.
Posts: 2,421
Reputation: 273
Default Re: Making Street Addresses

It would be, the more i think of it the more things would need to be added. There would be other ways like range checking. But none would be easy.

The easiest way would be to just name the houses on a street by streetname and number (manually ie, in your create house func), very simple anyway. And guaranteed to work.
iggy1 is offline   Reply With Quote
Old 17/02/2012, 02:59 AM   #7
SnG.Scot_MisCuDI
Gangsta
 
SnG.Scot_MisCuDI's Avatar
 
Join Date: Mar 2011
Location: Gilbert, Arizona
Posts: 883
Reputation: 56
Default Re: Making Street Addresses

Quote:
Originally Posted by Abreezy View Post
With the area idea, It might be a good way to do it, But seems like hell of a lot of work lol.
All the hard work pays off :P
__________________

aka Googamalugafoo
[FS/Tool] Dynamic Biz - Dynamic Bank - FFA DM - Pawno Tool
[Tuts] Map Editor - Nuke - Using Pickups - Timers


SnG.Scot_MisCuDI is offline   Reply With Quote
Old 17/02/2012, 03:03 AM   #8
Abreezy
Gangsta
 
Abreezy's Avatar
 
Join Date: Jan 2011
Location: Bronx
Posts: 560
Reputation: 42
Default Re: Making Street Addresses

I guess I could add that, something like /createhouse price streetname
__________________

(Click the image for link to gamemode release)
| Completely dynamic gamemode, made completely from scratch, MySQL |
| Will script for cash, just send me a PM with information on what you want. |
Abreezy 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
Saving IP addresses in mysql JeroenGFX Help Archive 0 03/05/2010 06:06 PM
How best to store names and IP addresses in SQLite? Outbreak Help Archive 1 09/12/2009 06:20 AM
Exception Addresses ttocs Server Support 7 24/07/2009 07:57 PM
SUGGESTION: Webname support for IP Addresses DMSOrg General 2 31/12/2008 09:02 PM


All times are GMT. The time now is 02:35 PM.


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