[POMOC]Oko speedometra


Započeo Ciger, Decembar 26, 2013, 12:20:54 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:moje filterscripta
Detaljan opis problema:napravio sam filterscriptu speedometar i zelim da dodam menjac brzine misi da ima odredjeno a ne znam kako pa ako moze pomoc
Dio skripte: dacu ako treba
Neke slike/video za lakse dobivanje pomoci(neobavezno):dacu ako treba

mislis da samo prikacuje brzine ili da ti bude manuelni mjenjac? kako si zamislio
Respect: Peter Memorex and C++


Ovo sam sad izvukao iz GameModa molim vas nemojte da kradete
/*
==============================
Naziv: speedobykroni
Vreme rada: 10 min
Verzija: 1.0
Izradio: Kroni
==============================
*/
#include <a_samp>
////////////////////////////////////////////////////////////////////////////////
#define ZELENA2 0x00FF00FF
////////////////////////////////////////////////////////////////////////////////
new Text:box[MAX_PLAYERS],Text:speed[MAX_PLAYERS];
////////////////////////////////////////////////////////////////////////////////
forward SpeedoUpdate();
////////////////////////////////////////////////////////////////////////////////
public OnPlayerConnect(playerid)
{
    speed[playerid] = TextDrawCreate(539.000000, 427.000000,"");
    TextDrawLetterSize(speed[playerid],0.5,2);
    TextDrawSetOutline(speed[playerid],2);
    TextDrawColor(speed[playerid],ZELENA2);
    TextDrawFont(speed[playerid],1);
    return 1;
}
////////////////////////////////////////////////////////////////////////////////
public OnGameModeInit()
{
    SetTimer("SpeedoUpdate",0,1);
	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,speed[i]);
            GetVehicleVelocity(vehicleid,x,y,z);
            format(string,sizeof(string),"%dkm/h",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667));
            TextDrawSetString(speed[i],string);
            format(string,sizeof(string),"Health: %d",floatround(hp));
        }
        if(!IsPlayerInAnyVehicle(i))
        {
            TextDrawHideForPlayer(i,box[i]);
            TextDrawHideForPlayer(i,speed[i]);
            }
        }
}


da vidis kako izgleda pa ako ti se svidja da uzmes a? nemoze

Hhahaha Omg xD
Ne nego da vidim sta ti nevalja jbt te tvoj speedo Ima mnogo boljih a i da ocu uzeo bih kod koji si dao

Eto ja sam uzeo hvala na kodu... Daj brate stace mi tvoj speedo samo ocu da ti pomognem ako hoces automatski menjac znaci if(floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) > 0 && floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) < 20 ... npr
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).



Rekao sam ti npr

if(floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) > 0 && floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) < 20) 
{
TextDrawSetSting... npr
}
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


gde to da dodam ako meza da mi celo uradis jbt zato sam posao ovo za pomovc

/*
==============================
Naziv: speedobykroni
Vreme rada: 10 min
Verzija: 1.0
Izradio: Kroni
==============================
*/
#include <a_samp>
////////////////////////////////////////////////////////////////////////////////
#define ZELENA2 0x00FF00FF
////////////////////////////////////////////////////////////////////////////////
new Text:box[MAX_PLAYERS],Text:speed[MAX_PLAYERS];
////////////////////////////////////////////////////////////////////////////////
forward SpeedoUpdate();
////////////////////////////////////////////////////////////////////////////////
public OnPlayerConnect(playerid)
{
    speed[playerid] = TextDrawCreate(539.000000, 427.000000,"");
    TextDrawLetterSize(speed[playerid],0.5,2);
    TextDrawSetOutline(speed[playerid],2);
    TextDrawColor(speed[playerid],ZELENA2);
    TextDrawFont(speed[playerid],1);
    return 1;
}
////////////////////////////////////////////////////////////////////////////////
public OnGameModeInit()
{
    SetTimer("SpeedoUpdate",0,500);
	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,speed[i]);
            GetVehicleVelocity(vehicleid,x,y,z);
            format(string,sizeof(string),"%dkm/h",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667));
            TextDrawSetString(speed[i],string);
            format(string,sizeof(string),"Health: %d",floatround(hp));
            if(floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) > 0 && floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) < 20)
			{
			GameTextForPlayer(playerid,"BRZINA: 1",500,1);
			}
            if(floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) >= 20 && floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) < 40)
			{
			GameTextForPlayer(playerid,"BRZINA: 2",500,1);
			}
   			if(floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) >= 40 && floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) < 60)
			{
			GameTextForPlayer(playerid,"BRZINA: 3",500,1);
			}
            if(floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) >= 60 && floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) < 80)
			{
			GameTextForPlayer(playerid,"BRZINA: 4",500,1);
			}
            if(floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) >= 80 && floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) < 100)
			{
			GameTextForPlayer(playerid,"BRZINA: 5",500,1);
			}
        }
        if(!IsPlayerInAnyVehicle(i))
        {
            TextDrawHideForPlayer(i,box[i]);
            TextDrawHideForPlayer(i,speed[i]);
            }
        }
}


sledeci put sam radi
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


C:\Documents and Settings\Kroni\Desktop\UGRP v1.0\filterscripts\speedobykroni.pwn(47) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Kroni\Desktop\UGRP v1.0\filterscripts\speedobykroni.pwn(51) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Kroni\Desktop\UGRP v1.0\filterscripts\speedobykroni.pwn(55) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Kroni\Desktop\UGRP v1.0\filterscripts\speedobykroni.pwn(59) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Kroni\Desktop\UGRP v1.0\filterscripts\speedobykroni.pwn(63) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Kroni\Desktop\UGRP v1.0\filterscripts\speedobykroni.pwn(67) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Kroni\Desktop\UGRP v1.0\filterscripts\speedobykroni.pwn(71) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.

Nzm st oal ovo mi izbacuje

stavi ovako

/*
==============================
Naziv: speedobykroni
Vreme rada: 10 min
Verzija: 1.0
Izradio: Kroni
==============================
*/
#include <a_samp>
////////////////////////////////////////////////////////////////////////////////
#define ZELENA2 0x00FF00FF
////////////////////////////////////////////////////////////////////////////////
new Text:box[MAX_PLAYERS],Text:speed[MAX_PLAYERS];
////////////////////////////////////////////////////////////////////////////////
forward SpeedoUpdate();
////////////////////////////////////////////////////////////////////////////////
public OnPlayerConnect(playerid)
{
    speed[playerid] = TextDrawCreate(539.000000, 427.000000,"");
    TextDrawLetterSize(speed[playerid],0.5,2);
    TextDrawSetOutline(speed[playerid],2);
    TextDrawColor(speed[playerid],ZELENA2);
    TextDrawFont(speed[playerid],1);
    return 1;
}
////////////////////////////////////////////////////////////////////////////////
public OnGameModeInit()
{
    SetTimer("SpeedoUpdate",0,500);
	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,speed[i]);
            GetVehicleVelocity(vehicleid,x,y,z);
            format(string,sizeof(string),"%dkm/h",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667));
            TextDrawSetString(speed[i],string);
            format(string,sizeof(string),"Health: %d",floatround(hp));
            if(floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) > 0 && floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) < 20)
			{
			GameTextForPlayer(i,"BRZINA: 1",500,1);
			}
            if(floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) >= 20 && floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) < 40)
			{
			GameTextForPlayer(i,"BRZINA: 2",500,1);
			}
   			if(floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) >= 40 && floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) < 60)
			{
			GameTextForPlayer(i,"BRZINA: 3",500,1);
			}
            if(floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) >= 60 && floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) < 80)
			{
			GameTextForPlayer(i,"BRZINA: 4",500,1);
			}
            if(floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) >= 80 && floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667) < 100)
			{
			GameTextForPlayer(i,"BRZINA: 5",500,1);
			}
        }
        if(!IsPlayerInAnyVehicle(i))
        {
            TextDrawHideForPlayer(i,box[i]);
            TextDrawHideForPlayer(i,speed[i]);
            }
        }
}
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


e jbg, nisam ni skontao, ja sam trazio da ja sam menjam brzine ako moze nekako?