Problem(error/warning): Kada pod OnGameModeInit() postavim:
[pawn]CreatePilotJunVeh(); Attach3DTextOnPilotJun();
CreateTaxiVehicles(); Attach3DTextOnTaxi();
CreateCDSVeh(); Attach3DTextOnCDS();[/pawn]
Onda ce se kreirati samo PilotJunVeh - Avioni i Attachovat ce se labeli na njih.
A kada pod OnGameModeInit() postavim:
[pawn]
CreateTaxiVehicles(); Attach3DTextOnTaxi();
CreateCDSVeh(); Attach3DTextOnCDS();
CreatePilotJunVeh(); Attach3DTextOnPilotJun();
[/pawn]
Onda ce se kreirati TaxiVozila i CDS - Autoskola vozila i attachovat ce se labeli na njih, a pilot vozila se nece kreirati
Deo skripte:
[pawn]
// CarDriveSchool vehicles
stock CreateCDSVeh() {
CDS_Veh[0] = CreateVehicle(410, 2052.5261, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[1] = CreateVehicle(410, 2055.9333, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[2] = CreateVehicle(410, 2059.1394, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[3] = CreateVehicle(410, 2062.4597, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[4] = CreateVehicle(410, 2065.6802, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[5] = CreateVehicle(410, 2065.3796, -1919.3207, 13.2075, 0.0000, -1, -1, 100);
CDS_Veh[6] = CreateVehicle(410, 2062.0261, -1919.3207, 13.2075, 0.0000, -1, -1, 100);
CDS_Veh[7] = CreateVehicle(410, 2068.9546, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[8] = CreateVehicle(410, 2068.8975, -1919.3207, 13.2075, 0.0000, -1, -1, 100);
}
stock Attach3DTextOnCDS() {
new string[128], Float:x, Float:y, Float:z;
format(string, sizeof(string),""cds"");
for(new i=0; i<=9; i++) {
GetVehiclePos(CDS_Veh
, x, y, z);
CDSVehLabel [ CDS_Veh ] = CreateDynamic3DTextLabel(string, -1,x, y, z, 8.0, INVALID_PLAYER_ID, CDS_Veh);
Attach3DTextLabelToVehicle(CDSVehLabel[ CDS_Veh ], CDS_Veh, x, y, z);
}
}
[/pawn]
[pawn]
// Taxi vehicles
stock CreateTaxiVehicles() {
TaxiJob_Veh - = CreateVehicle(420, 1802.3186, -1902.3276, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [1] = CreateVehicle(420, 1802.3186, -1906.8431, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [2] = CreateVehicle(420, 1802.3186, -1911.1102, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [3] = CreateVehicle(420, 1802.3186, -1915.7173, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [4] = CreateVehicle(420, 1802.3186, -1919.8398, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [5] = CreateVehicle(420, 1802.3186, -1924.0856, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [6] = CreateVehicle(420, 1802.3186, -1928.3979, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [7] = CreateVehicle(420, 1802.3186, -1933.0533, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [8] = CreateVehicle(420, 1778.2959, -1933.1986, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [9] = CreateVehicle(420, 1778.2959, -1928.6188, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [10] = CreateVehicle(420, 1778.2959, -1924.3947, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [11] = CreateVehicle(420, 1778.2959, -1919.7561, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [12] = CreateVehicle(420, 1778.2959, -1915.4021, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [13] = CreateVehicle(420, 1778.2959, -1911.0443, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [14] = CreateVehicle(420, 1778.2959, -1906.8585, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [15] = CreateVehicle(420, 1778.2959, -1902.6334, 13.0542, 270.0000, -1, -1, 100);
PilotJun_Veh - = CreateVehicle(511, 1466.2468, -1733.0291, 15.2282, 0, -1, -1, 100);
}
stock Attach3DTextOnTaxi() {
new string[128], Float:x, Float:y, Float:z;
format(string, sizeof(string),""taxi_job"");
for(new i=0; i<=15; i++) {
GetVehiclePos(TaxiJob_Veh, x, y, z);
TaxiVehLabel [ TaxiJob_Veh ] = CreateDynamic3DTextLabel(string, -1,x, y, z, 8.0, INVALID_PLAYER_ID, TaxiJob_Veh);
Attach3DTextLabelToVehicle(TaxiVehLabel[ TaxiJob_Veh ], TaxiJob_Veh, x, y, z);
}
}
[/pawn]
[pawn]
// PilotJunior vehicles
stock CreatePilotJunVeh() {
PilotJun_Veh - = CreateVehicle(511, 1868.9536, -2456.0317, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [1] = CreateVehicle(511, 1846.7001, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [2] = CreateVehicle(511, 1824.4316, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [3] = CreateVehicle(511, 1802.2697, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [4] = CreateVehicle(511, 1780.0206, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [5] = CreateVehicle(511, 1757.6510, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [6] = CreateVehicle(511, 1735.3301, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [7] = CreateVehicle(511, 1713.3746, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
}
stock Attach3DTextOnPilotJun() {
new string[128], Float:x, Float:y, Float:z;
format(string, sizeof(string),""pilot"");
for(new i=0; i<=8; i++) {
GetVehiclePos(PilotJun_Veh, x, y, z);
PilotJunVehLabel [ PilotJun_Veh ] = CreateDynamic3DTextLabel(string, -1,x, y, z, 8.0, INVALID_PLAYER_ID, PilotJun_Veh);
Attach3DTextLabelToVehicle(PilotJunVehLabel[ PilotJun_Veh ], PilotJun_Veh, x, y, z);
}
}
[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //
Citat: #bokenzi poslato Jun 27, 2020, 15:43:16 POSLE PODNE
Problem(error/warning): Kada pod OnGameModeInit() postavim:
[pawn]CreatePilotJunVeh(); Attach3DTextOnPilotJun();
CreateTaxiVehicles(); Attach3DTextOnTaxi();
CreateCDSVeh(); Attach3DTextOnCDS();[/pawn]
Onda ce se kreirati samo PilotJunVeh - Avioni i Attachovat ce se labeli na njih.
A kada pod OnGameModeInit() postavim:
[pawn]
CreateTaxiVehicles(); Attach3DTextOnTaxi();
CreateCDSVeh(); Attach3DTextOnCDS();
CreatePilotJunVeh(); Attach3DTextOnPilotJun();
Onda ce se kreirati TaxiVozila i CDS - Autoskola vozila i attachovat ce se labeli na njih, a pilot vozila se nece kreirati
[/pawn]
Deo skripte:
[ pawn ]// CarDriveSchool vehicles
stock CreateCDSVeh() {
CDS_Veh[0] = CreateVehicle(410, 2052.5261, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[1] = CreateVehicle(410, 2055.9333, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[2] = CreateVehicle(410, 2059.1394, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[3] = CreateVehicle(410, 2062.4597, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[4] = CreateVehicle(410, 2065.6802, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[5] = CreateVehicle(410, 2065.3796, -1919.3207, 13.2075, 0.0000, -1, -1, 100);
CDS_Veh[6] = CreateVehicle(410, 2062.0261, -1919.3207, 13.2075, 0.0000, -1, -1, 100);
CDS_Veh[7] = CreateVehicle(410, 2068.9546, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[8] = CreateVehicle(410, 2068.8975, -1919.3207, 13.2075, 0.0000, -1, -1, 100);
}
stock Attach3DTextOnCDS() {
new string[128], Float:x, Float:y, Float:z;
format(string, sizeof(string),""cds"");
for(new i=0; i<=9; i++) {
GetVehiclePos(CDS_Veh, x, y, z);
CDSVehLabel [ CDS_Veh ] = CreateDynamic3DTextLabel(string, -1,x, y, z, 8.0, INVALID_PLAYER_ID, CDS_Veh);
Attach3DTextLabelToVehicle(CDSVehLabel[ CDS_Veh ], CDS_Veh, x, y, z);
}
}[ /pawn ]
[pawn]
// Taxi vehicles
stock CreateTaxiVehicles() {
TaxiJob_Veh - = CreateVehicle(420, 1802.3186, -1902.3276, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [1] = CreateVehicle(420, 1802.3186, -1906.8431, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [2] = CreateVehicle(420, 1802.3186, -1911.1102, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [3] = CreateVehicle(420, 1802.3186, -1915.7173, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [4] = CreateVehicle(420, 1802.3186, -1919.8398, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [5] = CreateVehicle(420, 1802.3186, -1924.0856, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [6] = CreateVehicle(420, 1802.3186, -1928.3979, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [7] = CreateVehicle(420, 1802.3186, -1933.0533, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [8] = CreateVehicle(420, 1778.2959, -1933.1986, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [9] = CreateVehicle(420, 1778.2959, -1928.6188, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [10] = CreateVehicle(420, 1778.2959, -1924.3947, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [11] = CreateVehicle(420, 1778.2959, -1919.7561, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [12] = CreateVehicle(420, 1778.2959, -1915.4021, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [13] = CreateVehicle(420, 1778.2959, -1911.0443, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [14] = CreateVehicle(420, 1778.2959, -1906.8585, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [15] = CreateVehicle(420, 1778.2959, -1902.6334, 13.0542, 270.0000, -1, -1, 100);
PilotJun_Veh - = CreateVehicle(511, 1466.2468, -1733.0291, 15.2282, 0, -1, -1, 100);
}
stock Attach3DTextOnTaxi() {
new string[128], Float:x, Float:y, Float:z;
format(string, sizeof(string),""taxi_job"");
for(new i=0; i<=15; i++) {
GetVehiclePos(TaxiJob_Veh, x, y, z);
TaxiVehLabel [ TaxiJob_Veh ] = CreateDynamic3DTextLabel(string, -1,x, y, z, 8.0, INVALID_PLAYER_ID, TaxiJob_Veh);
Attach3DTextLabelToVehicle(TaxiVehLabel[ TaxiJob_Veh ], TaxiJob_Veh, x, y, z);
}
}
[/pawn]
[pawn]
// PilotJunior vehicles
stock CreatePilotJunVeh() {
PilotJun_Veh - = CreateVehicle(511, 1868.9536, -2456.0317, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [1] = CreateVehicle(511, 1846.7001, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [2] = CreateVehicle(511, 1824.4316, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [3] = CreateVehicle(511, 1802.2697, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [4] = CreateVehicle(511, 1780.0206, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [5] = CreateVehicle(511, 1757.6510, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [6] = CreateVehicle(511, 1735.3301, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [7] = CreateVehicle(511, 1713.3746, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
}
stock Attach3DTextOnPilotJun() {
new string[128], Float:x, Float:y, Float:z;
format(string, sizeof(string),""pilot"");
for(new i=0; i<=8; i++) {
GetVehiclePos(PilotJun_Veh, x, y, z);
PilotJunVehLabel [ PilotJun_Veh ] = CreateDynamic3DTextLabel(string, -1,x, y, z, 8.0, INVALID_PLAYER_ID, PilotJun_Veh);
Attach3DTextLabelToVehicle(PilotJunVehLabel[ PilotJun_Veh ], PilotJun_Veh, x, y, z);
}
}
[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //
Citat: #bokenzi poslato Jun 27, 2020, 15:43:16 POSLE PODNE
Problem(error/warning): Kada pod OnGameModeInit() postavim:
[pawn]CreatePilotJunVeh(); Attach3DTextOnPilotJun();
CreateTaxiVehicles(); Attach3DTextOnTaxi();
CreateCDSVeh(); Attach3DTextOnCDS();[/pawn]
Onda ce se kreirati samo PilotJunVeh - Avioni i Attachovat ce se labeli na njih.
A kada pod OnGameModeInit() postavim:
[pawn]
CreateTaxiVehicles(); Attach3DTextOnTaxi();
CreateCDSVeh(); Attach3DTextOnCDS();
CreatePilotJunVeh(); Attach3DTextOnPilotJun();
Onda ce se kreirati TaxiVozila i CDS - Autoskola vozila i attachovat ce se labeli na njih, a pilot vozila se nece kreirati
[/pawn]
Deo skripte:
[pawn]
// CarDriveSchool vehicles
stock CreateCDSVeh() {
CDS_Veh[0] = CreateVehicle(410, 2052.5261, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[1] = CreateVehicle(410, 2055.9333, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[2] = CreateVehicle(410, 2059.1394, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[3] = CreateVehicle(410, 2062.4597, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[4] = CreateVehicle(410, 2065.6802, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[5] = CreateVehicle(410, 2065.3796, -1919.3207, 13.2075, 0.0000, -1, -1, 100);
CDS_Veh[6] = CreateVehicle(410, 2062.0261, -1919.3207, 13.2075, 0.0000, -1, -1, 100);
CDS_Veh[7] = CreateVehicle(410, 2068.9546, -1904.1305, 13.2075, 180.0000, -1, -1, 100);
CDS_Veh[8] = CreateVehicle(410, 2068.8975, -1919.3207, 13.2075, 0.0000, -1, -1, 100);
}
stock Attach3DTextOnCDS() {
new string[128], Float:x, Float:y, Float:z;
format(string, sizeof(string),""cds"");
for(new i=0; i<=9; i++) {
GetVehiclePos(CDS_Veh, x, y, z);
CDSVehLabel [ CDS_Veh ] = CreateDynamic3DTextLabel(string, -1,x, y, z, 8.0, INVALID_PLAYER_ID, CDS_Veh);
Attach3DTextLabelToVehicle(CDSVehLabel[ CDS_Veh ], CDS_Veh, x, y, z);
}
}[/pawn]
[pawn]
// Taxi vehicles
stock CreateTaxiVehicles() {
TaxiJob_Veh - = CreateVehicle(420, 1802.3186, -1902.3276, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [1] = CreateVehicle(420, 1802.3186, -1906.8431, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [2] = CreateVehicle(420, 1802.3186, -1911.1102, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [3] = CreateVehicle(420, 1802.3186, -1915.7173, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [4] = CreateVehicle(420, 1802.3186, -1919.8398, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [5] = CreateVehicle(420, 1802.3186, -1924.0856, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [6] = CreateVehicle(420, 1802.3186, -1928.3979, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [7] = CreateVehicle(420, 1802.3186, -1933.0533, 13.0542, 90.0000, -1, -1, 100);
TaxiJob_Veh [8] = CreateVehicle(420, 1778.2959, -1933.1986, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [9] = CreateVehicle(420, 1778.2959, -1928.6188, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [10] = CreateVehicle(420, 1778.2959, -1924.3947, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [11] = CreateVehicle(420, 1778.2959, -1919.7561, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [12] = CreateVehicle(420, 1778.2959, -1915.4021, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [13] = CreateVehicle(420, 1778.2959, -1911.0443, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [14] = CreateVehicle(420, 1778.2959, -1906.8585, 13.0542, 270.0000, -1, -1, 100);
TaxiJob_Veh [15] = CreateVehicle(420, 1778.2959, -1902.6334, 13.0542, 270.0000, -1, -1, 100);
PilotJun_Veh - = CreateVehicle(511, 1466.2468, -1733.0291, 15.2282, 0, -1, -1, 100);
}
stock Attach3DTextOnTaxi() {
new string[128], Float:x, Float:y, Float:z;
format(string, sizeof(string),""taxi_job"");
for(new i=0; i<=15; i++) {
GetVehiclePos(TaxiJob_Veh, x, y, z);
TaxiVehLabel [ TaxiJob_Veh ] = CreateDynamic3DTextLabel(string, -1,x, y, z, 8.0, INVALID_PLAYER_ID, TaxiJob_Veh);
Attach3DTextLabelToVehicle(TaxiVehLabel[ TaxiJob_Veh ], TaxiJob_Veh, x, y, z);
}
}
[/pawn]
[pawn]
// PilotJunior vehicles
stock CreatePilotJunVeh() {
PilotJun_Veh - = CreateVehicle(511, 1868.9536, -2456.0317, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [1] = CreateVehicle(511, 1846.7001, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [2] = CreateVehicle(511, 1824.4316, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [3] = CreateVehicle(511, 1802.2697, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [4] = CreateVehicle(511, 1780.0206, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [5] = CreateVehicle(511, 1757.6510, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [6] = CreateVehicle(511, 1735.3301, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
PilotJun_Veh [7] = CreateVehicle(511, 1713.3746, -2456.1848, 15.5406, 180.0000, -1, -1, 100);
}
stock Attach3DTextOnPilotJun() {
new string[128], Float:x, Float:y, Float:z;
format(string, sizeof(string),""pilot"");
for(new i=0; i<=8; i++) {
GetVehiclePos(PilotJun_Veh, x, y, z);
PilotJunVehLabel [ PilotJun_Veh ] = CreateDynamic3DTextLabel(string, -1,x, y, z, 8.0, INVALID_PLAYER_ID, PilotJun_Veh);
Attach3DTextLabelToVehicle(PilotJunVehLabel[ PilotJun_Veh ], PilotJun_Veh, x, y, z);
}
}
[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //
Wau slucajno sam 2 puta sebi odgovorio, htio sam urediti post pa sam valjda quote stiso...
Zasto dupli navodnici kod labela na vozilima ?
Citat: TarikBrt poslato Jun 27, 2020, 16:03:12 POSLE PODNE
Zasto dupli navodnici kod labela na vozilima ?
Zato sto npr ""cds"" znaci: ""cds_col"[Auto skola] "white"".
BTW nisam postavio pitanja za labele nego za kreiranja vozila
Razumljivo, to ti govorim zbog tebe , a ne zbog sebe. Meni ništa ne znači kako god bilo.
Drugo, kad kreiras Dynamic Label imas argument za vehicleid sto znaci ako zelis da ti se taj label attacha na vozilo i to si uradio.
I iz nekog razloga dole ispod si opet attachao label na vozilo, hajd sto je nepotrebno 2x ali isto tako si attachao obican label na vozilo a kreirao si dynamican label. Znaci drugi native , AttachDynamic3DTextLabelToVehicle ( nisam siguran jel ovako imas u dokumentaciji streamera ).
Edit: Nepotrebno je uzimati poziciju vozila , mozes kreirati label na 0.0, 0.0, 0.0 ili bilo kojim drugim koordinatama on ce se i dalje attachat na vozilo.
Edit 2: Zasto kreiras novi string i formatiras ga kad ne mijenja vrijednost statican je ?
Citat: TarikBrt poslato Jun 27, 2020, 16:12:29 POSLE PODNE
Razumljivo, to ti govorim zbog tebe , a ne zbog sebe. Meni ništa ne znači kako god bilo.
Drugo, kad kreiras Dynamic Label imas argument za vehicleid sto znaci ako zelis da ti se taj label attacha na vozilo i to si uradio.
I iz nekog razloga dole ispod si opet attachao label na vozilo, hajd sto je nepotrebno 2x ali isto tako si attachao obican label na vozilo a kreirao si dynamican label. Znaci drugi native , AttachDynamic3DTextLabelToVehicle ( nisam siguran jel ovako imas u dokumentaciji streamera ).
Edit: Nepotrebno je uzimati poziciju vozila , mozes kreirati label na 0.0, 0.0, 0.0 ili bilo kojim drugim koordinatama on ce se i dalje attachat na vozilo.
Edit 2: Zasto kreiras novi string i formatiras ga kad ne mijenja vrijednost statican je ?
Dap, sigurno kada sam obican label prebacivao u DynamicLabel sam zaboravio obrisati attach label, evo popravio sam to ali to jos uvijek nije rijesilo moj pravi problem :D
Onda kada koristis native AttachDynamic3DTextLabelToVehicle( ovaj je ispravan ) kada unosis koordinate, to nisu koordinate vozila to su ti offseti. Znaci ti uzimas poziciju vozila kao offset , i vjerovatno ne bi ni vidio label jer bi ti offseti bili preveliki. Ako samo jednostavno iskoristis argument koji imas u nativu i dobro ce izgledati automatski ce ga centrirati.
https://wiki.sa-mp.com/wiki/Image:Vehicle_coordinate_system.jpg ( samp wiki offset vozila )
Edit: odradi debug, samo kreiraj vozila bez da attachas label na njih, tj. nemoj pozivat tu funkciju OnGameModeInit() callbacku i ako ti se kreiraju vozila znat ces da si pogrijesio kod funckije attacha.
Shvatio sam to, ali i dalje ne shvacam zasto mi se dogadja ta stvar kod kreiranja vozila...
Odradi debug, samo kreiraj vozila bez da attachas label na njih, tj. nemoj pozivat tu funkciju OnGameModeInit() callbacku i ako ti se kreiraju vozila znat ces da si pogrijesio kod funckije attacha.
Edit: Uslikaj mi CDSVehLabel, TaxiVehLabel itd... Ako ti nije duzina niza MAX_VEHICLES imat ces Array out of bounds error u server logu.
Jer ti koristis vehicleid vozila.
E al pazi ovo: https://imgur.com/g7tyhhs, ti warnininzi mi nisu bili prije, nego tek kad sam dodo pilot vozila...
Procitaj prethodni odgovor i uslikaj mi te stvari. I provjeri imas li u server logu, Array out of bounds error.
new TaxiJob_Veh[16], Text3D:TaxiVehLabel[MAX_VEHICLES];
new CDS_Veh[9], Text3D:CDSVehLabel[MAX_VEHICLES];
new PilotJun_Veh[8], Text3D:PilotJunVehLabel[MAX_VEHICLES];
Nemam
Evo cijeli server_log kad se upali server:
[pawn]
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
[16:24:24] filterscripts = "" (string)
[16:24:24]
[16:24:24] Server Plugins
[16:24:24] --------------
[16:24:24] Loading plugin: sscanf
[16:24:24]
[16:24:24] ===============================
[16:24:24] sscanf plugin loaded.
[16:24:24] Version: 2.8.3
[16:24:24] (c) 2018 Alex "Y_Less" Cole
[16:24:24] ===============================
[16:24:24] Loaded.
[16:24:24] Loading plugin: mysql
[16:24:24] >> plugin.mysql: R41-4 successfully loaded.
[16:24:24] Loaded.
[16:24:24] Loading plugin: streamer
[16:24:24]
*** Streamer Plugin v2.9.4 by Incognito loaded ***
[16:24:24] Loaded.
[16:24:24] Loading plugin: pawncmd
[16:24:24] Pawn.CMD plugin v3.2.0 by urShadow has been loaded
[16:24:24] Loaded.
[16:24:24] Loaded 4 plugins.
[16:24:24]
[16:24:24] Filterscripts
[16:24:24] ---------------
[16:24:24] Loaded 0 filterscripts.
[16:24:24]
[16:24:24] =======================================
[16:24:24] | |
[16:24:24] | Optimising code, this may take |
[16:24:24] | a little bit of time. |
[16:24:24] | |
[16:24:24] | Please wait... |
[16:24:24] | |
[16:24:24] |=====================================|
[16:24:24] | |
[16:24:24] | Note that these optimisations are |
[16:24:24] | designed to improve performance |
[16:24:24] | with the JIT plugin, which you are |
[16:24:24] | not currently using. Get it here: |
[16:24:24] | |
[16:24:24] | https://git.io/jit-plugin |
[16:24:24] | |
[16:24:24] =======================================
[16:24:24]
[16:24:24]
[16:24:24]
[16:24:24]
[16:24:24] =======================================
[16:24:24] | |
[16:24:24] | YSI version 5.03.0689 |
[16:24:24] | By Alex "Y_Less" Cole |
[16:24:24] | |
[16:24:24] =======================================
[16:24:24]
[16:24:24] Connected to MySQL database
[16:24:24] Server loaded successfully
[16:24:24] Number of vehicle models: 1
[/pawn]