#include <amxmodx>
#include <hamsandwich>
#define IGNORE_FLAGS (ADMIN_MENU|ADMIN_LEVEL_H) // Не выдавать плюшки игрокам с этими флагами
#define GIVE_FLAGS ADMIN_LEVEL_H // Выдаваемые флаги
#pragma semicolon 1
new g_bSteamPlayer[33];
public plugin_init()
RegisterHam(Ham_Spawn, "player", "PlayerSpawn", true)
public client_putinserver(id)
g_bSteamPlayer[id] = is_user_steam(id);
public PlayerSpawn(id) {
if(!is_user_connected(id) && !g_bSteamPlayer[id]) return;
new iFlags = get_user_flags(id)
if(iFlags & IGNORE_FLAGS) return;
set_user_flags(id, iFlags | GIVE_FLAGS)
}
stock is_user_steam(id) {
static dp_pointer;
if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider"))) {
server_cmd("dp_clientinfo %d", id); server_exec();
return (get_pcvar_num(dp_pointer) == 2) ? true : false;
}
return false;
}
#include <amxmodx>
#include <hamsandwich>
#define IGNORE_FLAGS (ADMIN_MENU|ADMIN_LEVEL_H) // Не выдавать плюшки игрокам с этими флагами
#define GIVE_FLAGS ADMIN_LEVEL_H // Выдаваемые флаги
#pragma semicolon 1
new g_bSteamPlayer[33];
public plugin_init()
RegisterHam(Ham_Spawn, "player", "PlayerSpawn", true);
public client_putinserver(id)
g_bSteamPlayer[id] = is_user_steam(id);
public PlayerSpawn(id) {
if(!is_user_connected(id)) return;
new iFlags = get_user_flags(id);
if(iFlags & IGNORE_FLAGS) return;
if(g_bSteamPlayer[id]) set_user_flags(id, iFlags | GIVE_FLAGS);
}
stock is_user_steam(id) {
static dp_pointer;
if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider"))) {
server_cmd("dp_clientinfo %d", id); server_exec();
return (get_pcvar_num(dp_pointer) == 2) ? true : false;
}
return false;
}
Я плохо вВот дерзай
PHP:#include <amxmodx> #include <hamsandwich> #define IGNORE_FLAGS (ADMIN_MENU|ADMIN_LEVEL_H) // Не выдавать плюшки игрокам с этими флагами #define GIVE_FLAGS ADMIN_LEVEL_H // Выдаваемые флаги #pragma semicolon 1 new g_bSteamPlayer[33]; public plugin_init() RegisterHam(Ham_Spawn, "player", "PlayerSpawn", true); public client_putinserver(id) g_bSteamPlayer[id] = is_user_steam(id); public PlayerSpawn(id) { if(!is_user_connected(id)) return; new iFlags = get_user_flags(id); if(iFlags & IGNORE_FLAGS) return; if(g_bSteamPlayer[id]) set_user_flags(id, iFlags | GIVE_FLAGS); } stock is_user_steam(id) { static dp_pointer; if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider"))) { server_cmd("dp_clientinfo %d", id); server_exec(); return (get_pcvar_num(dp_pointer) == 2) ? true : false; } return false; }
Спасибо!Вот дерзай
PHP:#include <amxmodx> #include <hamsandwich> #define IGNORE_FLAGS (ADMIN_MENU|ADMIN_LEVEL_H) // Не выдавать плюшки игрокам с этими флагами #define GIVE_FLAGS ADMIN_LEVEL_H // Выдаваемые флаги #pragma semicolon 1 new g_bSteamPlayer[33]; public plugin_init() RegisterHam(Ham_Spawn, "player", "PlayerSpawn", true); public client_putinserver(id) g_bSteamPlayer[id] = is_user_steam(id); public PlayerSpawn(id) { if(!is_user_connected(id)) return; new iFlags = get_user_flags(id); if(iFlags & IGNORE_FLAGS) return; if(g_bSteamPlayer[id]) set_user_flags(id, iFlags | GIVE_FLAGS); } stock is_user_steam(id) { static dp_pointer; if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider"))) { server_cmd("dp_clientinfo %d", id); server_exec(); return (get_pcvar_num(dp_pointer) == 2) ? true : false; } return false; }