SuNKeePeRZ
Пользователь
- Регистрация
- 7 Авг 2017
- Сообщения
- 203
- Симпатии
- 10
- Пол
- Мужской
Здравствуйте, пишет что код скрипта не правильный. что не так?
//// knife_warm-up.sma
//
// C:\Users\SuNKeePeRZ\Desktop\183sunkeeperz\knife_warm-up.sma(35) : error 017:
undefined symbol "ExecuteHamB"
// C:\Users\SuNKeePeRZ\Desktop\183sunkeeperz\knife_warm-up.sma(35) : warning 217
: loose indentation
// C:\Users\SuNKeePeRZ\Desktop\183sunkeeperz\knife_warm-up.sma(35) : warning 215
: expression has no effect
// C:\Users\SuNKeePeRZ\Desktop\183sunkeeperz\knife_warm-up.sma(35) : error 001:
expected token: ";", but found ")"
// C:\Users\SuNKeePeRZ\Desktop\183sunkeeperz\knife_warm-up.sma(35) : error 029:
invalid expression, assumed zero
// C:\Users\SuNKeePeRZ\Desktop\183sunkeeperz\knife_warm-up.sma(35) : fatal error
107: too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file compiled\knife_warm-up.amx (compile failed).
//
// Compilation Time: 0,19 sec
// —------------------------------------—
//
// C:\Users\SuNKeePeRZ\Desktop\183sunkeeperz\knife_warm-up.sma(35) : error 017:
undefined symbol "ExecuteHamB"
// C:\Users\SuNKeePeRZ\Desktop\183sunkeeperz\knife_warm-up.sma(35) : warning 217
: loose indentation
// C:\Users\SuNKeePeRZ\Desktop\183sunkeeperz\knife_warm-up.sma(35) : warning 215
: expression has no effect
// C:\Users\SuNKeePeRZ\Desktop\183sunkeeperz\knife_warm-up.sma(35) : error 001:
expected token: ";", but found ")"
// C:\Users\SuNKeePeRZ\Desktop\183sunkeeperz\knife_warm-up.sma(35) : error 029:
invalid expression, assumed zero
// C:\Users\SuNKeePeRZ\Desktop\183sunkeeperz\knife_warm-up.sma(35) : fatal error
107: too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file compiled\knife_warm-up.amx (compile failed).
//
// Compilation Time: 0,19 sec
// —------------------------------------—
Код:
#include <amxmodx>
#if AMXX_VERSION_NUM < 183
#include <dhudmessage>
#endif
new Timer, SecondsCvar
new bool:g_knife = true
public plugin_init()
{
register_plugin( "Knife WarnUP" , "1.0", "ill" )
register_event("DeathMsg", "on_death", "a")
register_event( "CurWeapon", "EventCurWeapon", "be", "2!29" )
SecondsCvar = register_cvar("auto_rr_time","60.0")
Timer = get_pcvar_num(SecondsCvar)
set_task(1.0, "start_rr_timer", _, _, _, "a", Timer)
}
public on_death()
{
new victim
victim = read_data(2)
if(g_knife)
set_task(1.0, "fnRevivePlayer", victim)
}
public fnRevivePlayer(id)
{
if(!is_user_alive(id))
ExecuteHamB(Ham_CS_RoundRespawn, id)
}
public EventCurWeapon(id)
{
if(g_knife)
engclient_cmd(id, "weapon_knife")
}
public start_rr_timer()
{
Timer--
set_dhudmessage(135, 206, 235, -1.0, 0.08, 0, 0.0, 0.01)
show_dhudmessage(0, "Разминка на Ножах!^nРестарт через: [ %d ]", Timer)
if(Timer < 1)
{
server_cmd("sv_restartround 1")
set_task(3.0, "rr_end")
g_knife = false
}
}
public rr_end()
{
set_dhudmessage( random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, 0.78, 2, 6.0, 3.0, 0.1, 1.5, false )
show_dhudmessage(0, "Всем удачи!^nПриятной игры!")
}