OciXCrom [XP | Level | Ranks] Damage Per Level
OciXCrom [XP | Level | Ranks] Damage Per Level
Hehe its too much! People are shocked to see zombies with lots of life and run away. But why this addon changes the basic value of life from 5000 to 17000? Shouldn't it look like this?
Level 5 : 5750
Level 12: 6800
Level 26: 8900
Instead i have:
Level 5 : 17750
Level 12: 18800
Level 26: 20900
Level 5 : 5750
Level 12: 6800
Level 26: 8900
Instead i have:
Level 5 : 17750
Level 12: 18800
Level 26: 20900
-
OciXCrom
Извън линия - Администратор
- Мнения: 7206
- Регистриран на: 06 Окт 2016, 19:20
- Местоположение: /resetscore
- Се отблагодари: 117 пъти
- Получена благодарност: 1295 пъти
- Обратна връзка:
OciXCrom [XP | Level | Ranks] Damage Per Level
It depends on your crxranks_hpl_mode setting. If it's set to 1, the amount will be ADDED to the player's current amount. If it's 0, it will set it to what it's set in the file.
OciXCrom [XP | Level | Ranks] Damage Per Level
OM! Im so sorry! Its working perfect! Look what i did im stupid:
[post]
1 = 150
2 = 300
3 = 450
... etc
72 = 10800
73 = 10950
74 = 11100
75 = 11250
76 = 11400
77 = 11550
78 = 11700
79 = 11850
80 = 12000
1 = 12150
2 = 12300
3 = 12450
4 = 12600
5 = 12750
6 = 12900
7 = 13050
8 = 13200
9 = 13350
10 = 13500
11 = 13650
12 = 13800
13 = 13950
14 = 14100
15 = 14250
16 = 14400
17 = 14550
18 = 14700
19 = 14850
20 = 15000[/post]
I forgot to end file to 100!
[post]
1 = 150
2 = 300
3 = 450
... etc
72 = 10800
73 = 10950
74 = 11100
75 = 11250
76 = 11400
77 = 11550
78 = 11700
79 = 11850
80 = 12000
1 = 12150
2 = 12300
3 = 12450
4 = 12600
5 = 12750
6 = 12900
7 = 13050
8 = 13200
9 = 13350
10 = 13500
11 = 13650
12 = 13800
13 = 13950
14 = 14100
15 = 14250
16 = 14400
17 = 14550
18 = 14700
19 = 14850
20 = 15000[/post]
I forgot to end file to 100!
-
OciXCrom
Извън линия - Администратор
- Мнения: 7206
- Регистриран на: 06 Окт 2016, 19:20
- Местоположение: /resetscore
- Се отблагодари: 117 пъти
- Получена благодарност: 1295 пъти
- Обратна връзка:
OciXCrom [XP | Level | Ranks] Damage Per Level
Nice.
If everything is working as it should, can the thread be closed now?
If everything is working as it should, can the thread be closed now?
OciXCrom [XP | Level | Ranks] Damage Per Level
I have another problem in my LOGS:
Have Zombie Plague 5.0.8
Извън темата
[AMXX] Displaying debug trace (plugin "crxranks_damage_per_level.amxx", version "1.2-zp")
[AMXX] Run time error 4: index out of bounds
[AMXX] [0] crxranks_damage_per_level.sma::crxranks_user_level_updated (line 110)
[AMXX] Displaying debug trace (plugin "crxranks_damage_per_level.amxx", version "1.2-zp")
[AMXX] Run time error 4: index out of bounds
[AMXX] [0] crxranks_damage_per_level.sma::client_putinserver (line 100)
[AMXX] Displaying debug trace (plugin "crxranks_damage_per_level.amxx", version "1.2-zp")
[AMXX] Run time error 4: index out of bounds
[AMXX] [0] crxranks_damage_per_level.sma::PreTakeDamage (line 92)
[AMXX] Run time error 4: index out of bounds
[AMXX] [0] crxranks_damage_per_level.sma::crxranks_user_level_updated (line 110)
[AMXX] Displaying debug trace (plugin "crxranks_damage_per_level.amxx", version "1.2-zp")
[AMXX] Run time error 4: index out of bounds
[AMXX] [0] crxranks_damage_per_level.sma::client_putinserver (line 100)
[AMXX] Displaying debug trace (plugin "crxranks_damage_per_level.amxx", version "1.2-zp")
[AMXX] Run time error 4: index out of bounds
[AMXX] [0] crxranks_damage_per_level.sma::PreTakeDamage (line 92)
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <amxmisc>
#include <crxranks>
#include <hamsandwich>
native zp_get_user_zombie(id)
#define PLUGIN_VERSION "1.2-zp"
new Trie:g_tDamage
new g_szDamage[16][33]
public plugin_init()
{
register_plugin("CRXRanks: Damage Per Level", PLUGIN_VERSION, "OciXCrom")
register_cvar("CRXRanksDPL", PLUGIN_VERSION, FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)
RegisterHam(Ham_TakeDamage, "player", "PreTakeDamage", 0)
g_tDamage = TrieCreate()
ReadFile()
}
public plugin_end()
TrieDestroy(g_tDamage)
ReadFile()
{
new szFilename[256]
get_configsdir(szFilename, charsmax(szFilename))
add(szFilename, charsmax(szFilename), "/RankSystemDamage.ini")
new iFilePointer = fopen(szFilename, "rt")
if(iFilePointer)
{
new szData[64], szValue[32], szMap[32], szKey[32], bool:bRead = true, iSize
get_mapname(szMap, charsmax(szMap))
while(!feof(iFilePointer))
{
fgets(iFilePointer, szData, charsmax(szData))
trim(szData)
switch(szData[0])
{
case EOS, '#', ';': continue
case '-':
{
iSize = strlen(szData)
if(szData[iSize - 1] == '-')
{
szData[0] = ' '
szData[iSize - 1] = ' '
trim(szData)
if(contain(szData, "*") != -1)
{
strtok(szData, szKey, charsmax(szKey), szValue, charsmax(szValue), '*')
copy(szValue, strlen(szKey), szMap)
bRead = equal(szValue, szKey) ? true : false
}
else
{
static const szAll[] = "#all"
bRead = equal(szData, szAll) || equali(szData, szMap)
}
}
else continue
}
default:
{
if(!bRead)
continue
strtok(szData, szKey, charsmax(szKey), szValue, charsmax(szValue), '=')
trim(szKey); trim(szValue)
if(!szValue[0])
continue
TrieSetString(g_tDamage, szKey, szValue)
}
}
}
fclose(iFilePointer)
}
}
public PreTakeDamage(iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits)
{
if(!is_user_connected(iAttacker) || zp_get_user_zombie(iAttacker) || !g_szDamage[iAttacker][0])
return
SetHamParamFloat(4, math_add_f(fDamage, g_szDamage[iAttacker]))
}
public client_putinserver(id)
{
g_szDamage[id][0] = EOS
crxranks_user_level_updated(id, crxranks_get_user_level(id), false)
}
public crxranks_user_level_updated(id, iLevel)
{
new szLevel[10]
num_to_str(iLevel, szLevel, charsmax(szLevel))
if(TrieKeyExists(g_tDamage, szLevel))
TrieGetString(g_tDamage, szLevel, g_szDamage[id], charsmax(g_szDamage[]))
}
Float:math_add_f(Float:fNum, const szMath[])
{
static szNewMath[16], Float:fMath, bool:bPercent, cOperator
copy(szNewMath, charsmax(szNewMath), szMath)
bPercent = szNewMath[strlen(szNewMath) - 1] == '%'
cOperator = szNewMath[0]
if(!isdigit(szNewMath[0]))
szNewMath[0] = ' '
if(bPercent)
replace(szNewMath, charsmax(szNewMath), "%", "")
trim(szNewMath)
fMath = str_to_float(szNewMath)
if(bPercent)
fMath *= fNum / 100
switch(cOperator)
{
case '+': fNum += fMath
case '-': fNum -= fMath
case '/': fNum /= fMath
case '*': fNum *= fMath
default: fNum = fMath
}
return fNum
}
-
atmax
Извън линия - Потребител
- Мнения: 492
- Регистриран на: 22 Мар 2018, 15:06
- Се отблагодари: 37 пъти
- Получена благодарност: 43 пъти
OciXCrom [XP | Level | Ranks] Damage Per Level
An invalid cell has been used that goes over the maximum value. Try changing this:
to this:
If it doesn't work, set it to higher value.
Код за потвърждение: Избери целия код
new g_szDamage[16][33]
Код за потвърждение: Избери целия код
new g_szDamage[][33]
Rest in peace my friend I always will remember you!
-
mi0
Извън линия - AMXX Скриптър
- Мнения: 534
- Регистриран на: 09 Дек 2016, 22:02
- Се отблагодари: 97 пъти
- Получена благодарност: 120 пъти
- Обратна връзка:
OciXCrom [XP | Level | Ranks] Damage Per Level
This type of declaration requires initialization so it wouldn't be an option in this case. The second dimenssion of the array has 33 elements which seems kind of odd(exactly 33?) so I can assume someone just swapped them accidentaly.atmax написа: ↑23 Апр 2020, 10:14 An invalid cell has been used that goes over the maximum value. Try changing this:to this:Код за потвърждение: Избери целия код
new g_szDamage[16][33]
If it doesn't work, set it to higher value.Код за потвърждение: Избери целия код
new g_szDamage[][33]
Код за потвърждение: Избери целия код
new g_szDamage[33][16]
aka kurdokoleno
Catch Mod - 87.121.112.232:27021
Catch Mod - 87.121.112.232:27021
OciXCrom [XP | Level | Ranks] Damage Per Level
This not work at all. Not granting more damage. But thxatmax написа: ↑23 Апр 2020, 10:14 An invalid cell has been used that goes over the maximum value. Try changing this:to this:Код за потвърждение: Избери целия код
new g_szDamage[16][33]
If it doesn't work, set it to higher value.Код за потвърждение: Избери целия код
new g_szDamage[][33]
Not add damagemi0 написа: ↑23 Апр 2020, 10:51This type of declaration requires initialization so it wouldn't be an option in this case. The second dimenssion of the array has 33 elements which seems kind of odd(exactly 33?) so I can assume someone just swapped them accidentaly.atmax написа: ↑23 Апр 2020, 10:14 An invalid cell has been used that goes over the maximum value. Try changing this:to this:Код за потвърждение: Избери целия код
new g_szDamage[16][33]
If it doesn't work, set it to higher value.Код за потвърждение: Избери целия код
new g_szDamage[][33]
Код за потвърждение: Избери целия код
new g_szDamage[33][16]
-
OciXCrom
Извън линия - Администратор
- Мнения: 7206
- Регистриран на: 06 Окт 2016, 19:20
- Местоположение: /resetscore
- Се отблагодари: 117 пъти
- Получена благодарност: 1295 пъти
- Обратна връзка:
OciXCrom [XP | Level | Ranks] Damage Per Level
Thx! It worked! Guys you help me with everything. I think its time to close thx again!
-
- Подобни теми
- Отговори
- Преглеждания
- Последно мнение
-
- 10 Отговори
- 1808 Преглеждания
-
Последно мнение от erra1881
-
- 2 Отговори
- 967 Преглеждания
-
Последно мнение от cgozzie
-
- 1 Отговори
- 1343 Преглеждания
-
Последно мнение от OciXCrom
-
- 0 Отговори
- 428 Преглеждания
-
Последно мнение от InsertSK
-
- 0 Отговори
- 975 Преглеждания
-
Последно мнение от InsertSK
-
- 2 Отговори
- 1025 Преглеждания
-
Последно мнение от tom1k
-
- 1 Отговори
- 1645 Преглеждания
-
Последно мнение от Na'Vi s1mple
Кой е на линия
Потребители разглеждащи този форум: 0 регистрирани и 9 госта