{ "status":{ "error":false, "code":200, "type":"success", "message":"Success" }, "pagination":{ "before_cursor":null, "after_cursor":"xxxxb3VudF9pZDo6Oi0tIyNpZDo6OjY3NzI0NzQ", "previous_link":null, "next_link":"https://api.us.onelogin.com/api/1/users?after_cursor= xxxxb3VudF9pZDo6Oi0tIyNpZDo6OjY3NzI0NzQ" }, "data":[ { "activated_at":"2009-05-05T00:00:00.000Z", "created_at":"2009-05-05T03:18:08.338Z", "email":"hazel.zhang@onelogin.com", "username":"hzhang", "firstname":"Hazel", "group_id":123456, "id":1, "invalid_login_attempts":0, "invitation_sent_at":"2011-09-20T16:14:48.344Z", "last_login":"2009-12-08T23:02:36.786Z", "lastname":"Zhang", "locked_until":null, "notes":null, "openid_name":"hazel.zhang", "locale_code":null, "password_changed_at":"2013-12-02T00:00:00.000Z", "phone":"", "status":1, "updated_at":"2015-08-21T23:12:08.495Z", "distinguished_name":null, "external_id":null, "directory_id":null, "member_of":null, "samaccountname":null, "userprincipalname":null, "manager_ad_id":null, "manager_user_id": 29260307, "role_id": [ 77777, 111111 ], "company": "OneLogin", "department": "Finance", "title": "Captain", "state": 1, "trusted_idp_id": null, "custom_attributes": { "alias": "Haz", "branch": "Southwest Center" } }, ...
"activated_at":"2011-07-26T19:50:47.242Z", "created_at":"2009-08-05T20:59:20.190Z", "email":"amaya@onelogin.com", "username":"", "firstname":"Amaya", "group_id":123456, "id":2, "invalid_login_attempts":0, "invitation_sent_at":"2011-08-10T14:22:16.466Z", "last_login":"2015-10-08T02:59:33.732Z", "lastname":"Gomez", "locked_until":null, "notes":null, "openid_name":"amaya.gomez", "locale_code":null, "password_changed_at":"2015-09-09T16:11:09.542Z", "phone":"650-555-1212", "status":1, "updated_at":"2015-10-08T02:59:33.982Z", "distinguished_name":null, "external_id":null, "directory_id":null, "member_of":null, "samaccountname":"amaya.gomez", "userprincipalname":null, "manager_ad_id":null, "manager_user_id": 29260307, "role_id": null, "company": "", "department": "", "title": "", "state": 1, "trusted_idp_id": null, "custom_attributes": { "alias": "", "branch": "" } } ] }
developers.onelogin.com
Все игроки знакомы с командой kick, кто то сам кикал, кого то кикали админы за нарушения правил сервера, или плагин за высокий пинг, суть не в этом, а в том что эта команда, как и многие другие, работают не с индексом игрока, а с userid, что бы получить эти заветные циферки существует функция get_user_userid, которая получает userid игрока из его индекса на сервере. Главное не запутаться.
Инфо из amxmodx.inc:
/* Returns player userid. */
native get_user_userid(index);
Если выполнить команду amx_who, то консоль нам вернет вот такую таблицу ( завит от количества игроков на сервере и наличие плагина с данной командой, плагин с админскими командами входит в стандартный набор amxmodx)
Грубо говоря, первый столбик это индекс игроков на сервере, а вот колона userid и есть тот идентификатор с которым работают такие команды как kick или amx_ban
Синтаксис:
- index — id игрока
Функция возвращает userid игрока.
Тип функции:
Native
Пример:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "[amxmodx.inc] get_user_menu"
#define VERSION "1.0"
#define AUTHOR "Admin"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
regi.
server_print("kick #%d Correct command",userid)
server_cmd("kick #%d Correct command",userid)
}
Описание:
Данный пример сделает из вас мазохистов, не пугайтесь, всего то на пару секунд ( это сделано что бы не нагромождать лишнего и использовать всем привычные функции).
Выполняя команду say /kick, сервер вас кикнет ив своей консоли напишет вот такое сообщение:
Те кто внимательно смотрели код и это сообщении, думаю уже догадались о всем происходящем, если нет, я поясню.
Для того что бы кикнуть игрока с сервера, необходимо воспользоваться командой kick, вот ее синтаксис:
Как видно нам нужно указать или имя или userid, а в примере сначала подставляется индекс игрока, по этому то его и не кикает с сервера.
Далее, с помощью функции get_user_userid, был получен его userid и подставлен в команду и вас с успехом выкидывает с сервера.
Надеюсь вы поняли разницу между index и userid. Для понимания вот еще можно что добавить:
index игрока может быть от 1 до 32,то есть можно сказать индекс это занимаемый слот игроком.
amxxmodx.ru
Параметры
- UserIds — Перечисленные через запятую идентификаторы пользователей или их короткие имена (screen_name). По умолчанию — идентификатор текущего пользователя. список строк, разделенных через запятую, количество элементов должно составлять не более 1000
- Fields — Список дополнительных полей профилей, которые необходимо вернуть. См. подробное описание. /// Доступные значения: photo_id, verified, sex, bdate, city, country, home_town, has_photo, photo_50, photo_100, photo_200_orig, photo_200, photo_400_orig, photo_max, photo_max_orig, online, lists, domain, has_mobile, contacts, site, education, universities, schools, status, last_seen, followers_count, common_count, occupation, nickname, relatives, relation, personal, connections, exports, wall_comments, activities, interests, music, movies, tv, books, games, about, quotes, can_post, can_see_all_posts, can_see_audio, can_write_private_message, can_send_friend_request, is_favorite, is_hidden_from_feed, timezone, screen_name, maiden_name, crop_photo, is_friend, friend_status, career, military, blacklisted, blacklisted_by_me. список строк, разделенных через запятую
- NameCase — Падеж для склонения имени и фамилии пользователя. Возможные значения: именительный – nom, родительный – gen, дательный – dat, винительный – acc, творительный – ins, предложный – abl. По умолчанию nom. строка
Результат
После успешного выполнения возвращает массив объектов user.
Исключения
- AccessTokenInvalidException — не задан или используется неверный AccessToken.
vknet.github.io
Syntax
Get-User [-Anr <String>] [-Arbitration] [-AuditLog] [-AuxAuditLog] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-PublicFolder] [-ReadFromDomainController] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-ResultSize <Unlimited>] [-Sortby <String>] [-SupervisoryReviewPolicy] [<CommonParameters>]
Get-User [[-Identity] <UserIdParameter>] [-Arbitration] [-AuditLog] [-AuxAuditLog] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-PublicFolder] [-ReadFromDomainController] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-ResultSize <Unlimited>] [-Sortby <String>] [-SupervisoryReviewPolicy] [<CommonParameters>]
Description
The Get-User cmdlet returns no mail-related properties for mailboxes or mail users. To view the mail-related properties for a user, you need to use the corresponding cmdlet based on the object type (for example, Get-Mailbox or Get-MailUser).
You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet (https://technet.microsoft.com/library/mt432940.aspx).
Examples
————————— Example 1 —————————
Get-User -ResultSize unlimited
This example returns a summary list of all users in your organization.
————————— Example 2 —————————
Get-User -Identity "Coy Damon" | Format-List
This example returns detailed information for the user named Coy Damon.
————————— Example 3 —————————
Get-User -OrganizationalUnit "Marketing"
This example retrieves information about users in the Marketing OU.
————————— Example 4 —————————
Get-User -Filter "Title -like '*Manager'"
This example uses the Filter parameter to retrieve information about all users that have the word Manager at the end of their title.
Optional Parameters
Inputs
To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types (https://go.microsoft.com/fwlink/p/?LinkId=616387). If the Input Type field for a cmdlet is blank, the cmdlet doesn't accept input data.
Outputs
To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types (https://go.microsoft.com/fwlink/p/?LinkId=616387). If the Output Type field is blank, the cmdlet doesn't return data.
Related Links
- Online Version