Author
|
Message
|
Member
Join Date: Jan 2022
Location: Palestine
|

09-23-2022
, 12:19
Help Edite Sma :(
|
#1
|
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 i, szParam[32], szText[100]
for(i = 0; i < sizeof g_szModels; i++)
{
formatex(szParam, charsmax(szParam), "%s", g_szModels[i][1])
formatex(szText, charsmax(szText), "models/player/%s/%s.mdl", szParam, szParam)
precache_model(szText)
}
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "Fw_PlayerSpawn_Post", 1)
g_iModels = TrieCreate()
for(new i; i < g_iMaxModels; i++)
TrieSetString(g_iModels, g_szModels[i][0], g_szModels[i][1])
}
public client_putinserver(id)
{
get_user_name(id, g_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_iModels, g_szName[id], szModel, charsmax(szModel)))
zp_override_user_model(id, szModel)
}
|
|
|
|