Raised This Month: $32 Target: $400
 8% 

Player model fix request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HundredEyes
Member
Join Date: Sep 2022
Old 12-04-2022 , 08:46   Player model fix request
Reply With Quote #1

Hello! I have this plugin and it change player model for those who become guardian. But it also change the other players model.

I have installed player model 1.3.1 (https://forums.alliedmods.net/showthread.php?t=106094) and this guardian plugin.

Example: there are 3 players, one from ct become guardian, one from terro become guardian. Third one from ct team get the same skin as guardians have. After third player dies, on the ground skin change to the one I set in player model 1.3.1 plugin. When he respawn, he get back guardian skin, even he is not guardian
Code:
 
#pragma semicolon 1

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN_NAME     "Guardian"
#define PLUGIN_VERSION      "1.43"
#define PLUGIN_AUTHOR       "XzaR"
#define PLUGIN_PREFIX       "[GN]:"

#define MAXPLAYERS      32
#define ADMIN_FLAG      ADMIN_CVAR

#define SPAWN_TIME      "5.0"
#define SPAWN_WEAPON        "weapon_mp5navy"
#define SPAWN_AMMO      "ammo_9mm"

#define TASK_RESPAWNING     333
#define TASK_LEADER     666

new g_msg_status_icon;
new g_msg_say_text;

new cvar_guardian;
new cvar_spawntime;
new cvar_weapon;
new cvar_ammo;

new g_ts_leader;
new g_ct_leader;

new bool:g_ts_leader_alive;
new bool:g_ct_leader_alive;

//---------------------------------------------------------------------

stock create_status_icon(id,status,sprite[],red,green,blue)
{
    message_begin(MSG_ONE,g_msg_status_icon,{0,0,0},id);
    write_byte(status);
    write_string(sprite);
    write_byte(red);
    write_byte(green);
    write_byte(blue);
    message_end();
}

stock client_cprint(id,type,text[],...)
{
    new text_buffer[255];
    vformat(text_buffer,254,text,4);

    replace_all(text_buffer,254,"\y","^1");
    replace_all(text_buffer,254,"\t","^3");
    replace_all(text_buffer,254,"\g","^4");

    message_begin(type,g_msg_say_text,{0,0,0},id);
    write_byte(id);
    write_string(text_buffer);
    message_end();
}

//---------------------------------------------------------------------

public plugin_init()
{
    //Plugin
    register_plugin(PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_AUTHOR);

    //Dictionaries
    register_dictionary("guardian.txt");

    //Cvars
    cvar_guardian = register_cvar("sv_guardian","1");
    cvar_spawntime = register_cvar("sv_ga_spawntime",SPAWN_TIME);
    cvar_weapon = register_cvar("sv_ga_weapon",SPAWN_WEAPON);
    cvar_ammo = register_cvar("sv_ga_ammo",SPAWN_AMMO);

    //Console Commands
    register_concmd("amx_guardian","handler_cmd",ADMIN_FLAG);
    register_concmd("amx_ga_spawntime","handler_cmd",ADMIN_FLAG);
    register_concmd("amx_ga_weapon","handler_cmd",ADMIN_FLAG);
    register_concmd("amx_ga_ammo","handler_cmd",ADMIN_FLAG);

    //Server Commands
    register_srvcmd("sv_guardian","handler_cmd",-1);
    register_srvcmd("sv_ga_spawntime","handler_cmd",-1);
    register_srvcmd("sv_ga_weapon","handler_cmd",-1);
    register_srvcmd("sv_ga_ammo","handler_cmd",-1);

    //Client Commands
    register_clcmd("say","handler_say",-1);
    register_clcmd("say_team","handler_say",-1);

    //Events
    register_event("HLTV","event_new_round","a", "1=0", "2=0");

    //Ham Events
    RegisterHam(Ham_Spawn,"player","event_player_spawn",1);
    RegisterHam(Ham_Killed,"player","event_player_killed",1);

    //User Messages
    g_msg_status_icon = get_user_msgid("StatusIcon");
    g_msg_say_text = get_user_msgid("SayText");
}

//---------------------------------------------------------------------

public plugin_precache()
{
    precache_model("models/player/modelname_ct/modelname_ct.mdl"); // Change the "modelname_ct";
    precache_model("models/player/modelname_t/modelname_t.mdl"); // Change the "modelname_t";
}

//---------------------------------------------------------------------

public random_leader_ts()
{
    new players[MAXPLAYERS],id;
    static num;
    new name_leader[32];
    new bool:found;

    get_players(players,num,"eh","TERRORIST");
    for(new i; i < num; i++)
    {
        if(!is_user_connected(players[i]) || players[i] == 0) continue;

        id = players[i];
        if((random_num(1,num) == num) && (id != g_ts_leader))
        {
            g_ts_leader = id;
            found = true;
            break;
        }
    }

    if(!found)
    {
        g_ts_leader = id;
    }

    if(g_ts_leader > 0)
    {
        g_ts_leader_alive = true;
        get_user_name(g_ts_leader,name_leader,31);
        //client_print(0,print_chat,"%s %L",PLUGIN_PREFIX,LANG_PLAYER,"HAS_BEEN_CHOSEN_TS",name_leader);
        client_cprint(g_ts_leader,MSG_ALL,"\y%s %L",PLUGIN_PREFIX,LANG_PLAYER,"HAS_BEEN_CHOSEN_TS",name_leader);
    }
}

public random_leader_ct()
{
    new players[MAXPLAYERS],id;
    static num;
    new name_leader[32];
    new bool:found;

    get_players(players,num,"eh","CT");
    for(new i; i < num; i++)
    {
        if(!is_user_connected(players[i]) || players[i] == 0) continue;

        id = players[i];
        if((random_num(1,num) == num) && (id != g_ct_leader))
        {
            g_ct_leader = id;
            found = true;
            break;
        }
    }

    if(!found)
    {
        g_ct_leader = id;
    }

    if(g_ct_leader > 0)
    {
        g_ct_leader_alive = true;
        get_user_name(g_ct_leader,name_leader,31);
        //client_print(0,print_chat,"%s %L",PLUGIN_PREFIX,LANG_PLAYER,"HAS_BEEN_CHOSEN_CT",name_leader);
        client_cprint(g_ct_leader,MSG_ALL,"\y%s %L",PLUGIN_PREFIX,LANG_PLAYER,"HAS_BEEN_CHOSEN_CT",name_leader);
    }
}

public delay_leader_ts(parm[1])
{
    create_status_icon(parm[0],1,"suit_full",255,0,0);
    set_user_rendering(parm[0],kRenderFxGlowShell,255,0,0,kRenderNormal,10);
    cs_set_user_model(parm[0], "modelname_t"); // Change the "modelname_t";
    leader_bonus(parm[0]);
}

public delay_leader_ct(parm[1])
{
    create_status_icon(parm[0],1,"suit_full",0,0,255);
    set_user_rendering(parm[0],kRenderFxGlowShell,0,0,255,kRenderNormal,10);
    cs_set_user_model(parm[0], "modelname_ct"); // Change the "modelname_ct";
    leader_bonus(parm[0]);
}

public leader_bonus(id)
{
    set_user_health(id,150);
    cs_set_user_armor (id,200,CsArmorType:2);
}

public respawn_player(parm[1])
{
    new bool:respawn = false;
    static weapon[32],ammo[16];
    get_pcvar_string(cvar_weapon,weapon,31);
    get_pcvar_string(cvar_ammo,ammo,15);

    if((g_ts_leader_alive) && (get_user_team(parm[0]) == 1))
    {
        respawn = true;
    }

    if((g_ct_leader_alive) && (get_user_team(parm[0]) == 2))
    {
        respawn = true;
    }

    if(respawn == true)
    {
        ExecuteHamB(Ham_CS_RoundRespawn,parm[0]);

        give_item(parm[0],weapon);
        give_item(parm[0],ammo);
        give_item(parm[0],ammo);
    }

    return PLUGIN_CONTINUE;
}

//---------------------------------------------------------------------

public client_disconnect(id)
{
    if(id == g_ts_leader) g_ts_leader_alive = false;
    if(id == g_ct_leader) g_ct_leader_alive = false;
}

public client_changeteam(id,newteam,oldteam)
{
    if((!is_user_alive(id)) || (oldteam != newteam))
    {
        if(id == g_ts_leader) g_ts_leader_alive = false;
        if(id == g_ct_leader) g_ct_leader_alive = false;
    }
}

//---------------------------------------------------------------------

public event_new_round()
{
    if((get_pcvar_num(cvar_guardian) != 1) || (get_playersnum() < 2)) return PLUGIN_CONTINUE;

    random_leader_ts();
    random_leader_ct();

    return PLUGIN_CONTINUE;
}

public event_player_spawn(id)
{
    if((get_pcvar_num(cvar_guardian) != 1) || (!is_user_alive(id))) return HAM_IGNORED;

    new bool:leader = false;
    if(g_ts_leader == id)
    {
        leader = true;
        static parm[1];
        parm[0] = id;

        set_task(0.5,"delay_leader_ts",TASK_LEADER + id,parm,1);
    }

    if(g_ct_leader == id)
    {
        leader = true;
        static parm[1];
        parm[0] = id;

        set_task(0.5,"delay_leader_ct",TASK_LEADER + id,parm,1);
    }

    if(!leader)
    {
        new CsArmorType:armortype;
        new armor = cs_get_user_armor(id,armortype);
        if(armor > 100)
        {
            if(cs_get_user_vip(id))
            {
                cs_set_user_armor(id,150,armortype);
            }
            else cs_set_user_armor(id,100,armortype);
        }

        set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,10);
    }

    if(task_exists(TASK_RESPAWNING + id,0))
    {
        remove_task(TASK_RESPAWNING + id,0);
    }

    return HAM_HANDLED;
}

//---------------------------------------------------------------------

public event_player_killed(id,killer,shouldgib)
{
    if((get_pcvar_num(cvar_guardian) != 1)) return HAM_IGNORED;

    new name[32];
    get_user_name(id,name,31);
    if(g_ts_leader == id)
    {
        g_ts_leader_alive = false;
        create_status_icon(id,0,"suit_full",255,0,0);

        set_hudmessage(255,0,0,-1.0,0.45,0,1.0,4.0,0.1,0.2,3);
        show_hudmessage (0,"%L",LANG_PLAYER,"TS_DEAD",name);

        //client_print(0,print_chat,"%s %L",PLUGIN_PREFIX,LANG_PLAYER,"TS_DEAD",name);
        client_cprint(g_ts_leader,MSG_ALL,"\y%s %L",PLUGIN_PREFIX,LANG_PLAYER,"COLOR_TS_DEAD",name);

        return HAM_HANDLED;
    }
    else if(g_ct_leader == id)
    {
        g_ct_leader_alive = false;
        create_status_icon(id,0,"suit_full",0,0,255);

        set_hudmessage(0,0,255,-1.0,0.45,0,1.0,4.0,0.1,0.2,3);
        show_hudmessage (0,"%L", LANG_PLAYER, "CT_DEAD",name);

        //client_print(0,print_chat,"%s %L",PLUGIN_PREFIX,LANG_PLAYER,"CT_DEAD",name);
        client_cprint(g_ct_leader,MSG_ALL,"\y%s %L",PLUGIN_PREFIX,LANG_PLAYER,"COLOR_CT_DEAD",name);

        return HAM_HANDLED;
    }

    static Float:spawntime,parm[1];
    spawntime = get_pcvar_float(cvar_spawntime);
    parm[0] = id;

    set_task(spawntime,"respawn_player",TASK_RESPAWNING + id,parm,1);

    new bool:respawn = false;
    if((g_ts_leader_alive) && (get_user_team(id) == 1))
    {
        respawn = true;
    }
    else if((g_ct_leader_alive) && (get_user_team(id) == 2))
    {
        respawn = true;
    }

    if(respawn)
    {
        set_hudmessage(255,255,255,-1.0,-1.0,2,1.0,(spawntime - 0.8),0.1,0.2,-1);
        show_hudmessage(id,"%L",id,"REVIVE");
    }

    return HAM_HANDLED;
}

//---------------------------------------------------------------------

public handler_cmd(id,level,cid)
{
    if (!cmd_access(id,level,cid,1))
    {
        return PLUGIN_HANDLED;
    }

    static cmd[32],arg1[32];
    read_argv(0,cmd,31);
    read_argv(1,arg1,31);

    if(equal(cmd,"sv_guardian") || equal(cmd,"amx_guardian"))
    {
        if(equal(arg1,"1"))
        {
            set_pcvar_num(cvar_guardian,1);
            set_cvar_num("sv_restartround",1);
        }
        else if(equal(arg1,"0"))
        {
            set_pcvar_num(cvar_guardian,0);
            set_cvar_num("sv_restartround",1);
        }
    }
    else if(equal(cmd,"sv_ga_spawntime") || equal(cmd,"amx_ga_spawntime"))
    {
        set_pcvar_float(cvar_spawntime,str_to_float(arg1));
    }
    else if(equal(cmd,"sv_ga_weapon") || equal(cmd,"amx_ga_weapon"))
    {
        set_pcvar_string(cvar_weapon,arg1);
    }
    else if(equal(cmd,"sv_ga_ammo") || equal(cmd,"amx_ga_ammo"))
    {
        set_pcvar_string(cvar_ammo,arg1);
    }

    return PLUGIN_HANDLED;
}

public handler_say(id)
{
    if(get_pcvar_num(cvar_guardian) != 1) return PLUGIN_CONTINUE;

    static said[32];
    read_args(said,31);
    remove_quotes(said);

    if(equal(said,"/guardian") || equal(said,"/guardians"))
    {
        static name_ts[32],name_ct[32];
        get_user_name(g_ts_leader,name_ts,31);
        get_user_name(g_ct_leader,name_ct,31);

        client_cprint(id,MSG_ONE,"\y%s %L",PLUGIN_PREFIX,id,"IS_GUARDIAN_TS",name_ts);
        client_cprint(id,MSG_ONE,"\y%s %L",PLUGIN_PREFIX,id,"IS_GUARDIAN_CT",name_ct);
    }

    return PLUGIN_CONTINUE;
}

Last edited by HundredEyes; 12-04-2022 at 14:41.
HundredEyes is offline
TribalBlood
Member
Join Date: Oct 2020
Old 12-07-2022 , 21:14   Re: Player model fix request
Reply With Quote #2

Try it.
Attached Files
File Type: txt guardian_remake.txt (172 Bytes, 29 views)
File Type: sma Get Plugin or Get Source (Guardian_Remake.sma - 60 views - 10.2 KB)
__________________
My Steam Profile

- Online Rarely -

Last edited by TribalBlood; 12-07-2022 at 21:21.
TribalBlood is offline
HundredEyes
Member
Join Date: Sep 2022
Old 12-08-2022 , 18:18   Re: Player model fix request
Reply With Quote #3

Plugin compiled, running but doesn't work. I mean it doesn't apply stats/skin or announce the event.
I saw glow of the enemy when I was near him, but for 2 seconds, then dissapeared.
HundredEyes is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 12-08-2022 , 18:25   Re: Player model fix request
Reply With Quote #4

Quote:
Originally Posted by HundredEyes View Post
Plugin compiled, running but doesn't work. I mean it doesn't apply stats/skin or announce the event.
I saw glow of the enemy when I was near him, but for 2 seconds, then dissapeared.
Why dont you test this plugin by OciXcrom? it lets you select a custom skin for an individual player even if you change team, you can maintain a skin from the other team ( in the beginning you only can select your team skins, but if you change to the other team, the skin can prevail)

If you don't know how to add them i can upload a folder with an example on how to make it work!

HTML Code:
#include <amxmodx>
#include <cromchat>
#include <cstrike>
#include <hamsandwich>

#if !defined MAX_PLAYERS
const MAX_PLAYERS = 32
#endif

enum _:ModelInfo
{
    Name[32],
    CsTeams:Team,
}

new const g_eModels[][ModelInfo] =
{
    { "m_arctic",   CS_TEAM_T },
    { "m_guerilla",  CS_TEAM_T },
    { "m_leet",   CS_TEAM_T },
    { "m_terror",  CS_TEAM_T },
    { "m_militia",  CS_TEAM_T },
    { "m_gign",   CS_TEAM_CT },
    { "m_gsg9",  CS_TEAM_CT },
    { "m_sas",   CS_TEAM_CT },
    { "m_spetsnaz",  CS_TEAM_CT },
    { "m_urban",  CS_TEAM_CT }
}

const INVALID_SKIN = -1
const MENU_ACCESS_FLAG = ADMIN_LEVEL_H
const Float:CONNECT_MSG_DELAY = 5.0

new g_iModel[MAX_PLAYERS + 1][CsTeams]

public plugin_init()
{
    register_plugin("Models Menu", "1.0", "OciXCrom")
    RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)

    register_clcmd("say /model", "Cmd_VipSkin")
    register_clcmd("say_team /model", "Cmd_VipSkin")

    CC_SetPrefix("&x04[Server]")
}

public plugin_precache()
{
    for(new i; i < sizeof(g_eModels); i++)
    {
        precache_player_model(g_eModels[i][Name])
    }
}

public client_putinserver(id)
{
    for(new CsTeams:iTeam = CS_TEAM_UNASSIGNED; iTeam <= CS_TEAM_SPECTATOR; iTeam++)
    {
        g_iModel[id][iTeam] = INVALID_SKIN
    }

    set_task(CONNECT_MSG_DELAY, "DisplayMessage", id)
}

public DisplayMessage(id)
{
    if(is_user_connected(id) && has_menu_access(id))
    {
        CC_SendMessage(id, "Type &x03/model &x01to open the &x04Player Model Menu")
    }
}

public OnPlayerSpawn(id)
{
    if(!is_user_alive(id))
    {
        return
    }

    new iModel = g_iModel[id][cs_get_user_team(id)]

    if(iModel == INVALID_SKIN)
    {
        return
    }

    cs_set_user_model(id, g_eModels[iModel][Name])
}

public Cmd_VipSkin(id)
{
    if(!has_menu_access(id))
    {
        CC_SendMessage(id, "Only admins can open this menu.")
        return PLUGIN_HANDLED
    }

    new iMenu = menu_create("Select Your Skin", "VipSkin_Handler")

    for(new CsTeams:iTeam = cs_get_user_team(id), szNum[5], i; i < sizeof(g_eModels); i++)
    {
        if(g_eModels[i][Team] == iTeam)
        {
            num_to_str(i, szNum, charsmax(szNum))
            menu_additem(iMenu, g_eModels[i][Name], szNum)
        }
    }

    menu_display(id, iMenu)
    return PLUGIN_HANDLED
}

public VipSkin_Handler(id, iMenu, iItem)
{
    if(!has_menu_access(id))
    {
        goto @destroy
    }

    static _unused[1]

    new szModelId[5]
    menu_item_getinfo(iMenu, iItem, _unused[0], szModelId, charsmax(szModelId), _unused, charsmax(_unused), _unused[0])

    new iModel = str_to_num(szModelId)
    new CsTeams:iTeam = cs_get_user_team(id)

    if(g_eModels[iModel][Team] != iTeam)
    {
        goto @destroy
    }

    g_iModel[id][iTeam] = iModel
    CC_SendMessage(id, "You have selected the skin &x04%s", g_eModels[iModel][Name])

    if(is_user_alive(id))
    {
        cs_set_user_model(id, g_eModels[iModel][Name])
    }

    @destroy:
    menu_destroy(iMenu)
    return PLUGIN_HANDLED
}

bool:has_menu_access(id)
{
    return (get_user_flags(id) & MENU_ACCESS_FLAG) != 0
}

precache_player_model(const szModel[], &id = 0)
{
    new model[128]
    formatex(model, charsmax(model), "models/player/%s/%sT.mdl", szModel, szModel)

    if(file_exists(model))
        id = precache_generic(model)

    static const extension[] = "T.mdl"
    #pragma unused extension

    copy(model[strlen(model) - charsmax(extension)], charsmax(model), ".mdl")
    return precache_model(model)
} 
Edit: realized is not what you requested, but still .

Last edited by Ark_Procession; 12-08-2022 at 18:28. Reason: oops
Ark_Procession is offline
HundredEyes
Member
Join Date: Sep 2022
Old 12-09-2022 , 07:48   Re: Player model fix request
Reply With Quote #5

Quote:
Originally Posted by Ark_Procession View Post
Why dont you test this plugin by OciXcrom? it lets you select a custom skin for an individual player even if you change team, you can maintain a skin from the other team ( in the beginning you only can select your team skins, but if you change to the other team, the skin can prevail)

If you don't know how to add them i can upload a folder with an example on how to make it work!

HTML Code:
#include <amxmodx>
#include <cromchat>
#include <cstrike>
#include <hamsandwich>

#if !defined MAX_PLAYERS
const MAX_PLAYERS = 32
#endif

enum _:ModelInfo
{
    Name[32],
    CsTeams:Team,
}

new const g_eModels[][ModelInfo] =
{
    { "m_arctic",   CS_TEAM_T },
    { "m_guerilla",  CS_TEAM_T },
    { "m_leet",   CS_TEAM_T },
    { "m_terror",  CS_TEAM_T },
    { "m_militia",  CS_TEAM_T },
    { "m_gign",   CS_TEAM_CT },
    { "m_gsg9",  CS_TEAM_CT },
    { "m_sas",   CS_TEAM_CT },
    { "m_spetsnaz",  CS_TEAM_CT },
    { "m_urban",  CS_TEAM_CT }
}

const INVALID_SKIN = -1
const MENU_ACCESS_FLAG = ADMIN_LEVEL_H
const Float:CONNECT_MSG_DELAY = 5.0

new g_iModel[MAX_PLAYERS + 1][CsTeams]

public plugin_init()
{
    register_plugin("Models Menu", "1.0", "OciXCrom")
    RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)

    register_clcmd("say /model", "Cmd_VipSkin")
    register_clcmd("say_team /model", "Cmd_VipSkin")

    CC_SetPrefix("&x04[Server]")
}

public plugin_precache()
{
    for(new i; i < sizeof(g_eModels); i++)
    {
        precache_player_model(g_eModels[i][Name])
    }
}

public client_putinserver(id)
{
    for(new CsTeams:iTeam = CS_TEAM_UNASSIGNED; iTeam <= CS_TEAM_SPECTATOR; iTeam++)
    {
        g_iModel[id][iTeam] = INVALID_SKIN
    }

    set_task(CONNECT_MSG_DELAY, "DisplayMessage", id)
}

public DisplayMessage(id)
{
    if(is_user_connected(id) && has_menu_access(id))
    {
        CC_SendMessage(id, "Type &x03/model &x01to open the &x04Player Model Menu")
    }
}

public OnPlayerSpawn(id)
{
    if(!is_user_alive(id))
    {
        return
    }

    new iModel = g_iModel[id][cs_get_user_team(id)]

    if(iModel == INVALID_SKIN)
    {
        return
    }

    cs_set_user_model(id, g_eModels[iModel][Name])
}

public Cmd_VipSkin(id)
{
    if(!has_menu_access(id))
    {
        CC_SendMessage(id, "Only admins can open this menu.")
        return PLUGIN_HANDLED
    }

    new iMenu = menu_create("Select Your Skin", "VipSkin_Handler")

    for(new CsTeams:iTeam = cs_get_user_team(id), szNum[5], i; i < sizeof(g_eModels); i++)
    {
        if(g_eModels[i][Team] == iTeam)
        {
            num_to_str(i, szNum, charsmax(szNum))
            menu_additem(iMenu, g_eModels[i][Name], szNum)
        }
    }

    menu_display(id, iMenu)
    return PLUGIN_HANDLED
}

public VipSkin_Handler(id, iMenu, iItem)
{
    if(!has_menu_access(id))
    {
        goto @destroy
    }

    static _unused[1]

    new szModelId[5]
    menu_item_getinfo(iMenu, iItem, _unused[0], szModelId, charsmax(szModelId), _unused, charsmax(_unused), _unused[0])

    new iModel = str_to_num(szModelId)
    new CsTeams:iTeam = cs_get_user_team(id)

    if(g_eModels[iModel][Team] != iTeam)
    {
        goto @destroy
    }

    g_iModel[id][iTeam] = iModel
    CC_SendMessage(id, "You have selected the skin &x04%s", g_eModels[iModel][Name])

    if(is_user_alive(id))
    {
        cs_set_user_model(id, g_eModels[iModel][Name])
    }

    @destroy:
    menu_destroy(iMenu)
    return PLUGIN_HANDLED
}

bool:has_menu_access(id)
{
    return (get_user_flags(id) & MENU_ACCESS_FLAG) != 0
}

precache_player_model(const szModel[], &id = 0)
{
    new model[128]
    formatex(model, charsmax(model), "models/player/%s/%sT.mdl", szModel, szModel)

    if(file_exists(model))
        id = precache_generic(model)

    static const extension[] = "T.mdl"
    #pragma unused extension

    copy(model[strlen(model) - charsmax(extension)], charsmax(model), ".mdl")
    return precache_model(model)
} 
Edit: realized is not what you requested, but still .
I can try to combine this one with OcixCrom plugin, maybe I won't get this problem anymore. Thanks!
HundredEyes is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode