Правила форума Гаранты форума
Размещение рекламы AMX-X компилятор

Здравствуйте, гость Вход | Регистрация

Наши новости:

14-дек
24-апр
10-апр
11-апр

Ошибки при компиляции

Статус пользователя TYLER[t]
сообщение 23.8.2011, 9:46
Сообщение #1


Стаж: 14 лет

Сообщений: 43
Благодарностей: 26
Полезность: 461

Помогите исправить ошибки, плагины не компилируются.
*sma. (1)
/* ********************************************************************************
************************************************************************ */
// # The plugin has been prepared specifically for www.amxmodx.org
// # ********************************************************************************
***********************************************************
// # + What doing this plugin?
// # = Reset your score in real time (frags and death)
// #
// # + Is it stable?
// # = For me, at this time, Yes. But all the same must be approved.
// #
// # + How I can install it on the my server?
// # = Read the text which is below....
// #
// # copy this source file into the your scripts folder
// # compile and move plugin to the plugins folder
// # open and write into plugins.ini resetscore.amxx debug
// # remeber about save this file and close it.
// #
// # *********************************************************
// # this plugin require chatcolor.inc
// # that you must download it and install for(on) your serv
// # add constants into your server or amxx cfgs and restart the server
// #
// # ********************************************************************************
***********************************************************
// #
// # amx_admin_rsfrags 7 | | How much of frags this plugin must give to user with accesslevel 2
// # admin_rsdeath -1988 | | How much of death this plugin must give to user with accesslevel 2
// # amx_rsdeath 10 | | When users can reset their score. Death limit rule. Only if users death more than limit!
// #
// # |=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=
|=|
// #
// # Welcome to the AMX Mod X 1.8.1-300 Compiler.
// # Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
// #
// # Header size: 648 bytes
// # Code size: 2320 bytes
// # Data size: 2108 bytes
// # Stack/heap size: 16384 bytes; estimated max. usage=779 cells (3116 bytes)
// # Total requirements: 21460 bytes
// # Done.
// #
// # Copied Output File to: Z:\cstrike\addons\amxmodx\plugins\resetscore.amxx
// # Compilation Time: 0,08 sec
// #
// # |=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=
|=||=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|=|
// #
// # ********************************************************************************
*******************************************************************************
// # It's my firs plugin -- Don't judge strictly -- Maybe my english isn't wery well but something I can :D -- So checking this pl and tell me about bugs
/* ********************************************************************************
********************************************************************************
*
*********** */

#include <amxmodx>
#include <amxmisc>
#include <chatcolor>
#include <cstrike>
#include <fun>
#include <dhudmessages>

new rs_death, admin_rsfrags, admin_rsdeath

public plugin_init()
{
register_plugin("Reset Score", "1.0", "Alex D.")

admin_rsfrags = register_cvar("amx_admin_rsfrags", "7") // How much of frags this plugin must give to user with accesslevel 2
admin_rsdeath = register_cvar("amx_admin_rsdeath", "-200") // How much of death this plugin must give to user with accesslevel 2

rs_death = register_cvar("amx_rsdeath", "10") // Users can reset their score if amx_rsdeath more than amx_rsdeath :D. Death limit rule.

register_clcmd("say", "handle_say")
}

public fun_score(id)
{

if (access(id, 2))
{
new A = get_pcvar_num(admin_rsfrags)
new B = get_pcvar_num(admin_rsdeath)
new C = get_user_frags(id)

set_user_frags(id, A+C) // really C+A :D but mat. The queen of logic.
cs_set_user_deaths(id, B)
client_print_color(id, RED, "^1[^4Server Bot^1] ^1After using the command ^4rs ^1you have got: ^4%d ^3frags ^1and ^4%d ^3death ^1!", get_user_frags(id), cs_get_user_deaths(id))
}

else
{
client_print_color(id, RED, "^1[^4Server Bot^1] ^3You don't have premissions for using this command!")
}
return PLUGIN_HANDLED
}

public reset_score(id)
{
new D = get_pcvar_num(rs_death), name[31]

if (access(id, 2))
{
get_user_name(id, name, 31)
client_print_color(0, GREY, "^1[^4Server Bot^1] ^1Admin ^4%s ^1has reset their: ^3%d ^1death and ^3%d^1 frags.", name, cs_get_user_deaths(id), get_user_frags(id))
set_user_frags(id, 0)
cs_set_user_deaths(id, 0)
return 0
}

if (cs_get_user_deaths(id) > D)
{
get_user_name(id, name, 31)
client_print_color(0, GREY, "^1[^4Server Bot^1] ^1Player ^4%s ^1has reset their: ^3%d ^1death.", name, cs_get_user_deaths(id))
set_user_frags(id, 0)
cs_set_user_deaths(id, 0)
}

else
{
client_print_color(id, RED, "^1[^4Server Bot^1] ^3By rule of death limit this isn't possible to reset your score!")
}
return PLUGIN_HANDLED
}

public client_authorized(id)
{
set_task(240.0, "print_text", id)
}

public handle_say(id)
{
new said[32]
read_args(said, 31)

if (equali(said, "^"rs^""))
{
reset_score(id)
}

if (equali(said, "^"funrs^""))
{
fun_score(id)
}

else if (containi(said, "resetscore") != -1)
{
print_text(id)
}
return PLUGIN_CONTINUE
}

public print_text(id)
{
client_print_color(id, GREY, "^1[^4Server Bot^1] Use chat command ^4rs ^1to reset your frags and death.")
set_dhudmessage(255, 100, 0, -1.0, 0.75, 1, 6.0, 12.0, 0.05, 0.05)
show_hudmessage(0, "Reset Score plugin written by DALE^nContacts in Europe.^nIcq: 5-440-931") // My copyright - can be commented removed *
}

/* ( icq: 389-057-865 | | skype: untunable | | @mail: dac-coder@qip.ru | | http://lineage.brovary.net/ ) */
/* ( building fun & classic servers for a pay -- contact with me you can get if looked up ) */


*sma. (2)


/* Plugin generated by AMXX-Studio */


#include <amxmodx>
#include <dhudmessages>

#define PLUGIN "Auto Restart vl"
#define VERSION "1.4"
#define AUTHOR "vato loco [GE-S]"

#define TIMER_TASK 123456
#define RESTART_TASK 789123

new g_counter

new g_autorestart
new g_autoenabled
new g_autocds
new g_autocount_color
new g_autostart_color
new g_auto_xypos

new g_SyncGameStart
new g_SyncRestartTimer

new bool:g_bRoundStart

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

register_logevent("RoundStart", 2, "1=Round_Start")
register_event("TextMsg","RestartTask","a","2&#Game_C")

register_dictionary("auto_restart_vl.txt")

g_autoenabled = register_cvar("amx_autorr_enable","1")
g_autocds = register_cvar("amx_autorr_cds","1")
g_autorestart = register_cvar("amx_autorr_time","40")
g_autocount_color = register_cvar("amx_autorr_count_color","0 255 0")
g_autostart_color = register_cvar("amx_autorr_start_color","0 255 255")
g_auto_xypos = register_cvar("amx_autorr_xypos","-1.0 0.25")

g_SyncGameStart = CreateHudSyncObj()
g_SyncRestartTimer = CreateHudSyncObj()
}

public RoundStart()
{
if(!get_pcvar_num(g_autoenabled))
return PLUGIN_HANDLED

if(g_bRoundStart)
{
static r, g, b, Float:x, Float:y
HudMsgPos(x,y)
HudMsgColor(g_autostart_color, r, g, b)

set_dhudmessage( r, g, b, x, y, 1, 5.0, 8.0, 0.0, 0.0)
ShowSyncHudMsg( 0, g_SyncGameStart, "%L",LANG_PLAYER, "GAME_STARTED")
}
g_bRoundStart = false

return PLUGIN_CONTINUE
}

public RestartTask()
{
if(!get_pcvar_num(g_autoenabled))
return PLUGIN_HANDLED

set_task(1.0,"TimeCounter",TIMER_TASK,_,_,"a",get_pcvar_num(g_autorestart))
set_task(get_pcvar_float(g_autorestart),"RestartRound",RESTART_TASK)

return PLUGIN_CONTINUE
}

public TimeCounter()
{
g_counter++

new Float:iRestartTime = get_pcvar_float(g_autorestart) - g_counter
new Float:fSec
fSec = iRestartTime

static r, g, b, Float:x, Float:y
HudMsgPos(x,y)
HudMsgColor(g_autocount_color, r, g, b)

set_dhudmessage( r, g, b, x, y, 0, 0.0, 1.0, 0.0, 0.0)
ShowSyncHudMsg( 0, g_SyncRestartTimer, "%L",LANG_PLAYER, "AUTO_RESTART", floatround(fSec))

if(get_pcvar_num(g_autocds) && get_pcvar_num(g_autorestart) - g_counter < 11 && get_pcvar_num(g_autorestart) - g_counter !=0)
{
static szNum[32]
num_to_word(get_pcvar_num(g_autorestart) - g_counter, szNum, 31)
client_cmd(0,"speak ^"vox/%s^"", szNum)
}
if(g_counter == get_pcvar_num(g_autorestart))
{
g_bRoundStart = true
g_counter = 0
}
}

public RestartRound()
{
server_cmd("sv_restartround 1")
}

public HudMsgColor(cvar, &r, &g, &b)
{
static color[16], piece[5]
get_pcvar_string(cvar, color, 15)

strbreak( color, piece, 4, color, 15)
r = str_to_num(piece)

strbreak( color, piece, 4, color, 15)
g = str_to_num(piece)
b = str_to_num(color)
}

public HudMsgPos(&Float:x, &Float:y)
{
static coords[16], piece[10]
get_pcvar_string(g_auto_xypos , coords, 15)

strbreak(coords, piece, 9, coords, 15)
x = str_to_float(piece)
y = str_to_float(coords)
}

Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   Цитировать сообщение
Статус пользователя AndrewZ
сообщение 23.8.2011, 10:36
Сообщение #2


Иконка группы

Стаж: 18 лет
Город: Санкт-Петербург


Сообщений: 4700
Благодарностей: 2452
Полезность: 1018

Надо было сразу текст ошибки писать...

Там инклуд, ошибка из за него...


и dhudmessage ты сам прикручивал?
Прикрепленные файлы:
Прикрепленный файл  plugini.rar ( 2,94 килобайт ) Кол-во скачиваний: 79


Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
FixX
сообщение 23.8.2011, 10:43
Сообщение #3
Стаж: 15 лет

Сообщений: 2200
Благодарностей: 526
Полезность: 0

Цитата
#include <chatcolor>
#include <dhudmessages>


#include <colorchat>
#include <dhudmessage>


и убери комментарии все
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя AndrewZ
сообщение 23.8.2011, 10:50
Сообщение #4


Иконка группы

Стаж: 18 лет
Город: Санкт-Петербург


Сообщений: 4700
Благодарностей: 2452
Полезность: 1018

FixX,
у него еще не правильно задан показ худа

set_dhudmessage ....
show_hudmessage ...


Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
FixX
сообщение 23.8.2011, 11:21
Сообщение #5
Стаж: 15 лет

Сообщений: 2200
Благодарностей: 526
Полезность: 0

Цитата(ZZZombiE @ 23.8.2011, 11:50) *
FixX,
у него еще не правильно задан показ худа

set_dhudmessage ....
show_hudmessage ...

ну если он в инклудах делает такие ошибки то что можно говорить про функции)
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя TYLER[t]
сообщение 24.8.2011, 15:45
Сообщение #6


Стаж: 14 лет

Сообщений: 43
Благодарностей: 26
Полезность: 461

Делал все спеша, потому что собирался уезжать.
Всем спасибо, все свободны :D
Да, еще как изменить цвет в dhud?

Отредактировал: TYLER[t], - 24.8.2011, 15:47
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
FixX
сообщение 24.8.2011, 15:52
Сообщение #7
Стаж: 15 лет

Сообщений: 2200
Благодарностей: 526
Полезность: 0

Цитата(TYLER[t] @ 24.8.2011, 16:45) *
Да, еще как изменить цвет в dhud?

set_dhudmessage( красный = 160, зеленый = 160, синий = 160, по оси x = -1.0, по оси y = 0.65,
эффекты = 2(1-4), скорость появления = 6.0, время задержки на экране = 3.0,
время задержки при затухании символов = 0.1, время задержки при появлении символов = 1.5 )
show_dhudmessage( index, const message[], any:... )
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя TYLER[t]
сообщение 24.8.2011, 16:15
Сообщение #8


Стаж: 14 лет

Сообщений: 43
Благодарностей: 26
Полезность: 461

Можешь пример написать, как будет выглядеть в коде?
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
FixX
сообщение 24.8.2011, 16:18
Сообщение #9
Стаж: 15 лет

Сообщений: 2200
Благодарностей: 526
Полезность: 0

set_dhudmessage(160, 160, 160, -1.0, 0.65, 2, 6.0, 3.0, 0.1, 1.5)
вроде так
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
  Тема закрытаНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: