Witam wszystkich. Robie nowe klasy diablomod i chcę dodać nie które moce, lecz nie wiem jak, szukam na forum/necie/google i nie ma. Może tu ktoś mi pomoże. Proszę o wytłumaczenie mi jak dodać klasie regenerację 20 hp co każde 5 sec.
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.
|
Guest Message by DevFuse
Regeneracja HP
Started By
*Piko*
, 14.01.2012 16:27
4 replies to this topic
#2
Posted 14.01.2012 18:30
Let me google that for you
plugin_init
na koniec sma
plugin_init
register_think("HealBot", "HealBotThink");
CreateHealBot();
na koniec sma
CreateHealBot()
{
new Bot = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
if (Bot)
{
set_pev(Bot, pev_classname, "HealBot");
dllfunc(DLLFunc_Spawn, Bot);
set_pev(Bot, pev_nextthink, get_gametime() + 5.0);
}
}
public HealBotThink(Bot)
{
new iPlayers[32], iNum, id;
get_players(iPlayers, iNum);
for(new i; i<iNum; i++)
{
id = iPlayers[i];
if (!is_user_alive(id)) continue;
if (player_class[id] != Twoja_Klasa) continue;
change_health(id,20,0,"");
}
set_pev(Bot, pev_nextthink, get_gametime() + 5.0);
}
#3
Posted 15.01.2012 10:42
Nie wiem dlaczego ale mi to coś nie działa.
Edited by Radzio94, 15.01.2012 10:44.
#4
Posted 15.01.2012 10:45
Mi tak samo. Na samym końcu sma dodałęm
player_b_hook[id2] = player_b_hook[id]
player_b_darksteel[id2] = player_b_darksteel[id]
player_b_illusionist[id2] = player_b_illusionist[id]
player_b_mine[id2] = player_b_mine[id]
wear_sun[id2] = wear_sun[id]
player_sword[id2] = player_sword[id]
player_ultra_armor_left[id2]=player_ultra_armor_left[id]
player_ultra_armor[id2]=player_ultra_armor[id]
dropitem(id);
return 1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
CreateHealBot()
{
new Bot = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
if (Bot)
{
set_pev(Bot, pev_classname, "HealBot");
dllfunc(DLLFunc_Spawn, Bot);
set_pev(Bot, pev_nextthink, get_gametime() + 5.0);
}
}
public HealBotThink(Bot)
{
new iPlayers[32], iNum, id;
get_players(iPlayers, iNum);
for(new i; i<iNum; i++)
{
id = iPlayers[i];
if (!is_user_alive(id)) continue;
if (player_class[id] != LuFFy) continue;
change_health(id,20,0,"");
}
set_pev(Bot, pev_nextthink, get_gametime() + 5.0);
}
a plugin_init
public plugin_init()
{
register_think("HealBot", "HealBotThink");
CreateHealBot();
new map[32]
get_mapname(map,31)
new times[64]
get_time("%m/%d/%Y - %H:%M:%S" ,times,63)
log_to_file("addons/amxmodx/logs/diablo.log","%s ### MAPA: %s ### ",times,map)
player_b_hook[id2] = player_b_hook[id]
player_b_darksteel[id2] = player_b_darksteel[id]
player_b_illusionist[id2] = player_b_illusionist[id]
player_b_mine[id2] = player_b_mine[id]
wear_sun[id2] = wear_sun[id]
player_sword[id2] = player_sword[id]
player_ultra_armor_left[id2]=player_ultra_armor_left[id]
player_ultra_armor[id2]=player_ultra_armor[id]
dropitem(id);
return 1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
CreateHealBot()
{
new Bot = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
if (Bot)
{
set_pev(Bot, pev_classname, "HealBot");
dllfunc(DLLFunc_Spawn, Bot);
set_pev(Bot, pev_nextthink, get_gametime() + 5.0);
}
}
public HealBotThink(Bot)
{
new iPlayers[32], iNum, id;
get_players(iPlayers, iNum);
for(new i; i<iNum; i++)
{
id = iPlayers[i];
if (!is_user_alive(id)) continue;
if (player_class[id] != LuFFy) continue;
change_health(id,20,0,"");
}
set_pev(Bot, pev_nextthink, get_gametime() + 5.0);
}
a plugin_init
public plugin_init()
{
register_think("HealBot", "HealBotThink");
CreateHealBot();
new map[32]
get_mapname(map,31)
new times[64]
get_time("%m/%d/%Y - %H:%M:%S" ,times,63)
log_to_file("addons/amxmodx/logs/diablo.log","%s ### MAPA: %s ### ",times,map)
#5
Posted 16.01.2012 21:35
znajdź
pod dodaj
na samym końcu
set_task(0.8, "UpdateHUD",0,"",0,"b")
pod dodaj
set_task(5.0, "check_medic3", 0, "", 0, "b")
na samym końcu
public check_medic3() { new Players[32], playerCount, a get_players(Players, playerCount, "ah") for (new i=0; i<playerCount; i++) { a = Players[i] if (player_class[a] != nazwa klasy) continue change_health(a,20,0,"") } }
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users