[Pomoc] Speedo Metar

Započeo Elmedin Techo
2. Apr. 2012. Zaključano
709
pregleda
4
postova
Elmedin Techo
4
Shot Caller
2. Apr. 2012.
Skripta koju koristim: Moj GM
Detaljan opis problema: Sve sam pokusao i opet nece :S evo: 
 warning 235: public function lacks forward declaration (symbol "CheckStatus")
error 012: invalid function call, not a valid address
error 017: undefined symbol "Player"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Dio skripte:
//Speedo meter

public CheckStatus()
{
new foreach;
foreach (Player, i)
{
if(IsPlayerInAnyVehicle(i))
{
if(TextShow == false)
{
    TextDrawShowForPlayer(i, Text:Black0);
    TextDrawShowForPlayer(i, Text:Black1);
    TextDrawShowForPlayer(i, Text:Black2);
    TextDrawShowForPlayer(i, Text:Black3);
    TextDrawShowForPlayer(i, Text:LightBlack);
    TextShow = true;
}
        new Float:X, Float:Y, Float:Z, Float:Speed;
        new vehicle = GetPlayerVehicleID(i);
                GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
                Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)),  floatpower(Z, 2))), 100.0);
format(String,sizeof(String),"~b~ ~n~~r~Gorivo: ~w~%i~n~~r~km/h: ~w~%i", Gas, floatround(Speed*2, floatround_floor));
if(VHSCreated == true)
{
TextDrawDestroy(VHS);
}
VHS = TextDrawCreate(541.000000,137.000000,String);
TextDrawAlignment(VHS,0);
TextDrawBackgroundColor(VHS,0x000000ff);
TextDrawFont(VHS,1);
TextDrawLetterSize(VHS,0.259999,1.000000);
TextDrawColor(VHS,0xffffffff);
TextDrawSetOutline(VHS,1);
TextDrawSetProportional(VHS,1);
TextDrawSetShadow(VHS,1);
            TextDrawShowForPlayer(i, VHS);
            VHSCreated = true;

}
else
{
    if(TextShow == true)
    {
TextDrawHideForPlayer(i, Text:Black0);
TextDrawHideForPlayer(i, Text:Black1);
TextDrawHideForPlayer(i, Text:Black2);
TextDrawHideForPlayer(i, Text:Black3);
TextDrawHideForPlayer(i, Text:LightBlack);
TextDrawHideForPlayer(i, Text:VHS);
    TextShow = false;
}
}
}
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
DAJ SREDI MI NEKO TO , KAKO GOD SAM POKUSAO NECE , NEZZ STO !!!!!!!!!!!!!!!!!!!!!!!
Luis
5
Godfather
2. Apr. 2012.
forward CheckStatus();
Deleted User
Obrisan korisnik
2. Apr. 2012.
Elmedine, samo stavi:
forward CheckStatus();
i problem rijesen, jer nemoze da nadje forward od publica i daje error na tu liniju ...
Deleted User
Obrisan korisnik
3. Apr. 2012.
Foreach ne mozes tako definisati (mislim na new foreach😉!
To obrisi i skini include foreach: http://forum.sa-mp.com/showthread.php?t=92679 i dodaj #include

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha