[Ajuda] Text Draw No Radar
#1

Ola Eu Quero Saber Como Colocar Texto Sorteio Embaixo Do Radar!
Exemplo: / criarradar 120 Ai Aparece o Texto VELOCIDADE Max 120 kmh
ME AJUDE
Reply
#2

Nгo й Text Draw, e sim Create3DTextLabel

Create3DTextLabel
Bom proveito =)
Reply
#3

mais eu queria sem isso Create3DTextLabel >> + localizaзao !!
quero um quando eu criar o radar aparece o texto no radar
Reply
#4

Tipo no comando de criar o radar vocк adiciona isso:

PHP код:
static xPos[3];

GetPlayerPos(playeridxPos[0], xPos[1], xPos[2]);
Create3DTextLabel("Radar \nVelocidade Mбxima\n 120 kmh "0xFFFFFFFFxPos[0], xPos[1], xPos[2], 150.000); 
Explicaзхes:

Na wiki tem todas.
xPos[0] = Pega a cordenada X
xPos[1] = Pega a cordenada Y
xPos[2] = Pega a cordenada Z

150.0 = A distвncia de onde vocк й capaz de ver a mensagem.

Й facinho mano.
Reply
#5

cara desculpa te dizer isso mais eu n entendi
faz ae e me manda onde vc colocou
// This command allows you to create a speedcamera
COMMAND:criarradar(playerid, params[])
{
// Setup local variables
new Float, Float:y, Float:z, Float:Angle, MaxSpeed, file[100], File:PFile, LineForFile[100], Msg[128];

// Send the command to all admins so they can see it
SendAdminText(playerid, "/criarradar", params);

// 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);
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;
}
}

// In case all camera-slots are occupied (100 camera's have been created already), let the player know about it
format(Msg, 128, "{FF0000}Voce nao Pode Criar mais de %i Radares", MAX_CAMERAS);
SendClientMessage(playerid, 0xFFFFFFFF, Msg);
}
}
else
return 0;
}
else
return 0;

// Let the server know that this was a valid command
return 1;
}

// This command allows you to delete a speedcamera
COMMAND:deletarradar(playerid, params[])
{
// Setup local variables
new file[100], Msg[128];

// Send the command to all admins so they can see it
SendAdminText(playerid, "/deletarradar", params);

// 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)
{
// Loop through all camera's
for (new CamID; CamID < MAX_CAMERAS; CamID++)
{
// Check if this index is used
if (ACameras[CamID][CamSpeed] != 0)
{
// Check if the player is in range of the camera
if (IsPlayerInRangeOfPoint(playerid, 5.0, ACameras[CamID][CamX], ACameras[CamID][CamY], ACameras[CamID][CamZ]))
{
// Delete the file
format(file, sizeof(file), CameraFile, CamID); // Construct the complete filename for this camera-file
if (fexist(file)) // Make sure the file exists
fremove(file); // Delete the file

// Delete both camera objects
DestroyObject(ACameras[CamID][CamObj1]);
DestroyObject(ACameras[CamID][CamObj2]);
DestroyDynamicMapIcon(ACameras[CamID][CamIcon]);
// Also clear the data from memory
ACameras[CamID][CamX] = 0.0;
ACameras[CamID][CamY] = 0.0;
ACameras[CamID][CamZ] = 0.0;
ACameras[CamID][CamAngle] = 0.0;
ACameras[CamID][CamSpeed] = 0;
ACameras[CamID][CamObj1] = 0;
ACameras[CamID][CamObj2] = 0;
ACameras[CamID][CamIcon] = 0;

// Let the player know he deleted a camera
format(Msg, 128, "Vocк deletou o radar %i", CamID);
SendClientMessage(playerid, 0x00FF00FF, Msg);

// Exit the function
return 1;
}
}
}

// In case the player wasn't near a speedcamera, inform him about it
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000} Esteja em um radar para deletб-lo");
}
else
return 0;
}
else
return 0;

// Let the server know that this was a valid command
return 1;
}
Reply
#6

me manda ai ja feito
quando eu digitar /criarradar e a velocidade aparece o texto mais a velocidade q eu criei o radar
Reply
#7

Coloque o cуdigo em [*pawn] Cуdigo Aqui [*/pawn]
Sem o *.

Tenta fazer igual falei, se der erro posta aqui que lhe ajudo, pare de ser folgado.
Reply
#8

lol eu n sou folgado mano
eu so n entendo pq estou aui para aprender
entao me add no skype e me encina la : )
add: jhonatan.andrade9
Reply
#9

PHP код:
Create3DTextLabel "Radar\nVelocidade Mбxima\n120 KMH", -1xyz150.00) ; 
Coloca no seu comando
Reply
#10

Jб que estou sem nada pra fazer eu fiz, ve se vai ae:

PHP код:
COMMAND:criarradar(playeridparams[])
{
// Setup local variables
new FloatFloat:yFloat:zFloat:AngleMaxSpeedfile[100], File:PFileLineForFile[100], Msg[128];
// Send the command to all admins so they can see it
SendAdminText(playerid"/criarradar"params);
// 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(playerid0xFF0000AA"Digite: \"/criarradar <Velocidade>\"");
else
{
// Get player's position and facing angle
GetPlayerPos(playeridxyz);
GetPlayerFacingAngle(playeridAngle);
format(xRLsizeof(xRL), "Radar \nVelocidade Mбxima\n %i kmh"MaxSpeed);
Create3DTextLabel(xRL0xFFFFFFFFxyz150.000);  
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(playeridx1.01.0);
// Save the camera to a file
for (new CamIDCamID MAX_CAMERASCamID++)
{
// Check if this index is free
if (ACameras[CamID][CamSpeed] == 0)
{
// Setup this camera (create the objects and store the data)
SetupSpeedCamera(CamIDxyzAngleMaxSpeed);
// Save the file
format(filesizeof(file), CameraFileCamID); // Construct the complete filename for this camera-file
PFile fopen(fileio_write); // Open the camera-file for writing
format(LineForFile100"CamX %f\r\n"x);
fwrite(PFileLineForFile); // And save it to the file
format(LineForFile100"CamY %f\r\n"y);
fwrite(PFileLineForFile); // And save it to the file
format(LineForFile100"CamZ %f\r\n"z);
fwrite(PFileLineForFile); // And save it to the file
format(LineForFile100"CamAngle %f\r\n"Angle);
fwrite(PFileLineForFile); // And save it to the file
format(LineForFile100"CamSpeed %i\r\n"MaxSpeed);
fwrite(PFileLineForFile); // And save it to the file
fclose(PFile); // Close the file
// Let the player know he created a new camera
format(Msg128"Voce Criou o Radar de ID: %i"CamID);
SendClientMessage(playerid0x00FF00FFMsg);
// Exit the function
return 1;
}
}
// In case all camera-slots are occupied (100 camera's have been created already), let the player know about it
format(Msg128"{FF0000}Voce nao Pode Criar mais de %i Radares"MAX_CAMERAS);
SendClientMessage(playerid0xFFFFFFFFMsg);
}
}
else
return 
0;
}
else
return 
0;
// Let the server know that this was a valid command
return 1;

Reply
#11

C:\Users\jhonatan\Desktop\TRUCKVL\pawno\include\PP C_DefTexts.inc(270) : warning 201: redefinition of constant/macro (symbol "TXT_TimedRentCar")
C:\Users\jhonatan\Desktop\TRUCKVL\pawno\include\PP C_PlayerCommands.inc(2949) : error 017: undefined symbol "x"
C:\Users\jhonatan\Desktop\TRUCKVL\pawno\include\PP C_PlayerCommands.inc(2951) : error 017: undefined symbol "xRL"
C:\Users\jhonatan\Desktop\TRUCKVL\pawno\include\PP C_PlayerCommands.inc(2951) : error 017: undefined symbol "xRL"
C:\Users\jhonatan\Desktop\TRUCKVL\pawno\include\PP C_PlayerCommands.inc(2951) : error 029: invalid expression, assumed zero
C:\Users\jhonatan\Desktop\TRUCKVL\pawno\include\PP C_PlayerCommands.inc(2951) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#12

deu erros
Reply
#13

PHP код:
new xRL 50 ], Float:
Reply
#14

cara obrigado ae de coraзao vlw
parabens vc й foda deu vlw
Reply
#15

aa e o comando deletar radar n deleta o txt ajuda eu ae
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)