AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Help add model by steam id (https://forums.alliedmods.net/showthread.php?t=322415)

strigl10 03-26-2020 14:39

Help add model by steam id
 
With this code I can make every admin have a specific model, what I'm looking for is that it be by steam id nothing else, could anybody modify it?
Thank you!


Quote:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

#define FLAG ADMIN_CHAT

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

RegisterHam(Ham_Spawn,"player","FnHamSpawn",1 )
}

public plugin_precache()
{
precache_model("models/player/ALILP-VIPT/ALILP-VIPT.mdl")
precache_model("models/player/ALILP-VIP/ALILP-VIP.mdl")
}

public FnHamSpawn(id)
{
if(is_user_alive(id))
{
if(get_user_flags(id) & FLAG)
{
if(cs_get_user_team(id) == CS_TEAM_CT)
{
cs_set_user_model(id,"ALILP-VIP")
}
else
{
cs_set_user_model(id,"ALILP-VIPT")
}
}
}
}

Nutu_ 03-26-2020 14:55

Re: Help add model by steam id
 
this plugin sets the model for people with flag 'i', if you want to put models on a steam id, ip, nick use this plugin -> https://forums.alliedmods.net/showthread.php?t=21086

strigl10 03-26-2020 15:04

Re: Help add model by steam id
 
Quote:

Originally Posted by Nutu_ (Post 2688682)
this plugin sets the model for people with flag 'i', if you want to put models on a steam id, ip, nick use this plugin -> https://forums.alliedmods.net/showthread.php?t=21086

Thanks for the reply.
I have seen that code, I tried to use it but I cannot understand it :/

Nutu_ 03-26-2020 15:55

Re: Help add model by steam id
 
what exactly don't you understand mate?

strigl10 03-26-2020 16:07

Re: Help add model by steam id
 
sincerely ? everything..
I get an idea to modify a line, but already add or completely modify a function :(

Nutu_ 03-26-2020 16:18

Re: Help add model by steam id
 
you dont have to modify anything, just install the plugin as it is and add models in models.ini
read the whole post and you'll get it

Napoleon_be 03-26-2020 19:11

Re: Help add model by steam id
 
Just modify the steam id's

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new const szAuthids[][] =
{
    
"STEAM:0:00000000",
    
"STEAM:0:00000000"
}

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn,"player","FnHamSpawn",)
}

public 
plugin_precache()
{
    
precache_model("models/player/ALILP-VIPT/ALILP-VIPT.mdl")
    
precache_model("models/player/ALILP-VIP/ALILP-VIP.mdl")
}

public 
FnHamSpawn(id)
{
    if(
is_user_alive(id))
    {
        new 
szAuthid[35];
        
get_user_authid(idszAuthidcharsmax(szAuthid));
        
        for(new 
isizeof(szAuthids); i++)
        {
            if(
equali(szAuthidszAuthids[i]))
            {
                if(
cs_get_user_team(id) == CS_TEAM_CT)
                {
                    
cs_set_user_model(id,"ALILP-VIP")
                }
                else
                {
                
cs_set_user_model(id,"ALILP-VIPT")
                }
            }
        }    
    }



strigl10 03-26-2020 19:22

Re: Help add model by steam id
 
explains how to install it but does not explain how to pre-cache, how it does it .. what model it takes and where it should go or I don't understand what "% st" means

fysiks 03-26-2020 23:06

Re: Help add model by steam id
 
https://forums.alliedmods.net/showthread.php?t=106094

strigl10 03-26-2020 23:37

Re: Help add model by steam id
 
Quote:

Originally Posted by strigl10 (Post 2688727)
explains how to install it but does not explain how to pre-cache, how it does it .. what model it takes and where it should go or I don't understand what "% st" means

Hi, could it be that I only see myself with the model?
I am looking for a plugin where everyone sees me with the model


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

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