news about free vip steam

Сообщения
272
Реакции
14
Код:
#include <amxmodx>
#include <reapi>

new Forward_amxbans,iRet;

public plugin_init() {
    Forward_amxbans= CreateMultiForward("amxbans_admin_connect",ET_IGNORE,FP_CELL);
    register_clcmd("joinclass","event_jointeam");
}

public event_jointeam(id)
{
    if(!is_user_steam(id) || get_user_flags(id) & ADMIN_LEVEL_H)
        return PLUGIN_CONTINUE;
   
    set_user_flags(id, ADMIN_LEVEL_H);
    ExecuteForward(Forward_amxbans, iRet, id);
    set_dhudmessage(200, 100, 0, -1.0, 0.60, 0, 0.1, 5.0, 0.3, 0.5);
    show_dhudmessage(id,"Witaj!^nOtrzymales VIP-a za posiadanie konta steam! :)")
    return PLUGIN_CONTINUE;
}

stock bool: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;
}
Yes ?
13 Окт 2022
problem
 

Вложения

Сообщения
101
Реакции
-11
Помог
2 раз(а)
#define is_user_steam(%0) (REU_GetAuthtype(%0) == CA_TYPE_STEAM)
 
Сообщения
101
Реакции
-11
Помог
2 раз(а)
Код:
#include <reapi>

//#define is_user_steam(%0) (REU_GetAuthtype(%0) == CA_TYPE_STEAM) в реапи уже имеется

if(is_user_steam(pPlayer)) {
    //code
}
 
Последнее редактирование:
Сообщения
272
Реакции
14
UrShade , now the plugin doesn't work. he doesn't give anyone a vipa and he doesn't even get a message
 
Сообщения
49
Реакции
32
pmadisson75, ok, if you have reapi on your server, try this code

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

new Forward_amxbans,iRet;

public plugin_init() {
    Forward_amxbans= CreateMultiForward("amxbans_admin_connect",ET_IGNORE,FP_CELL);
    register_clcmd("joinclass","event_jointeam");
}

public event_jointeam(id)
{
    if(!is_user_steam(id) || get_user_flags(id) & ADMIN_LEVEL_H)
        return PLUGIN_CONTINUE;
    
    set_user_flags(id, ADMIN_LEVEL_H);
    ExecuteForward(Forward_amxbans, iRet, id);
    set_dhudmessage(200, 100, 0, -1.0, 0.60, 0, 0.1, 5.0, 0.3, 0.5);
    show_dhudmessage(id,"Witaj!^nOtrzymales VIP-a za posiadanie konta steam! :)")
    return PLUGIN_CONTINUE;
}
 
Сообщения
49
Реакции
32
Сообщения
272
Реакции
14
Код:
#include <amxmodx>
#include <reapi>

new Forward_amxbans,iRet;

public plugin_init() {
    Forward_amxbans= CreateMultiForward("amxbans_admin_connect",ET_IGNORE,FP_CELL);
    register_clcmd("joinclass","event_jointeam");
}

public event_jointeam(id)
{
    if(!is_user_steam(id) || get_user_flags(id) & ADMIN_LEVEL_H)
        return PLUGIN_CONTINUE;
    
    set_user_flags(id, ADMIN_LEVEL_H);
    ExecuteForward(Forward_amxbans, iRet, id);
    set_dhudmessage(200, 100, 0, -1.0, 0.60, 0, 0.1, 5.0, 0.3, 0.5);
    show_dhudmessage(id,"Witaj!^n^nOtrzymales VIP-a za posiadanie konta steam! :)")
    return PLUGIN_CONTINUE;
}

stock bool:is_steam(id) {                                                                       
    server_cmd("dp_clientinfo %d", id);
    return get_pcvar_num(get_cvar_pointer ("dp_r_id_provider")) == 2 ? true : false;
}
??
 
Сообщения
101
Реакции
-11
Помог
2 раз(а)
@UrShade,Да я в курсах)))я просто указал на макрос, вот и вся проверка, которая вшита в реапи
 
Сообщения
49
Реакции
32
pmadisson75, use one. If you want to use the reapi module, then use native is_user_steam(id). If you do not include the reapi module, then use stock bool:is_steam(id)
 
Сообщения
272
Реакции
14
Код:
#include <amxmodx>
#include <reapi>

new Forward_amxbans,iRet;

public plugin_init() {
    Forward_amxbans= CreateMultiForward("amxbans_admin_connect",ET_IGNORE,FP_CELL);
    register_clcmd("joinclass","event_jointeam");
}

public event_jointeam(id)
{
    if(!is_user_steam(id) || get_user_flags(id) & ADMIN_LEVEL_H)
        return PLUGIN_CONTINUE;
    
    set_user_flags(id, ADMIN_LEVEL_H);
    ExecuteForward(Forward_amxbans, iRet, id);
    set_dhudmessage(200, 100, 0, -1.0, 0.60, 0, 0.1, 5.0, 0.3, 0.5);
    show_dhudmessage(id,"Witaj!^n^nOtrzymales VIP-a za posiadanie konta steam! :)")
    return PLUGIN_CONTINUE;
}

stock bool:is_user_steam(id) {                                                                       
    server_cmd("dp_clientinfo %d", id);
    return get_pcvar_num(get_cvar_pointer ("dp_r_id_provider")) == 2 ? true : false;
}
ok?
13 Окт 2022
......
 

Вложения

Сообщения
101
Реакции
-11
Помог
2 раз(а)
Код:
#include <amxmodx>
#include <reapi>

new Forward_amxbans,iRet;

public plugin_init() {
    Forward_amxbans= CreateMultiForward("amxbans_admin_connect",ET_IGNORE,FP_CELL);
    register_clcmd("joinclass","event_jointeam");
}

public event_jointeam(id)
{
    if(!is_user_steam(id) || get_user_flags(id) & ADMIN_LEVEL_H)
        return PLUGIN_CONTINUE;
    
    set_user_flags(id, ADMIN_LEVEL_H);
    ExecuteForward(Forward_amxbans, iRet, id);
    set_dhudmessage(200, 100, 0, -1.0, 0.60, 0, 0.1, 5.0, 0.3, 0.5);
    show_dhudmessage(id,"Witaj!^n^nOtrzymales VIP-a za posiadanie konta steam! :)")
    return PLUGIN_CONTINUE;
}
}
 
Сообщения
272
Реакции
14
where is checking if the player has steam?
14 Окт 2022
Код:
#include <amxmodx>

new Forward_amxbans,iRet;

public plugin_init() {
    Forward_amxbans= CreateMultiForward("amxbans_admin_connect",ET_IGNORE,FP_CELL);
    register_clcmd("joinclass","event_jointeam");
}

public event_jointeam(id)
{
    if(!is_steam(id) || get_user_flags(id) & ADMIN_LEVEL_H)
        return PLUGIN_CONTINUE;
    
    set_user_flags(id, ADMIN_LEVEL_H);
    ExecuteForward(Forward_amxbans, iRet, id);
    set_dhudmessage(200, 100, 0, -1.0, 0.60, 0, 0.1, 5.0, 0.3, 0.5);
    show_dhudmessage(id,"Witaj!^n^nOtrzymales VIP-a za posiadanie konta steam! :)")
    return PLUGIN_CONTINUE;
}

stock bool:is_steam(id) {                                                                       
    server_cmd("dp_clientinfo %d", id);
    return get_pcvar_num(get_cvar_pointer ("dp_r_id_provider")) == 2 ? true : false;
}
????
14 Окт 2022
It seems to work ... But why not every steam player gets a VIP? Only some. Earlier it was the same ...
 
Сообщения
272
Реакции
14
ok, but where is it to check if the player has steam?
14 Окт 2022
only steam players may have vip
14 Окт 2022
ok it works, but i don't know why half of the players don't get vip ...
 
Сообщения
272
Реакции
14
Unfortunately, not everyone gets a VIP. The plugin bypasses some steam players
 
Сообщения
49
Реакции
32
pmadisson75, try using first stock
Код:
stock bool:is_steam(id)
{
    new auth[65];
    get_user_authid(id,auth,64);
    if(contain(auth, "STEAM_0:0:") != -1 || contain(auth, "STEAM_0:1:") != -1)
        return true;
    return false;
}
 

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

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