[FilterScript] Dynamic Street w/ sign
#1

Today I'm releasing a simple script. this script allows you to add the address of a road, even it will generate the street direction, for example: 1300 WEST Wilson Rd.

Preview

Command:

Code:
/create_street - Create a street.
/streetname - What is this street?
Function:

Code:
native GetPlayerStreet(playerid, zone[], length);
native GetStreetID(playerid);
You can use/edit for free, do NOT re-release it without my permission.


How to create a street?

I drew a simple diagram of the structure



Link: https://github.com/offsetX/street_na...treet_name.pwn
Reply
#2

Good job!
Reply
#3

Nice job.
Reply
#4

Well Done
Reply
#5

Looks great, cool idea !
PS: The code is fucked up at GitHub..
Reply
#6

Could you elaborate more on exactly how you create a street?

Like do I go from bottom left corner (type /create_street somestreet), then run to top right corner (and type /create_street somestreet again)?
Reply
#7

Quote:
Originally Posted by Chaprnks
View Post
Could you elaborate more on exactly how you create a street?

Like do I go from bottom left corner (type /create_street somestreet), then run to top right corner (and type /create_street somestreet again)?
Reply
#8

Quote:
Originally Posted by 0x88
View Post
Unfortunately this produces blank street signs for me =/

Reply
#9

Quote:
Originally Posted by Chaprnks
View Post
Unfortunately this produces blank street signs for me =/

does /streetname returns correct value?
Reply
#10

Quote:
Originally Posted by 0x88
View Post
does /streetname returns correct value?
Well the source code had some errors on compile. A couple of the format() functions were missing parameters & your player_temp[playerid][static_string] variable is currently an integer..

Here's my fixed enum:


& here's what my command looks like:
Reply
#11

Good stuff bredrin
Reply
#12

The whole project preview looks good but when i tried to test the filterscript these errors come up (seems script is messed up a bit):
PHP код:
streetsign.pwn(127) : error 035argument type mismatch (argument 3) ]
mysql_query(dbHandlerquery"insert_street""d"playerid);
streetsign.pwn(250) : error 035argument type mismatch (argument 2) ]
format(player_temp[playerid][static_string], "None");
streetsign.pwn(253) : error 017undefined symbol "addr" ]
- if(
IsValidDynamicObject(player_temp[playerid][temp_object][addr])) DestroyDynamicObject(player_temp[playerid][temp_object][addr]);
streetsign.pwn(254) : error 017undefined symbol "addr" ]
player_temp[playerid][temp_object][addr] = INVALID_OBJECT_ID;
streetsign.pwn(215) : warning 202number of arguments does not match definition ]
format(street_data[id][street_name], player_temp[playerid][static_string]); 
The useful things that i didnt find in the whole project:
  • The plugins you runned/tested the entire script
  • The includes you runned/tested the entire script
  • The sql file if needed in some case
Reply
#13

Quote:
Originally Posted by Alex Magaсa
Посмотреть сообщение
The whole project preview looks good but when i tried to test the filterscript these errors come up (seems script is messed up a bit):
PHP код:
streetsign.pwn(127) : error 035argument type mismatch (argument 3) ]
mysql_query(dbHandlerquery"insert_street""d"playerid);
streetsign.pwn(250) : error 035argument type mismatch (argument 2) ]
format(player_temp[playerid][static_string], "None");
streetsign.pwn(253) : error 017undefined symbol "addr" ]
- if(
IsValidDynamicObject(player_temp[playerid][temp_object][addr])) DestroyDynamicObject(player_temp[playerid][temp_object][addr]);
streetsign.pwn(254) : error 017undefined symbol "addr" ]
player_temp[playerid][temp_object][addr] = INVALID_OBJECT_ID;
streetsign.pwn(215) : warning 202number of arguments does not match definition ]
format(street_data[id][street_name], player_temp[playerid][static_string]); 
The useful things that i didnt find in the whole project:
  • The plugins you runned/tested the entire script
  • The includes you runned/tested the entire script
  • The sql file if needed in some case
this script is outdated, i will release the whole gamemode along with this feature in next month
Reply
#14

This looks more like a prototype than a polished release it is a great idea but completely falls short of it's true value.

1.) Meticulously label every street yourself so people have a rich database to work with
2.) Split the code up a bit by creating a loader include for gamemodes
3.) This builds on point 2 by making this a library/tool that is feature rich
- Interactive aspect (OnPlayerNearStreetSign(), SetStreetSignInfoText(string[]) <----- gametext information textdraws are best, OnVehiclePassStreetSign() <---- You could keep track of traffic statistics
- Custom sign colors
- Custom sign objects/templates

That is just for starters right now I would say your script is naked as a new born baby. It falls short of it's true potential.
Reply
#15

Looks neat, but it seems it needs more work. Also what is "^M" on GitHub? Some exotic line separator?
Reply
#16

Quote:
Originally Posted by Pottus
Посмотреть сообщение
This looks more like a prototype than a polished release it is a great idea but completely falls short of it's true value.

1.) Meticulously label every street yourself so people have a rich database to work with
2.) Split the code up a bit by creating a loader include for gamemodes
3.) This builds on point 2 by making this a library/tool that is feature rich
- Interactive aspect (OnPlayerNearStreetSign(), SetStreetSignInfoText(string[]) <----- gametext information textdraws are best, OnVehiclePassStreetSign() <---- You could keep track of traffic statistics
- Custom sign colors
- Custom sign objects/templates

That is just for starters right now I would say your script is naked as a new born baby. It falls short of it's true potential.
yes these are already in the new version. also theres a eventListener made for this, and the new version uses Dynamic Area so its more exactly and the new street sign can be temporary tagged by street-gang members it happens to payphone object and payphone textdraw advertisement
Reply
#17

Quote:
Originally Posted by sprtik
Посмотреть сообщение
Looks neat, but it seems it needs more work. Also what is "^M" on GitHub? Some exotic line separator?
i have no clue, this was written in visual studio code when i put on GitHub it generates that red m
Reply
#18

good stuff
Reply
#19

So cool 啊
Reply
#20

Great fs. Nice job
Reply


Forum Jump:


Users browsing this thread: 12 Guest(s)