[FS] Backwards's Vehicle System - Speedometer and Vehicle Health- -
Backwardsman97 - 11.06.2008
Backwards Vehicle System
Info
Well recently I released a vehicle health system which was kinda neat ( :P ) So I wanted to make a new one with the vehicle's speed included. This version has the vehicle's speed and the vehicle's health displayed when you enter a vehicle. It goes away when you exit. If I make another version of it, I will include something like the vehicle's name or something.
Notes
It requires
Uf.inc.
It doesnt seem to like other textdraw to well
Screenshots
Downloads
Uf.inc ( The original one had some minor bugs in it that I've fixed in this upload )
Vehicle System Pastebin
Extra Note
For some reason whenever I load this script as a filter script, it doesnt work. When I add it into a gamemode however, it does. So you can try making it into an FS but if it doesnt work, adding it into you gamemode probably will. But that normally doesnt work out to well because of the uf.inc. You see it has many variables in it and most of those are common variables. Plus you really can't use it with dutils.inc but it has strtok in it. So that's why it would be better as an FS.
Re: [FS] Backwards's Vehicle System - Speedometer and Vehicle Health- -
sebihunter - 11.06.2008
very very nice
Re: [FS] Backwards's Vehicle System - Speedometer and Vehicle Health- -
B*hedgehog - 12.06.2008
link doest works
plz upload more mirror
thx
Re: [FS] Backwards's Vehicle System - Speedometer and Vehicle Health- -
n3ziniuka5 - 21.08.2008
cmon someone upload another mirror
Re: [FS] Backwards's Vehicle System - Speedometer and Vehicle Health- -
DeathPromT - 04.10.2008
yes please reupload...
Re: [FS] Backwards's Vehicle System - Speedometer and Vehicle Health- -
error55o - 13.10.2008
pastebin link is empty 0_o can we have a pwn upload of this please
Re: [FS] Backwards's Vehicle System - Speedometer and Vehicle Health- -
error55o - 14.10.2008
I found your other link so here's the pawno code
Code:
#include <a_samp>
#include <uf>
new Text:Textdraw0[MAX_PLAYERS];
forward CheckVehicle2(playerid);
new Vehicle[MAX_PLAYERS];
main()
{
print("\n----------------------------------");
print(" Vehicle System by Backwardsman97\n");
print("----------------------------------\n");
}
public OnFilterScriptInit()
{
GameModeInit();
return 1;
}
public OnPlayerConnect(playerid)
{
Textdraw0[playerid] = TextDrawCreate(83.000000,301.000000,"Vehicle Speed ~n~ 0 Mph ~n~ Vehicle Health ~n~ ||||||||||");
TextDrawUseBox(Textdraw0[playerid],1);
TextDrawBoxColor(Textdraw0[playerid],0x00000066);
TextDrawTextSize(Textdraw0[playerid],-23.000000,110.000000);
TextDrawAlignment(Textdraw0[playerid],2);
TextDrawBackgroundColor(Textdraw0[playerid],0x000000ff);
TextDrawFont(Textdraw0[playerid],3);
TextDrawLetterSize(Textdraw0[playerid],0.399999,1.000000);
TextDrawColor(Textdraw0[playerid],0xffffffff);
TextDrawSetOutline(Textdraw0[playerid],1);
TextDrawSetProportional(Textdraw0[playerid],1);
TextDrawSetShadow(Textdraw0[playerid],1);
return 1;
}
public OnPlayerDisconnect(playerid)
{
TextDrawDestroy(Textdraw0[playerid]);
return 1;
}
public OnPlayerDeath(playerid)
{
TextDrawHideForPlayer(playerid,Text:Textdraw0[playerid]);
KillTimer(Vehicle[playerid]);
return 1;
}
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
TextDrawShowForPlayer(playerid,Text:Textdraw0[playerid]);
Vehicle[playerid] = SetTimerEx("CheckVehicle2",500,true,"i",playerid);
return 1;
}
if(newstate == PLAYER_STATE_ONFOOT)
{
TextDrawHideForPlayer(playerid,Text:Textdraw0[playerid]);
KillTimer(Vehicle[playerid]);
return 1;
}
return 1;
}
public CheckVehicle2(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:Speed2 = GetPlayerSpeed(playerid,SPEED_MPH)/2;
new Float:vHealth,Stringy[256];
GetVehicleHealth(GetPlayerVehicleID(playerid), vHealth);
if(vHealth >= 900)
{
format(Stringy,sizeof(Stringy),"Vehicle Speed ~n~ %0.0f Mph ~n~ Vehicle Health ~n~ ||||||||||",Speed2);
TextDrawSetString(Text:Textdraw0[playerid],Stringy);
return 1;
}
if(vHealth >= 800 && vHealth < 900)
{
format(Stringy,sizeof(Stringy),"Vehicle Speed ~n~ %0.0f Mph ~n~ Vehicle Health ~n~ |||||||||",Speed2);
TextDrawSetString(Text:Textdraw0[playerid],Stringy);
return 1;
}
if(vHealth >= 700 && vHealth < 800)
{
format(Stringy,sizeof(Stringy),"Vehicle Speed ~n~ %0.0f Mph ~n~ Vehicle Health ~n~ ||||||||",Speed2);
TextDrawSetString(Text:Textdraw0[playerid],Stringy);
return 1;
}
if(vHealth >= 600 && vHealth < 700)
{
format(Stringy,sizeof(Stringy),"Vehicle Speed ~n~ %0.0f Mph ~n~ Vehicle Health ~n~ |||||||",Speed2);
TextDrawSetString(Text:Textdraw0[playerid],Stringy);
return 1;
}
if(vHealth >= 500 && vHealth < 600)
{
format(Stringy,sizeof(Stringy),"Vehicle Speed ~n~ %0.0f Mph ~n~ Vehicle Health ~n~ ||||||",Speed2);
TextDrawSetString(Text:Textdraw0[playerid],Stringy);
return 1;
}
if(vHealth >= 400 && vHealth < 500)
{
format(Stringy,sizeof(Stringy),"Vehicle Speed ~n~ %0.0f Mph ~n~ Vehicle Health ~n~ |||||",Speed2);
TextDrawSetString(Text:Textdraw0[playerid],Stringy);
return 1;
}
if(vHealth >= 300 && vHealth < 400)
{
format(Stringy,sizeof(Stringy),"Vehicle Speed ~n~ %0.0f Mph ~n~ Vehicle Health ~n~ ||||",Speed2);
TextDrawSetString(Text:Textdraw0[playerid],Stringy);
return 1;
}
if(vHealth >= 200 && vHealth < 300)
{
format(Stringy,sizeof(Stringy),"Vehicle Speed ~n~ %0.0f Mph ~n~ Vehicle Health ~n~ |||",Speed2);
TextDrawSetString(Text:Textdraw0[playerid],Stringy);
return 1;
}
if(vHealth >= 100 && vHealth < 200)
{
format(Stringy,sizeof(Stringy),"Vehicle Speed ~n~ %0.0f Mph ~n~ Vehicle Health ~n~ ||",Speed2);
TextDrawSetString(Text:Textdraw0[playerid],Stringy);
return 1;
}
if(vHealth >= 0 && vHealth < 100)
{
format(Stringy,sizeof(Stringy),"Vehicle Speed ~n~ %0.0f Mph ~n~ Vehicle Health ~n~ |",Speed2);
TextDrawSetString(Text:Textdraw0[playerid],Stringy);
return 1;
}
}
return 1;
}
#pragma unused strtok
that should stop people asking for it
Re: [FS] Backwards's Vehicle System - Speedometer and Vehicle Health- -
anonymoushacker - 06.08.2009
thats not gonig to work if we dont have the UF include, rofl!