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

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

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

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

> Правила форума

Этот раздел, как вы могли заметить по названию, предназначен для решения вопросов по поводу уже существующих модов и плагинов.
Пожалуйста, если у вас проблема с написанием плагина, не путайте этот раздел с разделом по скриптингу.
Для поиска плагинов и модов существует соответствующий раздел.

Название темы должно соответствовать содержанию. Темы с названием типа "Помогите", "Вопрос", "парни подскажите..." - будут удалены.
Все темы, не относящиеся к "Вопросам по модам и плагинам", будут удалены или перемещены в соответствующий раздел.

Правила оформления темы:
1. Помимо заголовка не забудьте верно сформулировать свой вопрос.
2. Выложите исходник (в тег кода + ) или ссылку на плагин который вызывает у вас вопросы.
3. Выложите лог с ошибками (если имеется) под спойлер

Как убрать надпись?

, last man 2
Статус пользователя ser1
сообщение 8.12.2012, 6:13
Сообщение #1


Стаж: 13 лет

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

Нужно чтоб был только звук, тоесть не писал что ты остался один против стольки-то противников

last_man_2.sma

/* AMX Mod script.
*
* © Copyright 2002, KkkkkkTzs
* This file is provided as is (no warranties).
*
*/

#include <amxmod>

new notsendCT = 0 // mark that we have send the sound
new notsendT = 0 // mark that we have send the sound

public death_msg(id){
new players_ct[32], players_t[32], ict, ite
get_players(players_ct,ict,"ae","CT")
get_players(players_t,ite,"ae","TERRORIST")

new victim = read_data(2)
new victim_team = get_user_team(victim,"",0)

if (victim_team == 1 && ite > 0)
notsendT = 1 // mark that we have not send the sound
else if ((victim_team == 2 || victim_team == 4) && ict > 0)
notsendCT = 1 // mark that we have not send the sound

if (ict==1&&ite==1){
new name[32]
get_user_name(players_ct[0],name,32)
set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(players_t[0],"You and %s left!",name)

get_user_name(players_t[0],name,32)
set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(players_ct[0],"You and %s left!",name)

if (notsendT) client_cmd(players_t[0],"spk ^"vox/_period _period your the last man^"")
if (notsendCT) client_cmd(players_ct[0],"spk ^"vox/_period _period your the last man^"")
notsendT = 0 // mark that we have send the sound
notsendCT = 0 // mark that we have send the sound
}
else if (ict==1&&notsendCT){
set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(players_ct[0],"Only you against %i Terrorists!",ite)
client_cmd(players_ct[0],"spk ^"vox/_period _period your the last man^"")
notsendCT = 0 // mark that we have send the sound
}
else if (ite==1&&notsendT){
set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
show_hudmessage(players_t[0],"Only you against %i CT!",ict)
client_cmd(players_t[0],"spk ^"vox/_period _period your the last man^"")
notsendT = 0 // mark that we have send the sound
}
return PLUGIN_CONTINUE
}
public plugin_init(){
register_plugin("Last Man 2","0.7","default")
register_event("DeathMsg","death_msg","a")
return PLUGIN_CONTINUE
}



Отредактировал: ser1, - 8.12.2012, 6:14
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   Цитировать сообщение
Статус пользователя LaFA
сообщение 8.12.2012, 6:18
Сообщение #2


Стаж: 16 лет

Сообщений: 4505
Благодарностей: 3256
Полезность: 793

Скрытый текст
Код
#include <amxmod>

public plugin_init()
{
    register_plugin("Last Man 2","0.7","default")
    register_event("DeathMsg","death_msg","a")
    return PLUGIN_CONTINUE    
}

new notsendCT = 0 // mark that we have send the sound
new notsendT = 0  // mark that we have send the sound

public death_msg(id){
    new players_ct[32], players_t[32], ict, ite
    get_players(players_ct,ict,"ae","CT")    
    get_players(players_t,ite,"ae","TERRORIST")    

    new victim = read_data(2)
    new victim_team = get_user_team(victim,"",0)

    if (victim_team == 1 && ite > 0)
        notsendT = 1  // mark that we have not send the sound
    else if ((victim_team == 2 || victim_team == 4) && ict > 0)
        notsendCT = 1 // mark that we have not send the sound
    
    if (ict==1&&ite==1)
    {
        if (notsendT) client_cmd(players_t[0],"spk ^"vox/_period _period your the last man^"")
        if (notsendCT) client_cmd(players_ct[0],"spk ^"vox/_period _period your the last man^"")
        notsendT = 0 // mark that we have send the sound
        notsendCT = 0 // mark that we have send the sound
    }
    else if (ict==1&&notsendCT)
    {
        client_cmd(players_ct[0],"spk ^"vox/_period _period your the last man^"")
        notsendCT = 0 // mark that we have send the sound
    }
    else if (ite==1&&notsendT)
    {
        client_cmd(players_t[0],"spk ^"vox/_period _period your the last man^"")
        notsendT = 0 // mark that we have send the sound
    }
    return PLUGIN_CONTINUE    
}
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя ser1
сообщение 8.12.2012, 13:42
Сообщение #3


Стаж: 13 лет

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

спасибо
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
  Тема закрытаНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: