Resetscore, помогите добавить |
Здравствуйте, гость Вход | Регистрация
Наши новости:
|
|
|
Resetscore, помогите добавить |
dr-ef
|
13.1.2012, 20:43
Сообщение
|
|
|
resetscore.sma(1) : error 010: invalid function or declaration
1 Error. Could not locate output file resetscore.amx (compile failed). |
|
|
|
Grape Fruit
|
13.1.2012, 20:57
Сообщение
|
![]() |
код Код #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #define adtime 600.0 //Default of 10 minuites new pcvar_Advertise new pcvar_Display public plugin_init() { register_plugin("Reset Score", "1.0", "Silenttt") //You may type /resetscore or /restartscore register_clcmd("say /rs", "reset_score", ADMIN_RESERVATION) register_clcmd("say /resetscore", "reset_score", ADMIN_RESERVATION) register_clcmd("say /restartscore", "reset_score", ADMIN_RESERVATION) //This command by default will be set at 0 //Change it to 1 in server.cfg if you want //A message to be shown to advertise this. pcvar_Advertise = register_cvar("sv_rsadvertise", "0") //This command by default is also 0 //Change it to 1 in server.cfg if you want //It to show who reset their scores when they do it pcvar_Display = register_cvar("sv_rsdisplay", "0") if(get_cvar_num("sv_rsadvertise") == 1) { set_task(adtime, "advertise", _, _, _, "b") } } public reset_score(id) { //These both NEED to be done twice, otherwise your frags wont //until the next round cs_set_user_deaths(id, 0) set_user_frags(id, 0) cs_set_user_deaths(id, 0) set_user_frags(id, 0) if(get_pcvar_num(pcvar_Display) == 1) { new name[33] get_user_name(id, name, 32) client_print(0, print_chat, "%s обнулил свой счёт", name) } else { client_print(id, print_chat, "Ваш счёт успешно обнулён") } } public advertise() { set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0) show_hudmessage(0, "Напишите в чате /resetscore или /rs для обнуления вашего счёта") } public client_putinserver(id) { if(get_pcvar_num(pcvar_Advertise) == 1) { set_task(10.0, "connectmessage", id, _, _, "a", 1) } } public connectmessage(id) { if(is_user_connected(id)) { client_print(id, print_chat, "Напишите в чате /resetscore или /rs для обнуления вашего счёта") } } Наверное что-то не так откопировал. У меня компилируется. Попробуй через онлайн компилятор. http://webcomp.ak-team.com/ |
|
|
|
dr-ef
|
14.1.2012, 0:42
Сообщение
|
|
|
Наверное что-то не так откопировал. У меня компилируется. Попробуй через онлайн компилятор. http://webcomp.ak-team.com/ Странно как то все точно так же и через этот же компилировал но с первого раза не захотел а потом нормально.Сейчас буду пробывать. |
|
|
|
dr-ef
|
14.1.2012, 1:23
Сообщение
|
|
|
по пробывал я так как ты по советовал и работает для всех...
|
|
|
|
Grape Fruit
|
14.1.2012, 11:57
Сообщение
|
![]() |
Rejiser,
Каюсь:) Забыл) |
|
|
|
dr-ef
|
14.1.2012, 14:43
Сообщение
|
|
|
Все работает . Всем Спасибо !
|
|
|
|
Flash
|
14.1.2012, 15:10
Сообщение
|
|
|
Код if ( get_user_flags( id ) & ADMIN_FLAG ) { //code } а так проще) |
|
|
|
![]() ![]() |