SAPE ERROR: Не могу подключиться к серверу: dispenser-01.saperu.net/code.php?user=836f97673aa6aa25a35b5029263ee232&host=amxxmodx.ru&charset=windows-1251&format=serialize, type: file_get_contents

SAPE ERROR: Не могу подключиться к серверу: dispenser-02.saperu.net/code.php?user=836f97673aa6aa25a35b5029263ee232&host=amxxmodx.ru&charset=windows-1251&format=serialize, type: file_get_contents

cs_get_user_team » AmxModX
| |
 RSS
  • OnLine

    : 6
    : 3
    : -
    : crawl Bot, Google Bot, robot Bot

    ?

    • AMX Mod X
    • up.org.ua


  • : Admin : 16-12-2011, 02:36 : 12312

    cs_get_user_team

    - , , , cs_get_user_team

    cstrike.inc:
    /* Get team directly from player's entity.
    * 1 = terrorist
    * 2 = counter-terrorist
    * 3 = spectator
    */
    enum CsTeams {
        CS_TEAM_UNASSIGNED = 0,
        CS_TEAM_T = 1,
        CS_TEAM_CT = 2,
        CS_TEAM_SPECTATOR = 3
    };
    native CsTeams:cs_get_user_team(index, &{CsInternalModel,_}:model = CS_DONTCHANGE);


    :
    cs_get_user_team(index)

    • index - id .

    :

    CS_TEAM_T
    CS_TEAM_CT
    CS_TEAM_SPECTATOR


    :
    Native

    :
    /* Plugin generated by AMXX-Studio */

    #include <amxmodx>
    #include <amxmisc>
    #include <cstrike>

    #define PLUGIN "[cstrike] cs_get_user_team"
    #define VERSION "1.0"
    #define AUTHOR "Admin"

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

        register_clcmd("say /my_team","f_get_my_team")
    }
    public f_get_my_team(id){

        new CsTeams:my_team
        my_team = cs_get_user_team(id)
        
        switch (my_team){
            case (CS_TEAM_CT):{
                client_print(0,print_chat,"My team is CT")
            }
            case (CS_TEAM_T):{
                client_print(0,print_chat,"My team is T")
            }
            case (CS_TEAM_SPECTATOR):{
                client_print(0,print_chat,"My team is Spectator")
            }
            case (CS_TEAM_UNASSIGNED):{
                client_print(0,print_chat,"My team is Unssigned")
            }        
        }
    }


    :
    say /my_team, f_get_my_team.
    ( ), :
    enum CsTeams {
        CS_TEAM_UNASSIGNED = 0,
        CS_TEAM_T = 1,
        CS_TEAM_CT = 2,
        CS_TEAM_SPECTATOR = 3
    };

    , .

    switch, , , .
    : .

    , .
    .
    , .
    .
    cs_get_user_team