Brzinomjer + iznanadenje

Započeo kizla, Januar 12, 2010, 22:08:24 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

kizla

Ovako napravio sam svoj FS nije skroz moj FS jer sam uzeo par stvari iz drugih FS-a tako da ali vecina je moja + nakone 5 postova objavim iznanadenje.

Brzinomjer:

//////Brzinomjer////////
//////Napravio://///////
///////Fallout////////////

//POZOR!!

//*Ovaj FS je napravljen kao korist za RP server
//*Ovaj FS je zasticen i nesmije se zloupotrijebiti
//*Mozete ako zelite napraviti edit pa kad postati na forumu
//Ono sto je iznad include to vam sluzi za snalazenje kada pritisnete CTRL+F
//*Hvala na paznji.

//-------Include-----

#include <a_samp>

//-------Forward-----

forward CheckStatus();
forward Brzinomjer();

//-------Auti-------

new PlayerVehicle[212][] = {
"Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana",
"Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat",
"Whoopee", "BF Injection", "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife",
"Trailer 1", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo",
"Seasparrow", "Pizzaboy", "Tram", "Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair",
"Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic", "Sanchez", "Sparrow",
"Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito",
"Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring",
"Sandking", "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B",
"Bloodring Banger", "Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster","Stunt",  "Tanker",
"Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
"Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan", "Blade", "Freight", "Streak",
"Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Firetruck LA", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa", "Sunrise", "Merit",
"Utility", "Nevada", "Yosemite", "Windsor", "Monster A", "Monster B", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance",
"RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper", "Broadway",
"Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Trailer 3", "Emperor", "Wayfarer", "Euros", "Hotdog",
"Club", "Freight Carriage", "Trailer 4", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car (LSPD)", "Police Car (SFPD)",
"Police Car (LVPD)", "Police Ranger", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage Trailer A",
"Luggage Trailer B", "Stairs", "Boxville", "Tiller", "Utility Trailer" };

//-----Boolemes(preuzeo sam sa jednoga GM-a)------

new bool:TextDrawsShown[MAX_PLAYERS];
new bool:LightRedHealthCreated[MAX_PLAYERS];
new bool:LightYellowSpeedCreated[MAX_PLAYERS];
new bool:VHSCreated[MAX_PLAYERS];
new bool:ExclamationShown[MAX_PLAYERS];

//-------Sat----
new CheckStatusTimer;

//------Tekst-----
new Text:Black0;
new Text:White1;
new Text:White2;
new Text:BlackHealth;
new Text:DarkRedHealth;
new Text:BlackSpeed;
new Text:DarkYellowSpeed;
new Text:Marker;
new Text:Exclamation;

//-----Tekst 2-----
new Text:VHS[MAX_PLAYERS];
new Text:LightRedHealth[MAX_PLAYERS];
new Text:LightYellowSpeed[MAX_PLAYERS];

//------Brzina----
new Float:OldX[MAX_PLAYERS];
new Float:OldY[MAX_PLAYERS];
new Float:OldZ[MAX_PLAYERS];

//------OnFilterScriptInit----

public OnFilterScriptInit()
{

print("\n--------------------------------------");
print(" ~Brzinomjer by FallOut~");
print("--------------------------------------\n");

    SetTimer("Brzinomjer", 1000, 1);
return 1;
}

Black0 = TextDrawCreate(481.000000,353.000000,"_");
TextDrawUseBox(Black0,1);
TextDrawBoxColor(Black0,0x00000044);
TextDrawTextSize(Black0,596.000000,0.000000);
TextDrawAlignment(Black0,0);
TextDrawBackgroundColor(Black0,0x000000ff);
TextDrawFont(Black0,3);
TextDrawLetterSize(Black0,3.599999,7.599996);
TextDrawColor(Black0,0xffffffff);
TextDrawSetOutline(Black0,1);
TextDrawSetProportional(Black0,1);
TextDrawSetShadow(Black0,1);

White1 = TextDrawCreate(482.000000,354.000000,"_");
TextDrawUseBox(White1,1);
TextDrawBoxColor(White1,0xffffff11);
TextDrawTextSize(White1,595.000000,-2.000000);
TextDrawAlignment(White1,0);
TextDrawBackgroundColor(White1,0x000000ff);
TextDrawFont(White1,1);
TextDrawLetterSize(White1,1.700000,7.399997);
TextDrawColor(White1,0xffffffff);
TextDrawSetOutline(White1,1);
TextDrawSetProportional(White1,1);
TextDrawSetShadow(White1,1);

White2 = TextDrawCreate(483.000000,355.000000,"_");
TextDrawUseBox(White2,1);
TextDrawBoxColor(White2,0xffffff22);
TextDrawTextSize(White2,594.000000,0.000000);
TextDrawAlignment(White2,0);
TextDrawBackgroundColor(White2,0x000000ff);
TextDrawFont(White2,1);
TextDrawLetterSize(White2,0.299999,7.199996);
TextDrawColor(White2,0xffffffff);
TextDrawSetOutline(White2,1);
TextDrawSetProportional(White2,1);
TextDrawSetShadow(White2,1);

BlackHealth = TextDrawCreate(487.000000,385.000000,"_");
TextDrawUseBox(BlackHealth,1);
TextDrawBoxColor(BlackHealth,0x00000099);
TextDrawTextSize(BlackHealth,590.000000,-11.000000);
TextDrawAlignment(BlackHealth,0);
TextDrawBackgroundColor(BlackHealth,0x000000ff);
TextDrawFont(BlackHealth,3);
TextDrawLetterSize(BlackHealth,1.000000,0.399999);
TextDrawColor(BlackHealth,0xffffffff);
TextDrawSetOutline(BlackHealth,1);
TextDrawSetProportional(BlackHealth,1);
TextDrawSetShadow(BlackHealth,1);

DarkRedHealth = TextDrawCreate(488.000000,386.000000,"_");
TextDrawUseBox(DarkRedHealth,1);
TextDrawBoxColor(DarkRedHealth,0xff000066);
TextDrawTextSize(DarkRedHealth,589.000000,0.000000);
TextDrawAlignment(DarkRedHealth,0);
TextDrawBackgroundColor(DarkRedHealth,0x000000ff);
TextDrawFont(DarkRedHealth,3);
TextDrawLetterSize(DarkRedHealth,1.000000,0.199999);
TextDrawColor(DarkRedHealth,0xffffffff);
TextDrawSetOutline(DarkRedHealth,1);
TextDrawSetProportional(DarkRedHealth,1);
TextDrawSetShadow(DarkRedHealth,1);

BlackSpeed = TextDrawCreate(536.000000,403.000000,"_");
TextDrawUseBox(BlackSpeed,1);
TextDrawBoxColor(BlackSpeed,0x00000099);
TextDrawTextSize(BlackSpeed,590.000000,0.000000);
TextDrawAlignment(BlackSpeed,0);
TextDrawBackgroundColor(BlackSpeed,0x000000ff);
TextDrawFont(BlackSpeed,3);
TextDrawLetterSize(BlackSpeed,1.000000,1.400000);
TextDrawColor(BlackSpeed,0xffffffff);
TextDrawSetOutline(BlackSpeed,1);
TextDrawSetShadow(BlackSpeed,1);
TextDrawSetProportional(BlackSpeed,1);

DarkYellowSpeed = TextDrawCreate(537.000000,404.000000,"_");
TextDrawUseBox(DarkYellowSpeed,1);
TextDrawBoxColor(DarkYellowSpeed,0xffff0033);
TextDrawTextSize(DarkYellowSpeed,589.000000,0.000000);
TextDrawAlignment(DarkYellowSpeed,0);
TextDrawBackgroundColor(DarkYellowSpeed,0x000000ff);
TextDrawFont(DarkYellowSpeed,3);
TextDrawLetterSize(DarkYellowSpeed,1.000000,1.200000);
TextDrawColor(DarkYellowSpeed,0xffffffff);
TextDrawSetOutline(DarkYellowSpeed,1);
TextDrawSetProportional(DarkYellowSpeed,1);
TextDrawSetShadow(DarkYellowSpeed,1);

Marker = TextDrawCreate(511.000000,382.000000,"l");
TextDrawAlignment(Marker,0);
TextDrawBackgroundColor(Marker,0x000000ff);
TextDrawFont(Marker,1);
TextDrawLetterSize(Marker,0.099999,1.000000);
TextDrawColor(Marker,0xffffffff);
TextDrawSetOutline(Marker,1);
TextDrawSetProportional(Marker,1);
TextDrawSetShadow(Marker,1);

Exclamation = TextDrawCreate(579.000000,351.000000,"~r~!");
TextDrawAlignment(Exclamation,0);
TextDrawBackgroundColor(Exclamation,0x000000ff);
TextDrawFont(Exclamation,2);
TextDrawLetterSize(Exclamation,1.200000,3.399999);
TextDrawColor(Exclamation,0xffffffff);
TextDrawSetOutline(Exclamation,1);
TextDrawSetProportional(Exclamation,1);
TextDrawSetShadow(Exclamation,1);

CheckStatusTimer = SetTimer("CheckStatus", 1000, 1);
}

//-----OnFilterScriptExit------

public OnFilterScriptExit()
{
KillTimer(CheckStatusTimer);

TextDrawDestroy(Text:Black0);
TextDrawDestroy(Text:White1);
TextDrawDestroy(Text:White2);
TextDrawDestroy(Text:BlackHealth);
TextDrawDestroy(Text:DarkRedHealth);
TextDrawDestroy(Text:BlackSpeed);
TextDrawDestroy(Text:DarkYellowSpeed);
TextDrawDestroy(Text:Marker);
TextDrawDestroy(Text:Exclamation);
for(new i=0; i<MAX_PLAYERS; i++)
{
TextDrawDestroy(Text:VHS[i]);
TextDrawDestroy(Text:LightRedHealth[i]);
TextDrawDestroy(Text:LightYellowSpeed[i]);
}
}

//----OnPlayerConnect-----

public OnPlayerConnect(playerid)
{
    new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s se prikljucio na server", pname);
    SendClientMessageToAll(0xAAAAAAAA, string);
    return 1;
}

//------Provjera(uzeto iz jednog GM-a)----------

public CheckStatus()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInAnyVehicle(i))
{

//--------Tekst 3-------

if(TextDrawsShown[i] == false)
{
    TextDrawShowForPlayer(i, Text:Black0);
    TextDrawShowForPlayer(i, Text:White1);
    TextDrawShowForPlayer(i, Text:White2);
    TextDrawShowForPlayer(i, Text:BlackHealth);
    TextDrawShowForPlayer(i, Text:DarkRedHealth);
    TextDrawShowForPlayer(i, Text:BlackSpeed);
    TextDrawShowForPlayer(i, Text:DarkYellowSpeed);
    TextDrawShowForPlayer(i, Text:Marker);
    TextDrawsShown[i] = true;
}

//-----Brzinomjer------

    new String[128];
        new Float:X, Float:Y, Float:Z, Float:Distance;
            GetPlayerPos(i, X, Y, Z);
            Distance = floatsqroot(floatadd(floatadd(floatpower(floatsub(X, OldX[i]), 2), floatpower(floatsub(Y, OldY[i]), 2)), floatpower(floatsub(Z, OldZ[i]), 2)));
new PlayerVehicleModelID = GetVehicleModel(GetPlayerVehicleID(i));
PlayerVehicleModelID -= 400;
format(String,sizeof(String),"~b~Vozilo:~n~~w~%s~n~~b~Energija:~n~~n~Brzina:~n~~w~%im/h~n~%ikm/h~n~Napravio:kizla~n~", PlayerVehicle[PlayerVehicleModelID], floatround(floatmul(floatdiv(Distance, 1.609344), 2.0), floatround_floor), floatround(floatmul(Distance, 2.0), floatround_floor)); //Ovdije stavljate ono sto zelite vidjeti u vasem brzinomjeru(Ime vozila,gorivo,brzina...)
if(VHSCreated[i] == true)
{
TextDrawDestroy(VHS[i]);
}
VHS[i] = TextDrawCreate(485.000000,355.000000,String);
TextDrawAlignment(VHS[i],0);
TextDrawBackgroundColor(VHS[i],0x000000ff);
TextDrawFont(VHS[i],1);
TextDrawLetterSize(VHS[i],0.299999,1.000000);
TextDrawColor(VHS[i],0xffffffff);
TextDrawSetOutline(VHS[i],1);
TextDrawSetProportional(VHS[i],1);
TextDrawSetShadow(VHS[i],1);
            TextDrawShowForPlayer(i, VHS[i]);
            VHSCreated[i] = true;

//-----Energija auta-----

new Float:CarHealth;
GetVehicleHealth(GetPlayerVehicleID(i), CarHealth);
if(LightRedHealthCreated[i] == true)
{
TextDrawDestroy(LightRedHealth[i]);
}
LightRedHealth[i] = TextDrawCreate(488.000000,386.000000,"_");
TextDrawUseBox(LightRedHealth[i],1);
TextDrawBoxColor(LightRedHealth[i],0xff000099);
TextDrawTextSize(LightRedHealth[i], floatadd(484.0, floatdiv(CarHealth, 9.5238095238)),0.000000);
TextDrawAlignment(LightRedHealth[i],0);
TextDrawBackgroundColor(LightRedHealth[i],0x000000ff);
TextDrawFont(LightRedHealth[i],3);
TextDrawLetterSize(LightRedHealth[i],1.000000,0.199999);
TextDrawColor(LightRedHealth[i],0xffffffff);
TextDrawSetOutline(LightRedHealth[i],1);
TextDrawSetProportional(LightRedHealth[i],1);
TextDrawSetShadow(LightRedHealth[i],1);
            TextDrawShowForPlayer(i, LightRedHealth[i]);
            LightRedHealthCreated[i] = true;
if(CarHealth < 250)
{
if(ExclamationShown[i] == true)
{
TextDrawHideForPlayer(i, Text:Exclamation);
    ExclamationShown[i] = false;
}
else
{
TextDrawShowForPlayer(i, Text:Exclamation);
    ExclamationShown[i] = true;
}
}
else if(CarHealth > 250)
{
if(ExclamationShown[i] == true)
{
TextDrawHideForPlayer(i, Text:Exclamation);
    ExclamationShown[i] = false;
}
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if(LightYellowSpeedCreated[i] == true)
{
TextDrawDestroy(LightYellowSpeed[i]);
}
LightYellowSpeed[i] = TextDrawCreate(537.000000,404.000000,"_");
TextDrawUseBox(LightYellowSpeed[i],1);
TextDrawBoxColor(LightYellowSpeed[i],0xffff0066);
if(Distance >= 75)
{
TextDrawTextSize(LightYellowSpeed[i],589.000000,0.000000);
}
else
{
TextDrawTextSize(LightYellowSpeed[i], floatadd(533.0, floatdiv(Distance, 1.33928571428)),0.000000);
}
TextDrawAlignment(LightYellowSpeed[i],0);
TextDrawBackgroundColor(LightYellowSpeed[i],0x000000ff);
TextDrawFont(LightYellowSpeed[i],3);
TextDrawLetterSize(LightYellowSpeed[i],1.000000,1.200000);
TextDrawColor(LightYellowSpeed[i],0xffffffff);
TextDrawSetOutline(LightYellowSpeed[i],1);
TextDrawSetProportional(LightYellowSpeed[i],1);
TextDrawSetShadow(LightYellowSpeed[i],1);
            TextDrawShowForPlayer(i, LightYellowSpeed[i]);
            LightYellowSpeedCreated[i] = true;

//------To sam preuzeo----------

            OldX[i] = X; OldY[i] = Y; OldZ[i] = Z;

//-----Boje na brzinomjeru-------
}
else
{
    if(TextDrawsShown[i] == true)
    {
TextDrawHideForPlayer(i, Text:Black0);
TextDrawHideForPlayer(i, Text:White1);
TextDrawHideForPlayer(i, Text:White2);
TextDrawHideForPlayer(i, Text:BlackHealth);
TextDrawHideForPlayer(i, Text:DarkRedHealth);
TextDrawHideForPlayer(i, Text:BlackSpeed);
TextDrawHideForPlayer(i, Text:DarkYellowSpeed);
TextDrawHideForPlayer(i, Text:Marker);
TextDrawHideForPlayer(i, Text:Exclamation);
    TextDrawsShown[i] = false;
}
TextDrawHideForPlayer(i, Text:VHS[i]);
TextDrawHideForPlayer(i, Text:LightRedHealth[i]);
TextDrawHideForPlayer(i, Text:LightGreenSpeed[i]);
}
}
}
}

//*Eto ga ovo je kraj ovoga FS-a,nadam se da ste zadovoljni.



Sutra cu dodati AFK system koji je razor rekao da svako moze napraviti :)

Napravio:FallOut
Objavio:kizla
Poslednja Izmena: Jul 01, 2019, 23:28:53 POSLE PODNE od Mister Naithan

Ova tema ce ti se lapo pobrisati jer je taj speedometer od FallOut-a.

[NUDIM ]
Gang-Rush server TDM besplatno


zerocoolos

yep, to sam i ja primjetio... mislim da nije u redu tudje radove prisvojiti kao tudje...

da slazem se u potpunosti sa zerom i plivom... do jucer je ovaj kizla u svakom podforumu trazio pomoc sada odjednom kao zna i gamemod mu na 90% hah... nznm sta bi reko...

kizla

Ljudi neznam posto ja sam otvorio odan FS kada sam skinuo samp server i isao sam ubacivati stvari u njega nije uopce bilo credits zapocelo je sa include i ja sam dodavao kao sto sam reko+imo sam pomoc frenda tako da on mi je pomogo i ja sam neke stvari ubacio nisam znao...

Ludi Grad

Citat: kizla poslato Januar 13, 2010, 06:46:47 PRE PODNE
Ljudi neznam posto ja sam otvorio odan FS kada sam skinuo samp server i isao sam ubacivati stvari u njega nije uopce bilo credits zapocelo je sa include i ja sam dodavao kao sto sam reko+imo sam pomoc frenda tako da on mi je pomogo i ja sam neke stvari ubacio nisam znao...
ma daj kilzla.....ne moze nauciti skriptati preko noci........priznas lijepo nasao sam ovo u nekom GM i napisao........a ne evo ja sam napravio svoju FS, a sto rece Capo do juce si otvarao 1000 pitanja u vezi nekih sitnica oko skriptanja.......necemo se lagati.......
P.S. U zivotu samo nemoj lagati, jer znas ono "U lazi su kratke noge"  ;)  :P

Citat: kizla poslato Januar 12, 2010, 22:08:24 POSLE PODNE
Napravio:FallOut
Objavio:kizla

Tema bi bila pobrisana da to nisi dodo.Ovo je prvi i zadnji put da si probo tako nekog prevarit na ovom forumu ;) (prevario si sam sebe).

r4z0r

Kopirana scripta , posto si to dodao oprostit cu ti .
Izbrisi iz codea da je tvoja scripta .