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
[POMOC]Oko speedometra
670
pregleda
16
postova
26. Dec. 2013.
Ovo sam sad izvukao iz GameModa molim vas nemojte da kradete
/*
==============================
Naziv: speedobykroni
Vreme rada: 10 min
Verzija: 1.0
Izradio: Kroni
==============================
*/
#include
////////////////////////////////////////////////////////////////////////////////
#define ZELENA2 0x00FF00FF
////////////////////////////////////////////////////////////////////////////////
new Text:box,Text:speed;
////////////////////////////////////////////////////////////////////////////////
forward SpeedoUpdate();
////////////////////////////////////////////////////////////////////////////////
public OnPlayerConnect(playerid)
{
speed = TextDrawCreate(539.000000, 427.000000,"");
TextDrawLetterSize(speed,0.5,2);
TextDrawSetOutline(speed,2);
TextDrawColor(speed,ZELENA2);
TextDrawFont(speed,1);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
public OnGameModeInit()
{
SetTimer("SpeedoUpdate",0,1);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
public SpeedoUpdate()
{
for(new i = 0;i {
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
new Float:x,Float:y,Float:z,Float:hp,string,vehicleid = GetPlayerVehicleID(i);
TextDrawShowForPlayer(i,speed);
GetVehicleVelocity(vehicleid,x,y,z);
format(string,sizeof(string),"%dkm/h",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667));
TextDrawSetString(speed,string);
format(string,sizeof(string),"Health: %d",floatround(hp));
}
if(!IsPlayerInAnyVehicle(i))
{
TextDrawHideForPlayer(i,box);
TextDrawHideForPlayer(i,speed);
}
}
} 26. Dec. 2013.
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
Ne nego da vidim sta ti nevalja jbt te tvoj speedo Ima mnogo boljih a i da ocu uzeo bih kod koji si dao
26. Dec. 2013.
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
26. Dec. 2013.
/*
==============================
Naziv: speedobykroni
Vreme rada: 10 min
Verzija: 1.0
Izradio: Kroni
==============================
*/
#include
////////////////////////////////////////////////////////////////////////////////
#define ZELENA2 0x00FF00FF
////////////////////////////////////////////////////////////////////////////////
new Text:box,Text:speed;
////////////////////////////////////////////////////////////////////////////////
forward SpeedoUpdate();
////////////////////////////////////////////////////////////////////////////////
public OnPlayerConnect(playerid)
{
speed = TextDrawCreate(539.000000, 427.000000,"");
TextDrawLetterSize(speed,0.5,2);
TextDrawSetOutline(speed,2);
TextDrawColor(speed,ZELENA2);
TextDrawFont(speed,1);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
public OnGameModeInit()
{
SetTimer("SpeedoUpdate",0,500);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
public SpeedoUpdate()
{
for(new i = 0;i {
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
new Float:x,Float:y,Float:z,Float:hp,string,vehicleid = GetPlayerVehicleID(i);
TextDrawShowForPlayer(i,speed);
GetVehicleVelocity(vehicleid,x,y,z);
format(string,sizeof(string),"%dkm/h",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667));
TextDrawSetString(speed,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);
TextDrawHideForPlayer(i,speed);
}
}
} sledeci put sam radi
26. Dec. 2013.
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
26. Dec. 2013.
stavi ovako
/*
==============================
Naziv: speedobykroni
Vreme rada: 10 min
Verzija: 1.0
Izradio: Kroni
==============================
*/
#include
////////////////////////////////////////////////////////////////////////////////
#define ZELENA2 0x00FF00FF
////////////////////////////////////////////////////////////////////////////////
new Text:box,Text:speed;
////////////////////////////////////////////////////////////////////////////////
forward SpeedoUpdate();
////////////////////////////////////////////////////////////////////////////////
public OnPlayerConnect(playerid)
{
speed = TextDrawCreate(539.000000, 427.000000,"");
TextDrawLetterSize(speed,0.5,2);
TextDrawSetOutline(speed,2);
TextDrawColor(speed,ZELENA2);
TextDrawFont(speed,1);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
public OnGameModeInit()
{
SetTimer("SpeedoUpdate",0,500);
return 1;
}
////////////////////////////////////////////////////////////////////////////////
public SpeedoUpdate()
{
for(new i = 0;i {
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
new Float:x,Float:y,Float:z,Float:hp,string,vehicleid = GetPlayerVehicleID(i);
TextDrawShowForPlayer(i,speed);
GetVehicleVelocity(vehicleid,x,y,z);
format(string,sizeof(string),"%dkm/h",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*250.666667));
TextDrawSetString(speed,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);
TextDrawHideForPlayer(i,speed);
}
}
} Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava