[FilterScript] [FS]Vehicle Names v1.1.1
#1

VEHICLE NAMES
by biltong
v1.1.1

Since 0.3 Vehicle names no longer appear when you get into one. This is a simple filterscript that replaces that system, and works in 0.3.

This is my first filterscript so please report any bugs and suggestions here.

Changelog:
1.0:
  • Initial Release
1.1
  • You can now change the colour of the text by changing GAMETEXT_COLOR at the top of the script to the number corresponding to the colour you want. 0= yellow, 1 = blue, 2 = green, 3 = red, 4 = purple, 5 = white, 6 = black.
  • Fixed the changing vehicles bug
1.1.1
  • Minor update, code optimization
KNOWN BUGS:
  • If a player is in a vehicle and is suddenly put into another vehicle, the name won't appear.
  • With 1.1.1, when the server is started it will show "Loaded Vehicle Names v1.1", not 1.1.1. I forgot to change that, 1.1.1 is 1.1.1
DOWNLOAD:
1.1.1:

Pastebin

If all else fails see attachments.

INSTALLATION:
The .rar: Open the file with Winrar and extract the files in there to your server's filterscripts folder. Then open your server.cfg file and add "vehiclenames" to the filterscripts line. Start up your server and look at the pretty text :3
Via Pastebin: Follow the link and scroll down to the bottom. Copy all text in the box there. Now open Pawno, paste the text into Pawno and compile it as "vehiclenames". Now open your server.cfg and add "vehiclenames"(or, if you changed the name of the file, replace "vehiclenames" with whatever you saved the file as) to the filterscripts line, start your server and enjoy

SCREENIES:




What's next?
Nothing as of yet. Suggestions please!
Reply
#2

nice
Reply
#3

You should use
pawn Code:
if((newstate==PLAYER_STATE_DRIVER)||(newstate==PLAYER_STATE_PASSENGER))
  {
    GameTextForPlayer(playerid,VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid))-400],6000,1);
    return 1;
  }
instead of
pawn Code:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
  {
    new vehicleid = GetPlayerVehicleID(playerid);
    new model = (GetVehicleModel(vehicleid))-400;
    new string[32];
    format(string,sizeof(string),"%s",VehicleNames[model]);
    GameTextForPlayer(playerid,string,6000,1);
    return 1;
  }
So it runs faster and more efficiently.
Reply
#4

Quote:
Originally Posted by Joe Staff
You should use
pawn Code:
if((newstate==PLAYER_STATE_DRIVER)||(newstate==PLAYER_STATE_PASSENGER))
  {
    GameTextForPlayer(playerid,VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid))-400],6000,1);
    return 1;
  }
instead of
pawn Code:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
  {
    new vehicleid = GetPlayerVehicleID(playerid);
    new model = (GetVehicleModel(vehicleid))-400;
    new string[32];
    format(string,sizeof(string),"%s",VehicleNames[model]);
    GameTextForPlayer(playerid,string,6000,1);
    return 1;
  }
So it runs faster and more efficiently.
Thanks! I'll fix that, and I just thought of a few things to add too. Though, I question the amount of CPU this will take. It's a very small piece of code.

Gonna wait a bit then release new version. Hopefully I'll get the changing vehicles bug sorted by then.
Reply
#5

Simple but nice.
Reply
#6

Version 1.1 released!

You can now change the color of the text by opening the script and changing the number after
pawn Code:
#define GAMETEXT_COLOR
0(default) = yellow
1 = blue
2 = green
3 = red
4 = purple
5 = white
6 = black

I also fixed the changing vehicles bug. Please keep the feedback coming guys
Enjoy
Reply
#7

looks good
nice work
Reply
#8

Sweet! Can you make one of these for areas? So it says the area names?
Reply
#9

Quote:
Originally Posted by World War III
Sweet! Can you make one of these for areas? So it says the area names?
Use search, it already exists...
http://forum.sa-mp.com/index.php?topic=44902.0
Reply
#10

Quote:
Originally Posted by LowCo.
Actually, that is an include that only gets the name of the zone that the player is in, it doesn't display the zone. It could be used to make such a FS though. I'll look into it during my school holidays, which are 2 weeks away.

EDIT: Here is a script that shows the zone name
http://forum.sa-mp.com/index.php?topic=5311.0
Reply
#11

Nice job.
Reply
#12

Quote:
Originally Posted by biltong
Quote:
Originally Posted by LowCo.
Actually, that is an include that only gets the name of the zone that the player is in, it doesn't display the zone. It could be used to make such a FS though. I'll look into it during my school holidays, which are 2 weeks away.

EDIT: Here is a script that shows the zone name
http://forum.sa-mp.com/index.php?topic=5311.0
Thanks a lot man!
Reply
#13

Glad you guys like

Have you found any bugs yet?
Reply
#14

Nope. It's perfect
Reply
#15

Version 1.1.1 released.

Made a few changes to code, now smaller but hopefully more optimized.

Enjoy!
Reply
#16

this isnt an fs on my game its part of my gm
Reply
#17

Really nice release here I'm also thinking of using
this for teh server :P
Reply
#18

Good work mate, useful FS!
I will surely use it for my server :P
Reply
#19

Thanks for this. I'll use it.
Reply
#20

Great job.
this is the perfect script i was looking for but one little question:
does the name stay appeared when in in a vehicle
i need that but the most of the scripts i downloaded just appeared for about 10 seconds

sorry for my bad englisch

Greatzz [JJ]Jordy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)