Raised This Month: $46 Target: $400
 11% 

Help add model by steam id


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
strigl10
Junior Member
Join Date: Oct 2012
Old 03-26-2020 , 14:39   Help add model by steam id
Reply With Quote #1

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")
}
}
}
}
strigl10 is offline
Nutu_
Veteran Member
Join Date: Mar 2016
Location: Germany
Old 03-26-2020 , 14:55   Re: Help add model by steam id
Reply With Quote #2

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
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
strigl10
Junior Member
Join Date: Oct 2012
Old 03-26-2020 , 15:04   Re: Help add model by steam id
Reply With Quote #3

Quote:
Originally Posted by Nutu_ View Post
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 :/
strigl10 is offline
Nutu_
Veteran Member
Join Date: Mar 2016
Location: Germany
Old 03-26-2020 , 15:55   Re: Help add model by steam id
Reply With Quote #4

what exactly don't you understand mate?
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
strigl10
Junior Member
Join Date: Oct 2012
Old 03-26-2020 , 16:07   Re: Help add model by steam id
Reply With Quote #5

sincerely ? everything..
I get an idea to modify a line, but already add or completely modify a function
strigl10 is offline
Nutu_
Veteran Member
Join Date: Mar 2016
Location: Germany
Old 03-26-2020 , 16:18   Re: Help add model by steam id
Reply With Quote #6

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
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-26-2020 , 19:11   Re: Help add model by steam id
Reply With Quote #7

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")
                }
            }
        }    
    }

__________________


My Plugins:
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
strigl10
Junior Member
Join Date: Oct 2012
Old 03-26-2020 , 19:22   Re: Help add model by steam id
Reply With Quote #8

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
strigl10 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-26-2020 , 23:06   Re: Help add model by steam id
Reply With Quote #9

https://forums.alliedmods.net/showthread.php?t=106094
__________________
fysiks is offline
strigl10
Junior Member
Join Date: Oct 2012
Old 03-26-2020 , 23:37   Re: Help add model by steam id
Reply With Quote #10

Quote:
Originally Posted by strigl10 View Post
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
strigl10 is offline
Reply


Thread Tools
Display Modes

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 04:00.


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