/* Plugin generated by AMXX-Studio
*/
#include <amxmodx>
#include <amxmisc>
#include <csx>
#define PLUGIN "hp"
#define VERSION "1.0"
#define AUTHOR "Edit By ZBAGI"
#define TASK 666
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_connect(id)
{
if(is_user_bot(id))
return
new param[1]
param[0] = id
set_task(1.0,"rank",TASK+id,param,1,"b")
}
public client_disconnect(id)
if(task_exists(TASK+id))
remove_task(TASK+id)
public rank(param[])
{
new id = param[0]
static stats[8], body[8]
get_user_stats(id, stats, body)
if ( stats[0] >= 0 && stats[0] <= 0)
set_user_health(id, 10)
else if ( stats[0] >= 1 && stats[0] <= 2)
set_user_health(id, 20)
else if ( stats[0] >= 3 && stats[0] <= 4)
set_user_health(id, 40)
else if ( stats[0] >= 5 && stats[0] <= 9)
set_user_health(id, 60)
else if ( stats[0] >= 10 && stats[0] <= 14)
set_user_health(id, 80)
else if ( stats[0] >= 15 && stats[0] <= 19)
set_user_health(id, 80)
else if ( stats[0] >= 20 && stats[0] <= 29)
set_user_health(id, 80)
else if ( stats[0] >= 30 && stats[0] <= 39)
set_user_health(id, 90)
else if ( stats[0] >= 40 && stats[0] <= 49)
set_user_health(id, 100)
else if ( stats[0] >= 50 && stats[0] <= 59)
set_user_health(id, 110)
else if ( stats[0] >= 60 && stats[0] <= 69)
set_user_health(id, 110)
else if ( stats[0] >= 70 && stats[0] <= 79)
set_user_health(id, 110)
else if ( stats[0] >= 80 && stats[0] <= 89)
set_user_health(id, 110)
else if ( stats[0] >= 90 && stats[0] <= 99)
set_user_health(id, 110)
else if ( stats[0] >= 100 && stats[0] <= 109)
set_user_health(id, 115)
else if ( stats[0] >= 110 && stats[0] <= 119)
set_user_health(id, 120)
else if ( stats[0] >= 120 && stats[0] <= 129)
set_user_health(id, 130)
else if ( stats[0] >= 130 && stats[0] <= 139)
set_user_health(id, 140)
else if ( stats[0] >= 140 && stats[0] <= 149)
set_user_health(id, 145)
else if ( stats[0] >= 150 )
set_user_health(id, 150)
}Co jest nie tak ?
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.
|
Co zle zrobilem ?
#1
Napisano 04.01.2009 21:41
#2
Napisano 04.01.2009 21:50
/home/groups/amxmodx/tmp3/textA69QJd.sma(42) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(44) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(46) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(48) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(50) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(52) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(54) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(56) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(58) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(60) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(62) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(64) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(66) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(68) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(70) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(72) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(74) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(76) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(78) : error 017: undefined symbol "set_user_health"
/home/groups/amxmodx/tmp3/textA69QJd.sma(80) : error 017: undefined symbol "set_user_health"
20 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textA69QJd.amx (compile failed).
#3
Napisano 04.01.2009 21:53
#4
Napisano 04.01.2009 22:07
Co 1s ustawia danemu graczowi ilość HP. Czyli na 1. poziomie jesteś na hit'a a na ostatnim nieśmiertelny prawie.
#5
Napisano 04.01.2009 22:33
#6
Napisano 04.01.2009 22:38
sprawdza statystyki, a dokładniej ilość kill'iset_task(1.0,"rank",TASK+id,param,1,"b")
i jeżeli gracz ma określoną ich liczbę to ustawia mu hp (nawet jeśli nie żyje ?!)get_user_stats(id, stats, body)
A tobie pewnie chodziło o to żeby na początku rundy dodawało ileś hp ;>if ( stats[0] >= 0 && stats[0] <= 0)
set_user_health(id, 10)
#7
Napisano 04.01.2009 22:45
Fajny plugin napisałeś.
#8
Napisano 04.01.2009 23:18
#define AUTHOR "Edit By ZBAGI"
Fajny plugin napisałeś.
Edit, wiesz co to znaczy ?
Ps. już wiem jak to zrobić, ale dziś już nie zdarzę jutro skończę to pokażę co mi wyszło
#9
Napisano 04.01.2009 23:19
No jakoś nicku autora tam nie widzę.Edit, wiesz co to znaczy ?
#10
Napisano 05.01.2009 07:53
#12
Napisano 06.01.2009 17:44
v1.1
cvar:
Ustawiasz ile hp za level; pamiętaj, że maksymalnie to 255hp więc ustawienie tego parametru przy 20lvlach na wartość np. 10 nie ma sensuhp_per_lvl 5
Na prośbę ZBAGIego wersja 1.11
//UPDATE załączników
Załączone pliki
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych


Dodatki SourceMod



Temat jest zamknięty



lvl.amxx






