Simple Vehicle Speedometer/Health/Vehicle Name + Vehicle Menu(New!) -
FreAkeD - 22.09.2015
Introduction
This is a simple FilterScript where it will display your vehicles statistics on the bottom of your screen in a textdraw. Version 2 now includes a vehicle menu. You can find whats new below.
Features
Version 1- Displays Vehicle Speed in KM/H
- Displays Vehicle Health in a Percentage
- Displays Vehicle Name
- Simple Look
Version 2- Simple Vehicle Menu (/vehicle)
- Vehicle menu is clickable, simply click on your option
- Turn Vehicles Engine On/Off using the vehicle menu
- Turn Vehicles Lights On/Off using the vehicle menu
Pictures
Version 1
Version 2
Download
Github
Bugs
None currently.
If you have any suggestions please let me know down below !
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
SecretBoss - 22.09.2015
Nice textdraws
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
FreAkeD - 22.09.2015
Quote:
Originally Posted by SecretBoss
Nice textdraws
|
Thank you
!
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
MrCreed - 22.09.2015
Good filterscript, thanks for sharing it.
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
FreAkeD - 22.09.2015
Quote:
Originally Posted by MrCreed
Good filterscript, thanks for sharing it.
|
Cheers! No problem.
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
Pottus - 22.09.2015
1.) You are using the the wrong type of textdraws. (Use player textdraws)
2.) You don't even destroy textdraws so this would eventually hit textdraw limit.
3.) Incorrect calculation for vehicle speed.
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
FreAkeD - 23.09.2015
Quote:
Originally Posted by Pottus
1.) You are using the the wrong type of textdraws. (Use player textdraws)
2.) You don't even destroy textdraws so this would eventually hit textdraw limit.
3.) Incorrect calculation for vehicle speed.
|
Cheers for the heads up, I've fixed them.
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
Pottus - 23.09.2015
Okay another problem is you don't loop through all the players in OnFilterScriptInit() and create the textdraws for any connected players. Another problem is you also don't delete any textdraws in OnFilterScriptExit().
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
FreAkeD - 27.09.2015
Updated to Version 2. A new 'Vehicle Menu' has been added!
Version 2:- Added Simple Vehicle Menu (/vehicle)
- Vehicle menu is clickable, simply click on your option
- Turn Vehicles Engine On/Off using the vehicle menu
- Turn Vehicles Lights On/Off using the vehicle menu
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
Edw - 27.09.2015
Nice.
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
FreAkeD - 27.09.2015
Quote:
Originally Posted by Edw
Nice.
|
Thank you
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
Bolex_ - 27.09.2015
Pretty Nice
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
FreAkeD - 27.09.2015
Quote:
Originally Posted by Scripter18
Pretty Nice
|
Thanks alot!
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
dan40o - 27.09.2015
There is a problem with the Health. When i crash the car still shows 100.
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
FreAkeD - 27.09.2015
Quote:
Originally Posted by dan40o
There is a problem with the Health. When i crash the car still shows 100.
|
Are you sure? I just tested it and everytime I crashed into an object the health always went down.
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
dan40o - 27.09.2015
yes I am sure i'll post a picture wait a sec.
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
dan40o - 27.09.2015
Look
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
FreAkeD - 27.09.2015
Quote:
Originally Posted by dan40o
Look
|
Honestly, I'm not too sure. It has to be something related to your script probably? Because it works find for me.
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
dan40o - 27.09.2015
Fixed it. I removed the loop under OnPlayerUpdate
Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new vspeed[25];
format(vspeed, sizeof(vspeed), "Speed: ~y~%d ~g~KM/H", GetVehicleSpeed(playerid));
PlayerTextDrawSetString(playerid, VehicleSpeed[playerid], vspeed);
new vhealthtd[32], Float:vHealth;
GetVehicleHealth(GetPlayerVehicleID(playerid), vHealth);
new Float:percentage = (((vHealth - 250.0) / (1000.0 - 250.0)) * 100.0);
format(vhealthtd, sizeof(vhealthtd), "Vehicle Health: ~g~%.0f%", percentage);
PlayerTextDrawSetString(playerid, VehicleHealth[playerid], vhealthtd);
}
return 1;
}
Re: Simple Vehicle Speedometer/Health/Vehicle Name -
ahameed4755 - 27.09.2015
NICE!