28.12.2018, 18:05
(
Последний раз редактировалось SkyFlare; 28.12.2018 в 18:09.
Причина: added mysql table
)
Alright so I have been messing around with my MYSQL Script....
My 3DTextLabel is not showing the MySQL Text that its supposed to show between "(0) /getjob"
it's supposed to say something like this "(0) Drug Dealer /getjob"

here is where the TextLabel is created
and heres where its all loading from
and heres my MySQL Table
My 3DTextLabel is not showing the MySQL Text that its supposed to show between "(0) /getjob"
it's supposed to say something like this "(0) Drug Dealer /getjob"

here is where the TextLabel is created
pawn Код:
SyncJobPickup(jobid)
{
if(JobPickupInfo[jobid][Exists])
{
new string[53];
DestroyDynamic3DTextLabel(JobPickupInfo[jobid][NameTextLabel]);
DestroyDynamicPickup(JobPickupInfo[jobid][Pickup]);
format(string, sizeof(string), "(%d) %s /getjob", jobid, JobPickupInfo[jobid][NameText]);
JobPickupInfo[jobid][NameTextLabel] = CreateDynamic3DTextLabel(string, -1, JobPickupInfo[jobid][PosX], JobPickupInfo[jobid][PosY], JobPickupInfo[jobid][PosZ] + 0.1, 10.0, .worldid = JobPickupInfo[jobid][WorldID], .interiorid = JobPickupInfo[jobid][InteriorID]);
JobPickupInfo[jobid][Pickup] = CreateDynamicPickup(JobPickupInfo[jobid][ModelID], 1, JobPickupInfo[jobid][PosX], JobPickupInfo[jobid][PosY], JobPickupInfo[jobid][PosZ], .worldid = JobPickupInfo[jobid][WorldID], .interiorid = JobPickupInfo[jobid][InteriorID]);
}
}
pawn Код:
forward JobPickupsLoad();
public JobPickupsLoad()
{
new rows = cache_num_rows();
for(new i = 0; i < rows && i < MAX_JOBPICKUPS; i ++)
{
cache_get_value_name_int(i, "id", JobPickupInfo[i][ID]);
cache_get_value_name(i, "jobtext", JobPickupInfo[i][NameText]);
cache_get_value_name_int(i, "modelid", JobPickupInfo[i][ModelID]);
cache_get_value_name_float(i, "x", JobPickupInfo[i][PosX]);
cache_get_value_name_float(i, "y", JobPickupInfo[i][PosY]);
cache_get_value_name_float(i, "z", JobPickupInfo[i][PosZ]);
cache_get_value_name_int(i, "worldid", JobPickupInfo[i][WorldID]);
cache_get_value_name_int(i, "interiorid", JobPickupInfo[i][InteriorID]);
cache_get_value_name_float(i, "streamdistance", JobPickupInfo[i][StreamDistance]);
JobPickupInfo[i][NameTextLabel] = Text3D:INVALID_3DTEXT_ID;
JobPickupInfo[i][Pickup] = -1;
JobPickupInfo[i][Exists] = 1;
SyncJobPickup(i);
}
printf("%i Job Pickups loaded", rows);
}



fixed it perfectly