Заказать игровой сервер Контакты (заказать плагин/исправить ошибки/другое) Поиск

[ вход ]
[ последние сообщения ]

  • Страница 1 из 1
  • 1
Форум » SourceMod >> CS:Source >> CSGO » Обсуждение » team weapons (write plugin for me)
team weapons
aphrodit Дата: Понедельник, 04.12.2017, 00:31:42 | Сообщение # 1
Сообщений: 12
Репутация: 0 [ +/- ]
Hi
somebody write plugin for show team weapon in chat after round start
tnx.

sourcemod 1.4.2

css v34
 
Entity Дата: Вторник, 05.12.2017, 13:06:36 | Сообщение # 2
Сообщений: 67
Репутация: 1 [ +/- ]
I don't quite understand you. You need to in the beginning of the round shown in the chat what weapons do the team members?
 
Nail Дата: Среда, 06.12.2017, 08:08:30 | Сообщение # 3
Сообщений: 38
Репутация: 8 [ +/- ]
I used to implement such plugins a while ago.
All you need is to hook chat messages, block them, form new messages with prepended weapon type and send it further:

Код
public Action OnClientSayCommand(int client, const char[] command, const char[] sArgs)
{
    if(sArgs[0] != '!')
        return Plugin_Continue;
     
    int len = strlen(sArgs[1]);
     
    decl String:newcmd[128] = "say123";
     
    FakeClientCommand(client, newcmd); //that's only an idea
     
    return Plugin_Handled; // here you block original command
}


Get client weapon:
https://sm.alliedmods.net/new-api/clients/GetClientWeapon

If you want it to be shown only once, you can hook the most relevant event and iterate through all alive players via for loop in it.
to hook an event: https://sm.alliedmods.net/new-api/events/HookEvent
a list of events: https://wiki.alliedmods.net/Game_Events_(Source)


Сообщение отредактировал Nail - Среда, 06.12.2017, 08:09:00
 
Форум » SourceMod >> CS:Source >> CSGO » Обсуждение » team weapons (write plugin for me)
  • Страница 1 из 1
  • 1
Поиск: