auto join team

Сообщения
282
Реакции
34
Помог
3 раз(а)
Hi,
how to modify this code to force player to join in team, but to choose specified model, for example: "gign" if CT, if TT "terror"
This is just example for names.

Код:
#include <amxmodx>
#include <reapi>

const FLAG = ADMIN_BAN;

public client_putinserver(id)
{
    if (get_user_flags(id) & FLAG)
        return;
 
    rg_join_team(id, rg_get_join_team_priority());
}
I've checked all functions in reapi but I didnt find suitable :(
maybe
Код:
rg_set_user_team
but I dont know how to set it up (modelname confuses me)
 
Последнее редактирование:
Сообщения
893
Реакции
149
Помог
25 раз(а)
Игрок сам должен выбрать модель? Или плагин за него?
 
Сообщения
282
Реакции
34
Помог
3 раз(а)
Does anyone have idea why this code above throws error like this:
Код:
L 02/04/2023 - 13:39:09: [AMXX] Displaying debug trace (plugin "auto_join_team.amxx", version "unknown")
L 02/04/2023 - 13:39:09: [AMXX] Run time error 10: native error (native "rg_join_team")
L 02/04/2023 - 13:39:09: [AMXX]    [0] auto_join_team.sma::client_putinserver (line 11)
Code is pretty simple :(
 
Сообщения
282
Реакции
34
Помог
3 раз(а)
Код:
L 02/04/2023 - 16:12:41: [ReAPI] rg_join_team: player 2 is not connected
L 02/04/2023 - 16:12:41: [AMXX] Displaying debug trace (plugin "auto_join_team.amxx", version "unknown")
L 02/04/2023 - 16:12:41: [AMXX] Run time error 10: native error (native "rg_join_team")
L 02/04/2023 - 16:12:41: [AMXX]    [0] auto_join_team.sma::client_putinserver (line 11)
 
Сообщения
893
Реакции
149
Помог
25 раз(а)
C++:
#include <amxmodx>
#include <reapi>

const FLAG = ADMIN_BAN;

public client_putinserver(id)
{
    if(!is_user_connected(id))
        return;
    
    if (get_user_flags(id) & FLAG)
        return;
 
    rg_join_team(id, rg_get_join_team_priority());
}
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу