Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
Rozpoczynaj nowe tematy i odpowiedaj na inne
Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
Dodawaj wydarzenia do kalendarza społecznościowego
Stwórz swój własny profil i zdobywaj nowych znajomych
Witam, mam spory problem z menu na zombie modzie dokładniej to chodzi że nie pokazuje mi tak jak być powinno opisu klas, może ja coś źlę robię ale w tym zm jest tyle tego że ciężko się idzie połapać.
tak powinno wyglądać i wygląda tylko i wyłącznie w pierwszej mapie od skasowania plików które ładują klasy:
// Parse if present
if (file_exists(path))
{
// Open zombie classes file for reading
file = fopen(path, "rt")
while (file && !feof(file))
{
// Read one line at a time
fgets(file, linedata, charsmax(linedata))
// Replace newlines with a null character to prevent headaches
replace(linedata, charsmax(linedata), "^n", "")
// Blank line or comment
if (!linedata[0] || linedata[0] == ';') continue;
// New class starting
if (linedata[0] == '[')
{
// Remove first and last characters (braces)
linedata[strlen(linedata) - 1] = 0
copy(linedata, charsmax(linedata), linedata[1])
// Store its real name for future reference
ArrayPushString(g_zclass2_realname, linedata)
continue;
}
// Get key and value(s)
strtok(linedata, key, charsmax(key), value, charsmax(value), '=')
// Trim spaces
trim(key)
trim(value)
if (equal(key, "NAME"))
ArrayPushString(g_zclass2_name, value)
else if (equal(key, "INFO"))
ArrayPushString(g_zclass2_info, value)
else if (equal(key, "MODELS"))
{
// Set models start index
ArrayPushCell(g_zclass2_modelsstart, ArraySize(g_zclass2_playermodel))
// Parse class models
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to class models array
ArrayPushString(g_zclass2_playermodel, key)
ArrayPushCell(g_zclass2_modelindex, -1)
}
// Set models end index
ArrayPushCell(g_zclass2_modelsend, ArraySize(g_zclass2_playermodel))
}
else if (equal(key, "CLAWMODEL"))
ArrayPushString(g_zclass2_clawmodel, value)
else if (equal(key, "HEALTH"))
ArrayPushCell(g_zclass2_hp, str_to_num(value))
else if (equal(key, "SPEED"))
ArrayPushCell(g_zclass2_spd, str_to_num(value))
else if (equal(key, "GRAVITY"))
ArrayPushCell(g_zclass2_grav, str_to_float(value))
else if (equal(key, "KNOCKBACK"))
ArrayPushCell(g_zclass2_kb, str_to_float(value))
}
if (file) fclose(file)
}