Szerző Téma: Sebességmérõ  (Megtekintve 2770 alkalommal)

Sebességmérõ
« Dátum: 2013. Június 01. - 22:48:13 »
+1 Show voters
Üdv írtam egy kis sebesség mérõ scriptet gondoltam valakinek hasznos lesz. :-*
kép: http://www.kepfeltoltes.hu/view/130602/screen_www.kepfeltoltes.hu_.png
bocs hogy angol de nem passzolt ide a magyar szöveg.-..-
Mérõ:
- sebesség
- Élet
.
 
#include <a_samp>
forward SpeedoUpdate();
new Text:box[MAX_VEHICLES],Text:speed[MAX_VEHICLES],Text:health[MAX_VEHICLES];
public OnFilterScriptInit()
{
SetTimer(\"SpeedoUpdate\",100,1);
return 1;
}
public OnPlayerConnect(playerid)
{
box[playerid] = TextDrawCreate(618,389,\"_\");
TextDrawLetterSize(box[playerid],0.5,2.599999);
TextDrawUseBox(box[playerid],1);
TextDrawBoxColor(box[playerid],0x00000060);
TextDrawTextSize(box[playerid],473,0);
speed[playerid] = TextDrawCreate(478,389,\"_\");
TextDrawLetterSize(speed[playerid],0.37,1.099999);
TextDrawSetOutline(speed[playerid],1);
health[playerid] = TextDrawCreate(478,401,\"_\");
TextDrawLetterSize(health[playerid],0.37,1.099999);
TextDrawSetOutline(health[playerid],1);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
TextDrawDestroy(box[playerid]);
TextDrawDestroy(speed[playerid]);
TextDrawDestroy(health[playerid]);
return 1;
}
public SpeedoUpdate()
{
for(new i = 0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
   new Float:x,Float:y,Float:z,Float:hp,string[24],vehicleid = GetPlayerVehicleID(i);
   TextDrawShowForPlayer(i,box);
   TextDrawShowForPlayer(i,speed);
   TextDrawShowForPlayer(i,health);
   GetVehicleVelocity(vehicleid,x,y,z);
   GetVehicleHealth(vehicleid,hp);
   format(string,sizeof(string),\"Speed: %dkph\",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667));
   TextDrawSetString(speed,string);
   format(string,sizeof(string),\"Health: %d\",floatround(hp));
   TextDrawSetString(health,string);
}
if(!IsPlayerInAnyVehicle(i))
{
   TextDrawHideForPlayer(i,box);
   TextDrawHideForPlayer(i,speed);
   TextDrawHideForPlayer(i,health);
}
}
}
« Utoljára szerkesztve: 2013. Június 02. - 11:43:29 írta Ja]SP[eR »

Sebességmérõ
« Válasz #1 Dátum: 2013. Június 02. - 07:47:36 »
0 Show voters
Valami kép?

Nem elérhető gbr333

  • 670
    • Profil megtekintése
Sebességmérõ
« Válasz #2 Dátum: 2013. Június 02. - 08:09:29 »
0 Show voters
Igen, kép az jó lenne!

Nem elérhető CANNONN

  • 2139
    • Profil megtekintése
Sebességmérõ
« Válasz #3 Dátum: 2013. Június 02. - 09:03:24 »
0 Show voters
[mod]Egy képet jó lenne, ha feldobnál![/mod]

xD1999

  • Vendég
Sebességmérõ
« Válasz #4 Dátum: 2013. Június 02. - 09:10:14 »
0 Show voters
Jó script de 1 képet dobhatnál fel!

Dupla hozzászólás automatikusan összefûzve. ( 2013. Június 02. - 14:36:30 )

Még tehetnél bele parancsot hogy /speedometer-on /speedometer-off vagy /speedon /speedoff
« Utoljára szerkesztve: 2013. Június 02. - 14:36:30 írta xD1999 »

Nem elérhető ][Fo[R]cE][

  • 86
  • SAJT!
    • Profil megtekintése
Sebességmérõ
« Válasz #5 Dátum: 2013. Június 08. - 11:56:58 »
0 Show voters
Elég jó, de:
 
bocs hogy angol de nem passzolt ide a magyar szöveg.-..-[/quote]
szkript elején
#include <fixchars>

 és már megy is :)

Nem elérhető ZSOLTI99

  • 1827
    • Profil megtekintése
Sebességmérõ
« Válasz #6 Dátum: 2013. Június 08. - 19:12:36 »
0 Show voters
Nem is õ írta itt van az eredeti csak kivette belõle a Fuell-es részét ugyan az.... xd
http://forum.sa-mp.com/showthread.php?t=244007

Sebességmérõ
« Válasz #7 Dátum: 2013. Június 09. - 09:08:03 »
0 Show voters
[gmod]Zárok és figyelmeztetést kiosztom.[/gmod]

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal