AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help Edite Sma :( (https://forums.alliedmods.net/showthread.php?t=339637)

mohanad_2022 09-23-2022 12:19

Help Edite Sma :(
 
Hello Everyone

i have this sma which give a model for Special players

but when i add it to zp 4.3 fix6a mod , i find the admin and the player on the same skine of the defult one of the mod , not changed , except in case if i turned the player from zm or survivur or sniper to Human , in that case the player will get the skine which i choosed on the sma file

and when the new round starting , the skine back defult as the mod settings

so plz i hope one help me to fix that problem
i just want the skine of the player which i attack on the sma to be applied at the players when they join the server and when they be sniper or survivur and saved to every round and evry map , without resting

This addition gives those you want the look you want them to.. It is intended for boosters and high ranks or to give someone you are specializing in.

one last thing : if someone could link this sma with a cfg file , i will thank you so much , i tried but fail everytime


PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>

#define PLUGIN "Change models"
#define VERSION "1.1"
#define AUTHOR "NaDa"

new const g_szModels[][][] =
{
    {
"Player1""zp_Player1"},
    {
"Player2""zp_Player2"}
}

const 
g_iMaxModels sizeof g_szModels

new Trie:g_iModels

new g_szName[33][32]

public 
plugin_precache()
{
    new 
iszParam[32], szText[100]
    
    for(
0sizeof g_szModelsi++)
    {
        
formatex(szParamcharsmax(szParam), "%s"g_szModels[i][1])
        
formatex(szTextcharsmax(szText), "models/player/%s/%s.mdl"szParamszParam)
        
        
precache_model(szText)
    }
}

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""Fw_PlayerSpawn_Post"1)
    
    
g_iModels TrieCreate()
    
    for(new 
ig_iMaxModelsi++)
        
TrieSetString(g_iModelsg_szModels[i][0], g_szModels[i][1])
}

public 
client_putinserver(id)
{
    
get_user_name(idg_szName[id], 31)
}

public 
Fw_PlayerSpawn_Post(id)
{
    if(!
is_user_alive(id))
        return 
HAM_IGNORED
    
    update_model
(id)
    return 
HAM_IGNORED
}

public 
zp_user_humanized_post(id)
{
    
update_model(id)
}

update_model(id)
{
    new 
szModel[32]
    
    if(
TrieGetString(g_iModelsg_szName[id], szModelcharsmax(szModel)))
        
zp_override_user_model(idszModel)



Nutu_ 09-24-2022 10:51

Re: Help Edite Sma :(
 
you don't have to make more topics -> https://forums.alliedmods.net/showthread.php?t=339626
if someone knows how to help you, they will on your first topic


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

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