Enda servus vip skinni mure !
Lehekülg 1, lehekülgi kokku 1 • Share
- TfexTVJuunior
- Liitus : 15/12/2015
Postitusi : 48
Tere mul väike küsimus tõmmbasin netist omale troll face skinni aga mai sa aru miks see ei tööta nagu ei näita skinni ma tean nii palju et troll face skin vaja panna cstrike - models - player - vip kausta aga edasi mai oska miks see skin ei näida või ei tööta aitäh abi eest kui saade aitada!
siin on link ----- http://cs.gamebanana.com/skins/131711
siin on link ----- http://cs.gamebanana.com/skins/131711
- Tonight
- Liitus : 19/02/2012
Postitusi : 18000
Serveris? http://www.faval.eu/t1646-vip-skin
- TfexTVJuunior
- Liitus : 15/12/2015
Postitusi : 48
Nii aga mul kaks küsimust - 1. See link mis saatsid mai sa aru mis kood se on selline ja kuhu peab seda panema ja mille asmele. -
2. Kas netis olev skin troll face nagu teistes eesti servutes on olnud troll face skin ei sa oma servule panna või saab ?
Tonight küsimus Serveris? : Jah serveris.
2. Kas netis olev skin troll face nagu teistes eesti servutes on olnud troll face skin ei sa oma servule panna või saab ?
Tonight küsimus Serveris? : Jah serveris.
- fURXER
- Liitus : 29/10/2012
Postitusi : 934
Saab kyll lihtsalt pead tegema selleks vajaliku plugina.
- TfexTVJuunior
- Liitus : 15/12/2015
Postitusi : 48
Nii mis valjaliku plugina ?
- Tonight
- Liitus : 19/02/2012
Postitusi : 18000
Kõige parem võimalus (aga mitte kõige lihtsam):
players_models.sma
players_models.ini
----------------------------------
Esiteks peame muutma su Mr. Trollmani nime ja asukohta, sest serverisse pannes ei tohi see olla vip.mdl. Tõmba siit uuesti see sama model ja paigalda serverisse: https://www.dropbox.com/s/mumbb4y9d1ebtrr/troll.zip?dl=0
• Plugina paigaldamine:
○ Aseta players_models.amxx addons\amxmodx\plugins kausta
○ Aseta players_models.sma addons\amxmodx\scripting kausta
○ Aseta players_models.ini addons\amxmodx\configs kausta
○ Ava plugins.ini (addons\amxmodx\configs) ja kirjuta sinna players_models.amxx
Tõmba plugin siit:
players_models.sma
- Kood:
#include <amxmodx>
#include <fakemeta>
#define VERSION "1.3.1"
#define SetUserModeled(%1) g_bModeled |= 1<<(%1 & 31)
#define SetUserNotModeled(%1) g_bModeled &= ~( 1<<(%1 & 31) )
#define IsUserModeled(%1) ( g_bModeled & 1<<(%1 & 31) )
#define SetUserConnected(%1) g_bConnected |= 1<<(%1 & 31)
#define SetUserNotConnected(%1) g_bConnected &= ~( 1<<(%1 & 31) )
#define IsUserConnected(%1) ( g_bConnected & 1<<(%1 & 31) )
#define MAX_MODEL_LENGTH 16
#define MAX_AUTHID_LENGTH 25
#define MAX_PLAYERS 32
#define ClCorpse_ModelName 1
#define ClCorpse_PlayerID 12
#define m_iTeam 114
#define g_ulModelIndexPlayer 491
#define fm_cs_get_user_team_index(%1) get_pdata_int(%1, m_iTeam)
new const MODEL[] = "model";
new g_bModeled;
new g_szCurrentModel[MAX_PLAYERS+1][MAX_MODEL_LENGTH];
new Trie:g_tTeamModels[2];
new Trie:g_tModelIndexes;
new Trie:g_tDefaultModels;
new g_szAuthid[MAX_PLAYERS+1][MAX_AUTHID_LENGTH];
new g_bPersonalModel[MAX_PLAYERS+1];
new g_bConnected;
public plugin_init()
{
register_plugin("Players Models", VERSION, "ConnorMcLeod");
register_forward(FM_SetClientKeyValue, "SetClientKeyValue");
register_message(get_user_msgid("ClCorpse"), "Message_ClCorpse");
}
public plugin_precache()
{
new szConfigFile[128];
get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile));
format(szConfigFile, charsmax(szConfigFile), "%s/players_models.ini", szConfigFile);
new iFile = fopen(szConfigFile, "rt");
if( iFile )
{
new const szDefaultModels[][] = {"", "urban", "terror", "leet", "arctic", "gsg9",
"gign", "sas", "guerilla", "vip", "militia", "spetsnaz" };
g_tDefaultModels = TrieCreate();
for(new i=1; i<sizeof(szDefaultModels); i++)
{
TrieSetCell(g_tDefaultModels, szDefaultModels[i], i);
}
g_tModelIndexes = TrieCreate();
g_tTeamModels[0] = TrieCreate();
g_tTeamModels[1] = TrieCreate();
new szDatas[70], szRest[40], szKey[MAX_AUTHID_LENGTH], szModel1[MAX_MODEL_LENGTH], szModel2[MAX_MODEL_LENGTH];
while( !feof(iFile) )
{
fgets(iFile, szDatas, charsmax(szDatas));
trim(szDatas);
if(!szDatas[0] || szDatas[0] == ';' || szDatas[0] == '#' || (szDatas[0] == '/' && szDatas[1] == '/'))
{
continue;
}
parse(szDatas, szKey, charsmax(szKey), szModel1, charsmax(szModel1), szModel2, charsmax(szModel2));
if( TrieKeyExists(g_tDefaultModels, szKey) )
{
if( szModel1[0] && !equal(szModel1, szKey) && PrecachePlayerModel(szModel1) )
{
TrieSetString(g_tDefaultModels, szKey, szModel1);
}
}
else if( equal(szKey, "STEAM_", 6) || equal(szKey, "BOT") )
{
parse(szRest, szModel1, charsmax(szModel1), szModel2, charsmax(szModel2));
if( szModel1[0] && PrecachePlayerModel(szModel1) )
{
TrieSetString(g_tTeamModels[1], szKey, szModel1);
}
if( szModel2[0] && PrecachePlayerModel(szModel2) )
{
TrieSetString(g_tTeamModels[0], szKey, szModel2);
}
}
}
fclose( iFile );
}
}
PrecachePlayerModel( const szModel[] )
{
if( TrieKeyExists(g_tModelIndexes, szModel) )
{
return 1;
}
new szFileToPrecache[64];
formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%s.mdl", szModel, szModel);
if( !file_exists( szFileToPrecache ) && !TrieKeyExists(g_tDefaultModels, szModel) )
{
return 0;
}
TrieSetCell(g_tModelIndexes, szModel, precache_model(szFileToPrecache));
formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%st.mdl", szModel, szModel);
if( file_exists( szFileToPrecache ) )
{
precache_model(szFileToPrecache);
return 1;
}
formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%sT.mdl", szModel, szModel);
if( file_exists( szFileToPrecache ) )
{
precache_model(szFileToPrecache);
return 1;
}
return 1;
}
public plugin_end()
{
TrieDestroy(g_tTeamModels[0]);
TrieDestroy(g_tTeamModels[1]);
TrieDestroy(g_tModelIndexes);
TrieDestroy(g_tDefaultModels);
}
public client_authorized( id )
{
get_user_authid(id, g_szAuthid[id], MAX_AUTHID_LENGTH-1);
for(new i=1; i<=2; i++)
{
if( TrieKeyExists(g_tTeamModels[2-i], g_szAuthid[id]) )
{
g_bPersonalModel[id] |= i;
}
else
{
g_bPersonalModel[id] &= ~i;
}
}
}
public client_putinserver(id)
{
if( !is_user_hltv(id) )
{
SetUserConnected(id);
}
}
public client_disconnect(id)
{
g_bPersonalModel[id] = 0;
SetUserNotModeled(id);
SetUserNotConnected(id);
}
public SetClientKeyValue(id, const szInfoBuffer[], const szKey[], const szValue[])
{
if( equal(szKey, MODEL) && IsUserConnected(id) )
{
new iTeam = fm_cs_get_user_team_index(id);
if( 1 <= iTeam <= 2 )
{
new szSupposedModel[MAX_MODEL_LENGTH];
if( g_bPersonalModel[id] & iTeam )
{
TrieGetString(g_tTeamModels[2-iTeam], g_szAuthid[id], szSupposedModel, charsmax(szSupposedModel));
}
else
{
TrieGetString(g_tDefaultModels, szValue, szSupposedModel, charsmax(szSupposedModel));
}
if( szSupposedModel[0] )
{
if( !IsUserModeled(id)
|| !equal(g_szCurrentModel[id], szSupposedModel)
|| !equal(szValue, szSupposedModel) )
{
copy(g_szCurrentModel[id], MAX_MODEL_LENGTH-1, szSupposedModel);
SetUserModeled(id);
set_user_info(id, MODEL, szSupposedModel);
#if defined SET_MODELINDEX
new iModelIndex;
TrieGetCell(g_tModelIndexes, szSupposedModel, iModelIndex);
// set_pev(id, pev_modelindex, iModelIndex); // is this needed ?
set_pdata_int(id, g_ulModelIndexPlayer, iModelIndex);
#endif
return FMRES_SUPERCEDE;
}
}
if( IsUserModeled(id) )
{
SetUserNotModeled(id);
g_szCurrentModel[id][0] = 0;
}
}
}
return FMRES_IGNORED;
}
public Message_ClCorpse()
{
new id = get_msg_arg_int(ClCorpse_PlayerID);
if( IsUserModeled(id) )
{
set_msg_arg_string(ClCorpse_ModelName, g_szCurrentModel[id]);
}
}
players_models.ini
- Kood:
"vip" "troll"
----------------------------------
Esiteks peame muutma su Mr. Trollmani nime ja asukohta, sest serverisse pannes ei tohi see olla vip.mdl. Tõmba siit uuesti see sama model ja paigalda serverisse: https://www.dropbox.com/s/mumbb4y9d1ebtrr/troll.zip?dl=0
• Plugina paigaldamine:
○ Aseta players_models.amxx addons\amxmodx\plugins kausta
○ Aseta players_models.sma addons\amxmodx\scripting kausta
○ Aseta players_models.ini addons\amxmodx\configs kausta
○ Ava plugins.ini (addons\amxmodx\configs) ja kirjuta sinna players_models.amxx
Tõmba plugin siit:
- Attachments
- TfexTVJuunior
- Liitus : 15/12/2015
Postitusi : 48
Kas seal pean selle koodi kopeerima players_models.sma asmele ?
- Tonight
- Liitus : 19/02/2012
Postitusi : 18000
Ei.TfexTV kirjutas:Kas seal pean selle koodi kopeerima players_models.sma asmele ?
- TfexTVJuunior
- Liitus : 15/12/2015
Postitusi : 48
Ei tea mul ikka mingi jama servu nüüd ei lahe käima ja konsoolis ütleb paar error mis failid on seal errorit mul mingi paska jama seal ei taha käima minna võtsin kõik skinni asjad maha ja läks tööle uuesti servu
- Lumistor
- Liitus : 02/04/2015
Postitusi : 2771
Mis Error?
- UskuMatuKomeet
- Liitus : 15/03/2013
Postitusi : 632
TfexTV kirjutas:Ei tea mul ikka mingi jama servu nüüd ei lahe käima ja konsoolis ütleb paar error mis failid on seal errorit mul mingi paska jama seal ei taha käima minna võtsin kõik skinni asjad maha ja läks tööle uuesti servu
@TfexTV Erroreid on vöimalik alati parandada, saada mulle log mis error on, ja aitan sul selle korda teha.
- TfexTVJuunior
- Liitus : 15/12/2015
Postitusi : 48
Se consoli serveri log väga pikk edasi ei vinna koppita aga midagi sellist
response: Discarded=1
./hlds_run: line 255: 2104 Segmentation fault $HL_CMD
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
Fri Jan 29 21:25:19 EET 2016: Server restart in 10 seconds
Console initialized.
Using breakpad crash handler
Setting breakpad minidump AppID = 10
Forcing breakpad minidump interfaces to load
dlopen failed trying to load:
/hosting/.steam/sdk32/steamclient.so
with error:
/hosting/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 17:45:07 Apr 25 2013 (6027)
STEAM Auth Server
Server IP address 94.23.29.129:27046
Metamod version 1.20 Copyright (c) 2001-2013 Will Day
Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `meta gpl' for details.
Version 0.9.391 Linux
[DPROTO]: Done.
AMX Mod X version 1.8.2 Copyright (c) 2004-2006 AMX Mod X Development Team
AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
This is free software and you are welcome to redistribute it under
certain conditions; type 'amxx gpl' for details.
stray key in process_key: item_getiteminfo 61
L 01/29/2016 - 21:25:29: -------- Mapchange to de_dust2 --------
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "Basic")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "Menus")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "ANTI-CRASH")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "vip.amxx")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "alt_end_round_sounds[old].amxx")
Uploading dump (in-process) [proxy '']
/tmp/dumps/crash_20160129212529_1.dmp
success = yes
response: Discarded=1
./hlds_run: line 255: 2109 Segmentation fault $HL_CMD
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
Fri Jan 29 21:25:29 EET 2016: Server restart in 10 seconds
response: Discarded=1
./hlds_run: line 255: 2104 Segmentation fault $HL_CMD
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
Fri Jan 29 21:25:19 EET 2016: Server restart in 10 seconds
Console initialized.
Using breakpad crash handler
Setting breakpad minidump AppID = 10
Forcing breakpad minidump interfaces to load
dlopen failed trying to load:
/hosting/.steam/sdk32/steamclient.so
with error:
/hosting/.steam/sdk32/steamclient.so: cannot open shared object file: No such file or directory
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 17:45:07 Apr 25 2013 (6027)
STEAM Auth Server
Server IP address 94.23.29.129:27046
Metamod version 1.20 Copyright (c) 2001-2013 Will Day
Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `meta gpl' for details.
Version 0.9.391 Linux
[DPROTO]: Done.
AMX Mod X version 1.8.2 Copyright (c) 2004-2006 AMX Mod X Development Team
AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
This is free software and you are welcome to redistribute it under
certain conditions; type 'amxx gpl' for details.
stray key in process_key: item_getiteminfo 61
L 01/29/2016 - 21:25:29: -------- Mapchange to de_dust2 --------
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "Basic")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "Menus")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "ANTI-CRASH")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "vip.amxx")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "alt_end_round_sounds[old].amxx")
Uploading dump (in-process) [proxy '']
/tmp/dumps/crash_20160129212529_1.dmp
success = yes
response: Discarded=1
./hlds_run: line 255: 2109 Segmentation fault $HL_CMD
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
Fri Jan 29 21:25:29 EET 2016: Server restart in 10 seconds
- TfexTVJuunior
- Liitus : 15/12/2015
Postitusi : 48
Need töötavad mis on errorit
L 01/29/2016 - 21:25:29: -------- Mapchange to de_dust2 --------
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "Basic")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "Menus")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "ANTI-CRASH")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "vip.amxx")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "alt_end_round_sounds[old].amxx")
aga servu lihtsalt kinni aga ei tea errorit pole skinni kohta leitud aga servu ei lähe just skinni pärasd tööle aga kui ära võttan skinni filed siis töötab
L 01/29/2016 - 21:25:29: -------- Mapchange to de_dust2 --------
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "Basic")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "Menus")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "ANTI-CRASH")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "vip.amxx")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "alt_end_round_sounds[old].amxx")
aga servu lihtsalt kinni aga ei tea errorit pole skinni kohta leitud aga servu ei lähe just skinni pärasd tööle aga kui ära võttan skinni filed siis töötab
- Tonight
- Liitus : 19/02/2012
Postitusi : 18000
Paigaldasid selle skinni ka ikka serverisse (mitte ainult plugina)?
- DateNJuunior
- Liitus : 14/01/2013
Postitusi : 44
L 01/29/2016 - 21:25:29: -------- Mapchange to de_dust2 --------
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "Basic")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "Menus")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "ANTI-CRASH")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "vip.amxx")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "alt_end_round_sounds[old].amxx")
Ta kuskile valesse kausta pannud pluginad :DDD
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "Basic")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "Menus")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "ANTI-CRASH")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "vip.amxx")
L 01/29/2016 - 21:25:29: [AMXX] Plugin file open error (plugin "alt_end_round_sounds[old].amxx")
Ta kuskile valesse kausta pannud pluginad :DDD
- TfexTVJuunior
- Liitus : 15/12/2015
Postitusi : 48
Kõik asjad Paigaldasi õigedele kohatadele Tonight
Daten Arvan pole nii rumal kui sa et paneks failid sinna
Daten Arvan pole nii rumal kui sa et paneks failid sinna
- Syntx.Juunior
- Liitus : 07/06/2015
Postitusi : 82
Tonight kirjutas:Kõige parem võimalus (aga mitte kõige lihtsam):
players_models.sma
- Kood:
#include <amxmodx>
#include <fakemeta>
#define VERSION "1.3.1"
#define SetUserModeled(%1) g_bModeled |= 1<<(%1 & 31)
#define SetUserNotModeled(%1) g_bModeled &= ~( 1<<(%1 & 31) )
#define IsUserModeled(%1) ( g_bModeled & 1<<(%1 & 31) )
#define SetUserConnected(%1) g_bConnected |= 1<<(%1 & 31)
#define SetUserNotConnected(%1) g_bConnected &= ~( 1<<(%1 & 31) )
#define IsUserConnected(%1) ( g_bConnected & 1<<(%1 & 31) )
#define MAX_MODEL_LENGTH 16
#define MAX_AUTHID_LENGTH 25
#define MAX_PLAYERS 32
#define ClCorpse_ModelName 1
#define ClCorpse_PlayerID 12
#define m_iTeam 114
#define g_ulModelIndexPlayer 491
#define fm_cs_get_user_team_index(%1) get_pdata_int(%1, m_iTeam)
new const MODEL[] = "model";
new g_bModeled;
new g_szCurrentModel[MAX_PLAYERS+1][MAX_MODEL_LENGTH];
new Trie:g_tTeamModels[2];
new Trie:g_tModelIndexes;
new Trie:g_tDefaultModels;
new g_szAuthid[MAX_PLAYERS+1][MAX_AUTHID_LENGTH];
new g_bPersonalModel[MAX_PLAYERS+1];
new g_bConnected;
public plugin_init()
{
register_plugin("Players Models", VERSION, "ConnorMcLeod");
register_forward(FM_SetClientKeyValue, "SetClientKeyValue");
register_message(get_user_msgid("ClCorpse"), "Message_ClCorpse");
}
public plugin_precache()
{
new szConfigFile[128];
get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile));
format(szConfigFile, charsmax(szConfigFile), "%s/players_models.ini", szConfigFile);
new iFile = fopen(szConfigFile, "rt");
if( iFile )
{
new const szDefaultModels[][] = {"", "urban", "terror", "leet", "arctic", "gsg9",
"gign", "sas", "guerilla", "vip", "militia", "spetsnaz" };
g_tDefaultModels = TrieCreate();
for(new i=1; i<sizeof(szDefaultModels); i++)
{
TrieSetCell(g_tDefaultModels, szDefaultModels[i], i);
}
g_tModelIndexes = TrieCreate();
g_tTeamModels[0] = TrieCreate();
g_tTeamModels[1] = TrieCreate();
new szDatas[70], szRest[40], szKey[MAX_AUTHID_LENGTH], szModel1[MAX_MODEL_LENGTH], szModel2[MAX_MODEL_LENGTH];
while( !feof(iFile) )
{
fgets(iFile, szDatas, charsmax(szDatas));
trim(szDatas);
if(!szDatas[0] || szDatas[0] == ';' || szDatas[0] == '#' || (szDatas[0] == '/' && szDatas[1] == '/'))
{
continue;
}
parse(szDatas, szKey, charsmax(szKey), szModel1, charsmax(szModel1), szModel2, charsmax(szModel2));
if( TrieKeyExists(g_tDefaultModels, szKey) )
{
if( szModel1[0] && !equal(szModel1, szKey) && PrecachePlayerModel(szModel1) )
{
TrieSetString(g_tDefaultModels, szKey, szModel1);
}
}
else if( equal(szKey, "STEAM_", 6) || equal(szKey, "BOT") )
{
parse(szRest, szModel1, charsmax(szModel1), szModel2, charsmax(szModel2));
if( szModel1[0] && PrecachePlayerModel(szModel1) )
{
TrieSetString(g_tTeamModels[1], szKey, szModel1);
}
if( szModel2[0] && PrecachePlayerModel(szModel2) )
{
TrieSetString(g_tTeamModels[0], szKey, szModel2);
}
}
}
fclose( iFile );
}
}
PrecachePlayerModel( const szModel[] )
{
if( TrieKeyExists(g_tModelIndexes, szModel) )
{
return 1;
}
new szFileToPrecache[64];
formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%s.mdl", szModel, szModel);
if( !file_exists( szFileToPrecache ) && !TrieKeyExists(g_tDefaultModels, szModel) )
{
return 0;
}
TrieSetCell(g_tModelIndexes, szModel, precache_model(szFileToPrecache));
formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%st.mdl", szModel, szModel);
if( file_exists( szFileToPrecache ) )
{
precache_model(szFileToPrecache);
return 1;
}
formatex(szFileToPrecache, charsmax(szFileToPrecache), "models/player/%s/%sT.mdl", szModel, szModel);
if( file_exists( szFileToPrecache ) )
{
precache_model(szFileToPrecache);
return 1;
}
return 1;
}
public plugin_end()
{
TrieDestroy(g_tTeamModels[0]);
TrieDestroy(g_tTeamModels[1]);
TrieDestroy(g_tModelIndexes);
TrieDestroy(g_tDefaultModels);
}
public client_authorized( id )
{
get_user_authid(id, g_szAuthid[id], MAX_AUTHID_LENGTH-1);
for(new i=1; i<=2; i++)
{
if( TrieKeyExists(g_tTeamModels[2-i], g_szAuthid[id]) )
{
g_bPersonalModel[id] |= i;
}
else
{
g_bPersonalModel[id] &= ~i;
}
}
}
public client_putinserver(id)
{
if( !is_user_hltv(id) )
{
SetUserConnected(id);
}
}
public client_disconnect(id)
{
g_bPersonalModel[id] = 0;
SetUserNotModeled(id);
SetUserNotConnected(id);
}
public SetClientKeyValue(id, const szInfoBuffer[], const szKey[], const szValue[])
{
if( equal(szKey, MODEL) && IsUserConnected(id) )
{
new iTeam = fm_cs_get_user_team_index(id);
if( 1 <= iTeam <= 2 )
{
new szSupposedModel[MAX_MODEL_LENGTH];
if( g_bPersonalModel[id] & iTeam )
{
TrieGetString(g_tTeamModels[2-iTeam], g_szAuthid[id], szSupposedModel, charsmax(szSupposedModel));
}
else
{
TrieGetString(g_tDefaultModels, szValue, szSupposedModel, charsmax(szSupposedModel));
}
if( szSupposedModel[0] )
{
if( !IsUserModeled(id)
|| !equal(g_szCurrentModel[id], szSupposedModel)
|| !equal(szValue, szSupposedModel) )
{
copy(g_szCurrentModel[id], MAX_MODEL_LENGTH-1, szSupposedModel);
SetUserModeled(id);
set_user_info(id, MODEL, szSupposedModel);
#if defined SET_MODELINDEX
new iModelIndex;
TrieGetCell(g_tModelIndexes, szSupposedModel, iModelIndex);
// set_pev(id, pev_modelindex, iModelIndex); // is this needed ?
set_pdata_int(id, g_ulModelIndexPlayer, iModelIndex);
#endif
return FMRES_SUPERCEDE;
}
}
if( IsUserModeled(id) )
{
SetUserNotModeled(id);
g_szCurrentModel[id][0] = 0;
}
}
}
return FMRES_IGNORED;
}
public Message_ClCorpse()
{
new id = get_msg_arg_int(ClCorpse_PlayerID);
if( IsUserModeled(id) )
{
set_msg_arg_string(ClCorpse_ModelName, g_szCurrentModel[id]);
}
}
players_models.ini
- Kood:
"vip" "troll"
----------------------------------
Esiteks peame muutma su Mr. Trollmani nime ja asukohta, sest serverisse pannes ei tohi see olla vip.mdl. Tõmba siit uuesti see sama model ja paigalda serverisse: https://www.dropbox.com/s/mumbb4y9d1ebtrr/troll.zip?dl=0
• Plugina paigaldamine:
○ Aseta players_models.amxx addons\amxmodx\plugins kausta
○ Aseta players_models.sma addons\amxmodx\scripting kausta
○ Aseta players_models.ini addons\amxmodx\configs kausta
○ Ava plugins.ini (addons\amxmodx\configs) ja kirjuta sinna players_models.amxx
Tõmba plugin siit:
Mul toimis ilusti. Ei oska öelda miks TfexTV´l ei toiminud.
Soovid vestluses osaleda?
Selleks logi sisse või tee endale kasutaja.
Lehekülg 1, lehekülgi kokku 1
Permissions in this forum:
Sa ei saa vastata siinsetele teemadele