PDA

Просмотр полной версии : [Прочее] Неправильное имя телепорта



pustomerzha
13.11.2016, 14:05
Доброго времени суток, форумчане.
Проблема такая: Я написал систему телепортов с 3D текстом, но вместо того, чтобы брать из 2 поля, берет из 2.
А теперь попроще:
Должно быть "Government of SA", а пишет "Los Santos Police Department"

Screenshots:
http://ihost.pro-pawn.ru/image.php?di=P2GYhttp://ihost.pro-pawn.ru/image.php?di=ELCN

Code:

mysql_tquery(mysql_connect_ID, "SELECT * FROM `teleports` WHERE 1", "@__loadTeleports", "");

@__loadTeleports(playerid); @__loadTeleports(playerid)
{
new
rows;
cache_get_row_count(rows);

if (rows)
{
for (new t = 0; t < rows; t++)
{
cache_get_value_name_int(t, "id", teleportInfo[t][id]);

cache_get_value_name_float(t, "x", teleportInfo[t][x]);
cache_get_value_name_float(t, "y", teleportInfo[t][y]);
cache_get_value_name_float(t, "z", teleportInfo[t][z]);

cache_get_value_name_int(t, "world", teleportInfo[t][world]);
cache_get_value_name_int(t, "interior", teleportInfo[t][interior]);

cache_get_value_name_float(t, "tp_x", teleportInfo[t][tp_x]);
cache_get_value_name_float(t, "tp_y", teleportInfo[t][tp_y]);
cache_get_value_name_float(t, "tp_z", teleportInfo[t][tp_z]);

cache_get_value_name(0, "name", teleportInfo[t][name], 32);

static const str_enter[] =
"Чтобы войти в \"%s\"\n"\
"нажмите клавишу F или ENTER";
new
string_enter
[
sizeof str_enter +
(-2 + 32)
];
format(string_enter, sizeof string_enter, str_enter, teleportInfo[t][name]);
Create3DTextLabel(string_enter, 0x85858599, teleportInfo[t][x], teleportInfo[t][y], teleportInfo[t][z], 15.0, 0, 1);

static const str_exit[] =
"Чтобы выйти из \"%s\"\n"\
"нажмите клавишу F или ENTER";
new
string_exit
[
sizeof str_exit +
(-2 + 32)
];
format(string_exit, sizeof string_exit, str_exit, teleportInfo[t][name]);
Create3DTextLabel(string_exit, 0x85858599, teleportInfo[t][tp_x], teleportInfo[t][tp_y], teleportInfo[t][tp_z], 15.0, teleportInfo[t][world], 1);
+
[FONT=Trebuchet MS][B]DELETE.
teleports ++;
}
}
printf("pickups: loaded pickups [%d]", teleports);
}

DeimoS
14.11.2016, 01:03
mysql_tquery(mysql_connect_ID, "SELECT * FROM teleports", "@__loadTeleports", "");

и

cache_get_value_name(0, "name", teleportInfo[t][name], 32);
на

cache_get_value_name(t, "name", teleportInfo[t][name], 32);