SA-MP Forums Archive
[FilterScript] Dynamic Street w/ sign - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Dynamic Street w/ sign (/showthread.php?tid=642751)

Pages: 1 2


Dynamic Street w/ sign - 0x88 - 06.10.2017

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


Re: Dynamic Street w/ sign - VVWVV - 06.10.2017

Good job!


Re: Dynamic Street w/ sign - cuber - 06.10.2017

Nice job.


Re: Dynamic Street w/ sign - Mr.Vince™ - 06.10.2017

Well Done


Re: Dynamic Street w/ sign - JustMe.77 - 06.10.2017

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


Re: Dynamic Street w/ sign - Chaprnks - 12.10.2017

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)?


Re: Dynamic Street w/ sign - 0x88 - 12.10.2017

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)?



Re: Dynamic Street w/ sign - Chaprnks - 13.10.2017

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




Re: Dynamic Street w/ sign - 0x88 - 14.10.2017

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

does /streetname returns correct value?


Re: Dynamic Street w/ sign - Chaprnks - 14.10.2017

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:



Re: Dynamic Street w/ sign - aoky - 16.10.2017

Good stuff bredrin


Re: Dynamic Street w/ sign - Alex Magaсa - 17.10.2017

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:



Re: Dynamic Street w/ sign - 0x88 - 17.10.2017

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


Re: Dynamic Street w/ sign - Pottus - 17.10.2017

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.


Re: Dynamic Street w/ sign - IllidanS4 - 17.10.2017

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


Re: Dynamic Street w/ sign - 0x88 - 18.10.2017

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


Re: Dynamic Street w/ sign - 0x88 - 18.10.2017

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


Re: Dynamic Street w/ sign - SetPlayerNameTag - 18.10.2017

good stuff


Re: Dynamic Street w/ sign - CnRoma - 24.10.2017

So cool 啊


Re: Dynamic Street w/ sign - GamezCEO - 24.10.2017

Great fs. Nice job