SA-MP Forums Archive
їPor quй no se muestra el texto? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: їPor quй no se muestra el texto? (/showthread.php?tid=609435)



їPor quй no se muestra el texto? - Fagrinht - 12.06.2016

Trato de hacer que las unidades de policнa tengan el nombre de su unidad a un costado de la misma, entonces en OnGamemodeInit puse esto para una unidad y no funciona.

Код:
	new
	    Text3D:Callsign[MAX_VEHICLES];
	
    Callsign[SAPDVehicles[0]] = Create3DTextLabel("ADAMS-297", 0xFFFFFFFF, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(Callsign[SAPDVehicles[0]], SAPDVehicles[0], -0.7, -1.9, -0.3);

	SAPDVehicles[0] = AddStaticVehicleEx(596,1601.872924,-1704.370971,5.612636,89.574440,0,1,TIME_RESPAWN); // Patrulla LS



Respuesta: їPor quй no se muestra el texto? - Parka - 12.06.2016

Deberнa funcionar te, asegura te de que no estйs pasando el limite de Create3DTextLabel


pawn Код:
#define TIME_RESPAWN 240
new Text3D:Callsign[MAX_VEHICLES];
new SAPDVehicles[3];

public OnGameModeInit()
{
    new tmp[64];
    for(new i=0; i<sizeof(SAPDVehicles); i++)
    {
        SAPDVehicles[i] = AddStaticVehicleEx(596, 1601.8, -1704.3 + (float(i) * 5), 5.6,89.5, 0, 1, TIME_RESPAWN); // Patrulla LS
       
        format(tmp, sizeof(tmp), "{c0c0c0}ADAMS - {00cccc}%03d", SAPDVehicles[i]);
        Callsign[SAPDVehicles[i]] = Create3DTextLabel(tmp, -1, 0.0, 0.0, 0.0, 50.0, -1, 1);
        Attach3DTextLabelToVehicle(Callsign[SAPDVehicles[i]], SAPDVehicles[i], -0.7, -1.9, -0.3);
    }
    return 1;
}



Respuesta: їPor quй no se muestra el texto? - Fagrinht - 12.06.2016

Quote:
Originally Posted by Parka
Посмотреть сообщение
Deberнa funcionar te, asegura te de que no estйs pasando el limite de Create3DTextLabel


pawn Код:
#define TIME_RESPAWN 240
new Text3D:Callsign[MAX_VEHICLES];
new SAPDVehicles[3];

public OnGameModeInit()
{
    new tmp[64];
    for(new i=0; i<sizeof(SAPDVehicles); i++)
    {
        SAPDVehicles[i] = AddStaticVehicleEx(596, 1601.8, -1704.3 + (float(i) * 5), 5.6,89.5, 0, 1, TIME_RESPAWN); // Patrulla LS
       
        format(tmp, sizeof(tmp), "{c0c0c0}ADAMS - {00cccc}%03d", SAPDVehicles[i]);
        Callsign[SAPDVehicles[i]] = Create3DTextLabel(tmp, -1, 0.0, 0.0, 0.0, 50.0, -1, 1);
        Attach3DTextLabelToVehicle(Callsign[SAPDVehicles[i]], SAPDVehicles[i], -0.7, -1.9, -0.3);
    }
    return 1;
}
La idea era que el callsing tuviera la ID del vehнculo, y no por 01 y 02 me entiendes? igual gracias hermano
ademбs, hay otros vehнculos en SAPDVEHICLES que no son Adams, hay Edwards y Charlies ect


Respuesta: їPor quй no se muestra el texto? - Eloy - 12.06.2016

Recomendaria mejor colocarle un object ID 2661 con TextMaterial en el suelo


Respuesta: їPor quй no se muestra el texto? - Fagrinht - 12.06.2016

Ya tengo algo de idea como lo harй con el cуdigo de Parka, gracias por responder.