[Ajuda] Ajuda no Label do Radar
#1

Pessoal, estou precisando de ajuda com o Label, Fica dando esse erro

pawno\include\PPC_PlayerCommands.inc(2811) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Sou Novato aqui, Jб vi bastante coisas aqui do Fуrum e aprendi muitas coisas mas to com essa duvida!


Linha do erro
xRL = Create3DTextLabel(xRL);

й por causa do (xRL); O que eu tenho que por la?

Alguйm me ajuda ai? vlw
Reply
#2

pawn Code:
new Text3D:EX;
Ex = Create3DTextLabel(Texto[], Cor, X, Y, Z, DrawDistance, VirtualWorld, testLOS);
Create3DTextLabel
Reply
#3

Consegui!! Agora aparece o Label Deleta Tambem Sу tem Um Plobema!!! O Objeto nгo esta aparecendo!! Alguem ai Pode me Ajudar?


COMMAND:testeradar(playerid, params[])
{
new xRL [ 50 ];
// 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);
format(xRL, sizeof(xRL), "{089AFC}Radar devagar \n{0029FF}Velocidade Mбxima\n{FFFFFF} %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;
}
}

// 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;
}
Reply
#4

Quote:
Originally Posted by TenhoUmaDuvida
View Post
Consegui!! Agora aparece o Label Deleta Tambem Sу tem Um Plobema!!! O Objeto nгo esta aparecendo!! Alguem ai Pode me Ajudar?


COMMAND:testeradar(playerid, params[])
{
new xRL [ 50 ];
// 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);
format(xRL, sizeof(xRL), "{089AFC}Radar devagar \n{0029FF}Velocidade Mбxima\n{FFFFFF} %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;
}
}

// 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;
}
Amigo quando for postar algum cуdigo Pawn use:
[ pawn ]
[ / pawn ]

Sem espaзos.
Reply
#5

Foi mal sou novo aqui! mas pode me ajudar ai alguem?
Reply
#6

Teste mudar:
pawn Code:
new xRL [50];
Para:
pawn Code:
new xRL [100];
Nгo sei por que estб dando erro o argumento 1 da linha estб certo.
Reply
#7

Nгo consegui o Label aparece mais o Objeto nгo! (O Objeto do Radar nгo ta aparecendo)
Tem mais alguma sugestгo?
Reply
#8

Nгo tem que colocar no /criarradar, й nas includes.

Olhe esse tуpico meu, Tbm nгo sabia por, que vc vai conseguir

AQUI
Reply
#9

@REMOVED, rs.
Reply
#10

No /criarradar n pхe nada.

sу no /delradar vc coloca isso:
pawn Code:
Delete3DTextLabel(ACameras[CamID][CamObj4]);
Reply
#11

Tentei, Tentei e Tentei! Mas nгo consegui. GHLEMES poderia fazer o favor de postar ai como se faz?
Antecipadamente, Obrigado
Reply
#12

Vб na Pasta do seu Server.
Depois nas Include: pasta do seu serve/pawno/include.

Abra a PPC_Common e Onde tiver SetupSpeedCamera adicione:
pawn Code:
new CS_TEXTO[256];
    format(CS_TEXTO,256,"{FF0000}-|{FFFFFF}Velocidade Maxima{FF0000}|- \n{FF0000}%02i {FFFFFF}Km/h",MaxSpeed);
    ACameras[CamID][Cam3DText] = CreateDynamic3DTextLabel(CS_TEXTO,-1,x,y,z +5.0,120.0);
Depois va em PPC_Defines e na parte enun TSpeedCamera coloca isso:
pawn Code:
Text3D:Cam3DText
E por ultima vб em PPC_PlayerCommands em /delradar e add isso:
pawn Code:
DestroyDynamic3DTextLabel(ACameras[CamID][Cam3DText]);
Assim vc irб conseguir, caso queira tambem colocar a letra R no Mapa informando onde tem radar me avisa que te explico

Obs. Tirei os cуdigos daqui
https://sampforum.blast.hk/showthread.php?tid=511644

ObsІ. Caso nгo entendeu e quiser que eu faзa manda uma PM eu te passo Skype e Te Ajuda por Skype
Reply
#13

Mas o label vai automatico? eu acho que nгo onde eu ponho o Crate3DTextLabel
Obrigado ae pela ajuda
Reply
#14

Quote:
Originally Posted by TenhoUmaDuvida
View Post
Mas o label vai automatico? eu acho que nгo onde eu ponho o Crate3DTextLabel
Obrigado ae pela ajuda
Vai automatico, o Create 3dTextLabel vai esta na PPC_Common, analise o codigo que lhe mandei que vc vai ver
Reply
#15

consegui, mas quando o serve reinicia ai o Label some Coloquei oq vc mandou oia oq deu!
pawn Code:
\pawno\include\PPC_Defines.inc(339) : error 001: expected token: "}", but found "-label-"
\pawno\include\PPC_Common.inc(261) : error 017: undefined symbol "Cam3DText"
\pawno\include\PPC_Common.inc(261) : warning 213: tag mismatch
\pawno\include\PPC_PlayerCommands.inc(2833) : error 017: undefined symbol "CamID"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Reply
#16

Tem alguma sugestгo?
Reply
#17

PPC_Common
pawn Code:
new String[128];
    format(String, sizeof(String), "{FF0000}RADAR\n {FFFFFF}Velocidade Maxima\n{0000FF}%i Km/h", MaxSpeed);
    ACameras[CamID][CamObj4] = Create3DTextLabel(String, -1, x, y, z + 4.2, 100.0, 0, 0);
PPC_Defines enun TSpeddCamera:
pawn Code:
Text3D:CamObj4
PPC_PlayerCommand, no delradar onde destrуi os Objetos.
pawn Code:
Delete3DTextLabel(ACameras[CamID][CamObj4]);
Se nгo conseguir manda msg pra mim, que te passo o Skype e conversamos Certinho.

Espero ter ajudado...
Reply
#18

passa seu skype la...
Reply
#19

Conseguiiiii! vlw funcionando perfeito!! agora desculpa qualquйr coisa ai!! vlwww
Reply
#20

Quando deleto o Radar a label continua! E ja coloquei la no /deletarradar mas nao vai sabe oq й?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)