[DUDA] Con CreatePlayer3DTextLabel
#1

Buenas, mi duda es:
Cree estos labels en los vehiculos:

pawn Код:
stext[playerid] = CreatePlayer3DTextLabel(playerid,"{FF0000}Vehiculo: {FFFFFF}%s",0x008080FF,0,-2.1,0.25,10.0,INVALID_PLAYER_ID,GetPlayerVehicleID(playerid),1);
        stext2[playerid] = CreatePlayer3DTextLabel(playerid,"{FF0000}Vida: {FFFFFF}",0x008080FF,0,-2.1,0.1,10.0,INVALID_PLAYER_ID,GetPlayerVehicleID(playerid),1);
        stext3[playerid] = CreatePlayer3DTextLabel(playerid,"{FF0000}Gps: {FFFFFF}",0x008080FF,0,-2.1,-0.10,10.0,INVALID_PLAYER_ID,GetPlayerVehicleID(playerid),1);
Pero, noce como hacer para que salga sus respectiva info, ejemplo, en vehiculo salga el name del coche...

Podrian decirme donde se pone el GetVehicleID y eso... pera poner %s y salga el nombre? intente de ultimas pero no da.

AYUDA PORFAVOR
Reply
#2

Esto es igual que al configurar mensajes, textdraws, etc. Solo debes darle formato a una string.

EJ:

pawn Код:
new Mi_string[128];

format(Mi_string, 128, "ID del coche: %d", bla bla bla);
CreatePlayer3DTextLabel(playerid, Mi_string, bla bla bla... );
Reply
#3

Aaaaa GRACIAS, Ya Intento Hacerlo De Tal Forma Haber Si Me Da, Gracias De Ante Mano.

Ayuda, si me funciono, pero.... No se actualiza, es decir, me quedaron haci:
pawn Код:
new Mi_Vehiculo[128];
new Mi_Satelite[128];
new LuxZone[MAX_ZONE_NAME];
 GetPlayer2DZone(playerid, LuxZone, MAX_ZONE_NAME);
format(Mi_Vehiculo, 128, "{FF0000}Vehiculo: {FFFFFF}%s",LVehiclesName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
format(Mi_Satelite, 128, "{FF0000}Satelite: {FFFFFF}%s",LuxZone);
stext[playerid] = CreatePlayer3DTextLabel(playerid,Mi_Vehiculo,0x008080FF,0,-2.1,0.25,10.0,INVALID_PLAYER_ID,GetPlayerVehicleID(playerid),1);
stext2[playerid] = CreatePlayer3DTextLabel(playerid,Mi_Satelite,0x008080FF,0,-2.1,0.1,10.0,INVALID_PLAYER_ID,GetPlayerVehicleID(playerid),1);
Pero, deberia cuando yo estubiera en el coche, y cuando cambie de lugar, cambia en Satelite el lugar, pero solo se queda el lugar donde cojiste el coche... quisiera que se actualizara, que diga cada zona a la que vallas entrando.

ї Como hacer para que se actualize en tiempo real ? (Ayuda, tambien con la respuesta que me den, si sirve, lo usare con la vida del coche)

AYUDA
Reply
#4

Utiliza la funciуn Update3DTextLabelText https://sampwiki.blast.hk/wiki/Update3DTextLabelText
Reply
#5

Te recomiendo mucho esta pбgina: https://sampwiki.blast.hk/wiki/Main_Page
Reply
#6

Ayuda, miren, luego de ahcer loque dijeron, quedo asi:

pawn Код:
format(Mi_Vehiculo, 128, "{FF0000}Vehiculo: {FFFFFF}%s",LVehiclesName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);

format(Mi_Satelite, 128, "{FF0000}Satelite: {FFFFFF}%s",LuxZone);

format(Mi_Vida, 128, "{FF0000}Vida: {FFFFFF}%s",L_VehHealth);
       

stext[playerid] = CreatePlayer3DTextLabel(playerid,Mi_Vehiculo,0x008080FF,0,-2.1,0.25,10.0,INVALID_PLAYER_ID,GetPlayerVehicleID(playerid),1);

stext2[playerid] = CreatePlayer3DTextLabel(playerid,Mi_Vida,0x008080FF,0,-2.1,0.25,10.0,INVALID_PLAYER_ID,GetPlayerVehicleID(playerid),1);

stext3[playerid] = CreatePlayer3DTextLabel(playerid,Mi_Satelite,0x008080FF,0,-2.1,0.25,10.0,INVALID_PLAYER_ID,GetPlayerVehicleID(playerid),1);
Asi ya funciona...

Pero, no se actualiza, y noce como psarlo a Update, me ayudan? PLEASE
Reply
#7

Bueno, pues no se y no pude psar esto a Update:
pawn Код:
format(Mi_Vehiculo, 128, "{FF0000}Vehiculo: {FFFFFF}%s",LVehiclesName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
        format(Mi_Satelite, 128, "{FF0000}Satelite: {FFFFFF}%s",LuxZone);
        format(Mi_Vida, 128, "{FF0000}Vida: {FFFFFF}%d",L_VehHealth);
       
        stext[playerid] = CreatePlayer3DTextLabel(playerid,Mi_Vehiculo,0x008080FF,0,-2.1,0.25,10.0,INVALID_PLAYER_ID,GetPlayerVehicleID(playerid),1);
        stext2[playerid] = CreatePlayer3DTextLabel(playerid,Mi_Vida,0x008080FF,0,-2.1,0.25,10.0,INVALID_PLAYER_ID,GetPlayerVehicleID(playerid),1);
        stext3[playerid] = CreatePlayer3DTextLabel(playerid,Mi_Satelite,0x008080FF,0,-2.1,0.25,10.0,INVALID_PLAYER_ID,GetPlayerVehicleID(playerid),1);
Losque quiero pasar a Update son el Satelite y Elde Vida, Pues te subes al coche y elde satelite y vida, cuando chocas y baja la vida, en el Text Labes sigue en 1000.00 osea, no se actualiza igual elde satelite, cuando vas a otros lugares, se queda el lugar en elque cojiste el coche, y loque quiero esque se actualize (Update), PORFAVOR, E Leido En SampWiky Y No Logro hacerlo... AYUDA
Reply
#8

debes colocar Update3DTextLabelText en donde actualiza los datos.

saludos.

https://sampwiki.blast.hk/wiki/Update3DTextLabelText_ES
Reply
#9

Quote:
Originally Posted by OTACON
Посмотреть сообщение
debes colocar Update3DTextLabelText en donde actualiza los datos.

saludos.

https://sampwiki.blast.hk/wiki/Update3DTextLabelText_ES
Quote:
Originally Posted by yesid001
Посмотреть сообщение
Losque quiero pasar a Update son el Satelite y Elde Vida, Pues te subes al coche y elde satelite y vida, cuando chocas y baja la vida, en el Text Labes sigue en 1000.00 osea, no se actualiza igual elde satelite, cuando vas a otros lugares, se queda el lugar en elque cojiste el coche, y loque quiero esque se actualize (Update), PORFAVOR, E Leido En SampWiky Y No Logro hacerlo... AYUDA
Tienes que utilizarlo asн:

pawn Код:
format(Mi_Satelite, 128, "{FF0000}Satelite: {FFFFFF}%s",LuxZone);
format(Mi_Vida, 128, "{FF0000}Vida: {FFFFFF}%d",L_VehHealth);

Update3DTextLabelText(stext3[playerid], 0x008080FF, Mi_Satelite);
Update3DTextLabelText(stext2[playerid], 0x008080FF, Mi_Vida);
Reply
#10

Quote:
Originally Posted by GROVE22
Посмотреть сообщение
Tienes que utilizarlo asн:

pawn Код:
format(Mi_Satelite, 128, "{FF0000}Satelite: {FFFFFF}%s",LuxZone);
format(Mi_Vida, 128, "{FF0000}Vida: {FFFFFF}%d",L_VehHealth);

Update3DTextLabelText(stext3[playerid], 0x008080FF, Mi_Satelite);
Update3DTextLabelText(stext2[playerid], 0x008080FF, Mi_Vida);
¬¬ por eso le pase el de espaсol ._.
no hay que eforzarse mucho para ver el ejempl ode la wiki y si esta en espaсol lo lee y listo -_.
saludos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)