[Pedido] Palavras no radar
#1

Bom galera na PPC_Trucking vocк tem a opзгo de criar radar onde vocк quiser usando apenas um comando e pode por a velocidade que quiser, porйm nгo tem como o player saber a velocidade no radar, entгo eu gostaria de por umas letras vermelhas que para aparecer em todo radar criado dizendo a velocidade do radar.
Por exemplo essa imagem й como eu gostaria que o radar ficasse : http://prntscr.com/2mjtcp
Serб que alguem pode me ajudar ?
Reply
#2

Vк se funciona >
Quote:

Create3DTextLabel("Radar: Mбximo 120 Km/h",0xFF0000FF,x,y,x);

Reply
#3

Quote:
Originally Posted by SouUmaJujuba
Посмотреть сообщение
Vк se funciona >
Cara eu fiz assim coloquei para que sempre que eu criasse um radar jб aparecer a velocidade do mesmo aн code ficou assim:
Код:
COMMAND:criarradar(playerid, params[]) 
{ 
new xRL [ 50 ], Float:x ;

// Setup local variables 
new Float, Float:y, Float:z, Float:Angle, MaxSpeed, file[100], File:PFile, LineForFile[100], Msg[128]; 

// Check if the player has logged in 
if (APlayerData[playerid][LoggedIn] == true) 
{ 
// Check if the player's admin-level is at least 5 
if (APlayerData[playerid][PlayerLevel] >= 5) 
{ 
if (sscanf(params, "i", MaxSpeed)) SendClientMessage(playerid, 0xFF0000AA, "Digite: \"/criarradar <Velocidade>\""); 
else 
{ 

// Get player's position and facing angle 
GetPlayerPos(playerid, x, y, z); 
GetPlayerFacingAngle(playerid, Angle); 
format(xRL, sizeof(xRL), "Radar \nVelocidade Mбxima\n %i kmh", MaxSpeed); 
Create3DTextLabel(xRL, 0xFFFFFFFF, x, y, z, 150.0, 0, 0);   
z = z - 1.0; // Adjust camera Z-coordinate 1m lower than normal (otherwise the camera floats in the air) 

// Move the player a bit, otherwise he could get stuck inside the camera-object 
SetPlayerPos(playerid, x, y + 1.0, z + 1.0); 

// Save the camera to a file 
for (new CamID; CamID < MAX_CAMERAS; CamID++) 
{ 
// Check if this index is free 
if (ACameras[CamID][CamSpeed] == 0) 
{ 
// Setup this camera (create the objects and store the data) 
SetupSpeedCamera(CamID, x, y, z, Angle, MaxSpeed); 

// Save the file 
format(file, sizeof(file), CameraFile, CamID); // Construct the complete filename for this camera-file 

PFile = fopen(file, io_write); // Open the camera-file for writing 

format(LineForFile, 100, "CamX %f\r\n", x); 
fwrite(PFile, LineForFile); // And save it to the file 
format(LineForFile, 100, "CamY %f\r\n", y); 
fwrite(PFile, LineForFile); // And save it to the file 
format(LineForFile, 100, "CamZ %f\r\n", z); 
fwrite(PFile, LineForFile); // And save it to the file 
format(LineForFile, 100, "CamAngle %f\r\n", Angle); 
fwrite(PFile, LineForFile); // And save it to the file 
format(LineForFile, 100, "CamSpeed %i\r\n", MaxSpeed); 
fwrite(PFile, LineForFile); // And save it to the file 

fclose(PFile); // Close the file 

// Let the player know he created a new camera 
format(Msg, 128, "Voce criou o radar de ID: %i", CamID); 
SendClientMessage(playerid, 0x00FF00FF, Msg); 

// Exit the function 
return 1; 
} 
}
Porйm quando eu compilo aparece esse erro : http://prntscr.com/2mjz1q
e o simbolo Float jб foi usada, ou me embolei, nгo sei oq faзo ;s
Reply
#4

tira esse ,Float:X dps do xRL
Reply
#5

Quote:
Originally Posted by Juniiro3
Посмотреть сообщение
tira esse ,Float:X dps do xRL
Tirei e olha os erros .
Код:
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_PlayerCommands.inc(2965) : error 017: undefined symbol "x"
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_PlayerCommands.inc(2968) : error 017: undefined symbol "x"
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_PlayerCommands.inc(2972) : error 017: undefined symbol "x"
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_PlayerCommands.inc(2981) : error 017: undefined symbol "x"
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_PlayerCommands.inc(2988) : error 017: undefined symbol "x"
C:\Users\Julio\Desktop\PPC_Trucking\pawno\include\PPC_PlayerCommands.inc(2951) : warning 203: symbol is never used: "Float"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
E agora ? зз
Reply
#6

E na linha de baixo onde ta Float tu poem Float: x
Reply
#7

Quote:
Originally Posted by Juniiro3
Посмотреть сообщение
E na linha de baixo onde ta Float tu poem Float: x
Aeeeeee, obrigado ! , agora sу uma coisa, quando crio o radar fica com a velocidade, e depois quando tiro o radar o radar sai e as letras continuam, e agora ? ;/
Reply
#8

Agora й com vocк, estuda e faзa. PS: Quando der GMX as letras vгo sumir tbm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)