Page 1 of 1
SZ_GetSpace
Posted: 2011 Jun 09 14:07
by KamiN
Ismetineja zaidejus is serverio del Reliable channel overflow. Konsolei rodo va taip
Pluginu sarasas
; AMX Mod X plugins
; Admin Base - Always one has to be activated
amxbans.amxx
admin_amxbans.amxx
;admin.amxx ; admin base (required for any admin-related)
;admin_sql.amxx ; admin base - SQL version (comment admin.amxx)
; Basic
admincmd.amxx ; basic admin console commands
adminhelp.amxx ; help command for admin console commands
adminslots.amxx ; slot reservation
multilingual.amxx ; Multi-Lingual management
; Menus
menufront.amxx ; front-end for admin menus
cmdmenu.amxx ; command menu (speech, settings)
plmenu.amxx ; players menu (kick, ban, client cmds.)
;telemenu.amxx ; teleport menu (Fun Module required!)
mapsmenu.amxx ; maps menu (vote, changelevel)
pluginmenu.amxx ; Menus for commands/cvars organized by plugin
; Chat / Messages
adminchat.amxx ; console chat commands
antiflood.amxx ; prevent clients from chat-flooding the server
scrollmsg.amxx ; displays a scrolling message
imessage.amxx ; displays information messages
adminvote.amxx ; vote commands
; Map related
;nextmap.amxx ; displays next map in mapcycle
;mapchooser.amxx ; allows to vote for next map
timeleft.amxx ; displays time left on map
; Configuration
pausecfg.amxx ; allows to pause and unpause some plugins
statscfg.amxx ; allows to manage stats plugins via menu and commands
; Counter-Strike
;restmenu.amxx ; restrict weapons menu
;statsx.amxx ; stats on death or round end (CSX Module required!)
;miscstats.amxx ; bunch of events announcement for Counter-Strike
;stats_logging.amxx ; weapons stats logging (CSX Module required!)
; Enable to use AMX Mod plugins
;amxmod_compat.amxx ; AMX Mod backwards compatibility layer
; Custom - Add 3rd party plugins here
jailbreak_manager_en.amxx debug
jb_days_lr.amxx
admin_gag.amxx
modelchanger.amxx
amx_ssban.amxx
swear_repl.amxx
galileo.amxx
antijt.amxx
jb_box.amxx
cautobuy_bugfix.amxx
jb_vip_fixed.amxx
hpk.amxx
allchat.amxx
ad_manager.amxx
bind.amxx
multijump_v1.amxx
xredirect.amxx
Voices_Management.amxx
motdvip.amxx
vip_check.amxx
47protowarn.amxx
amx_demorecorder.amxx
motdslot.amxx
Atrodo, kai nebudavo jb_days_lr.amxx viskas veike normaliai, bet tai kas jame gal but blogai?
http://ikelk.lt/items/iDYiXxTvYM
Re: SZ_GetSpace
Posted: 2011 Jun 09 14:28
by aurimasko
nežinau lyg tais šitaip daro, dėl per didelio srauto serveriui iš žaidėjų ar atvirkščiai. tai gali būti dėl modeliu keitimo pvz.
Re: SZ_GetSpace
Posted: 2011 Jun 09 22:45
by KamiN
Atrodo taip ir yra, kad del tu modeliu keitimu.
Turiu 2 serverius. Pirmame serveryje modeliai yra keiciami tik VIP ir tik po 1 varianta CT arba T komandoms, nusiskundimu, kad ismetinetu is serverio del reliable channel overflow negavau. Antrame serveryje keicia modelius visiems zaidejams, ct komandai vienas variantas, o teroristu 3 variantai. Kaip ir matosi nuotraukoje tampaciam zaidejui metamas sz_getspace erroras 3 ar 4 kartus ir poto iskickina is serverio del to reliable channel overflow. Tai palikau, kad keistu tik po 1 varianta tiek ct tiek teroristu komandai ir ziuresiu kas bus.
Nes be modeliu dabar jau nebetas zaidimas ;D
Re: SZ_GetSpace
Posted: 2011 Jun 10 08:44
by aurimasko
kažkurioje temoje aaarnas buvo įdėjęs linką kuriame yra kažkas paaiškinta kaip padaryti tą veluojantį skinų keitimą, kai kai kuriems pakeičia skiną sekunde ar mažiau vėliau, ir taip mažiau resursų sunaudoja vienu metu. tik nežinau ar tai padėtų.
Re: SZ_GetSpace
Posted: 2011 Jun 10 09:09
by KamiN
Bendroj sumoj kazkaip taip turetu buti jei ir ct ir teram keist modelius?
Code: Select all
#include <amxmodx>#include <fakemeta>#include <hamsandwich>#include <cstrike> new const CT_MODEL[] = "ctmodel" // The model we're gonna use for ctnew const T_MODEL[] = "tmodel" // terrorist modelis#define MODELSET_TASK 100 // an offset for our models task#define MODELCHANGE_DELAY 0.5 // delay between model changesnew Float:g_models_targettime // target time for the last model changenew Float:g_roundstarttime // last round start time new g_has_custom_model[33] // whether the player is using a custom modelnew g_player_model[33][32] // player's model name (string)new g_ctmdl[33] // whether the player is a ctnew g_tmdl[33] // ar teras /*================================================================================ [Plugin Start]=================================================================================*/ public plugin_precache(){ new modelpath[100] formatex( modelpath, charsmax( modelpath ), "models/player/%s/%s.mdl", CT_MODEL, CT_MODEL ) engfunc( EngFunc_PrecacheModel, modelpath ) formatex( modelpath, charsmax( modelpath ), "models/player/%s/%s.mdl", T_MODEL, T_MODEL ) engfunc( EngFunc_PrecacheModel, modelpath )} public plugin_init(){ register_plugin( "Model changer", "0.3", "MeRcyLeZZ" ) register_event( "HLTV", "event_round_start", "a", "1=0", "2=0" ) RegisterHam( Ham_Spawn, "player", "fw_PlayerSpawn", 1 ) register_forward( FM_SetClientKeyValue, "fw_SetClientKeyValue" ) register_forward( FM_ClientUserInfoChanged, "fw_ClientUserInfoChanged" )} /*================================================================================ [Round Start Event]=================================================================================*/ public event_round_start(){ g_roundstarttime = get_gametime()} /*================================================================================ [Player Spawn Event]=================================================================================*/ public fw_PlayerSpawn( id ){ // Not alive or didn't join a team yet if ( !is_user_alive( id ) || !cs_get_user_team( id ) ) return; g_ctmdl[id] = cs_get_user_team( id ) == CS_TEAM_CT ? true : false; g_tmdl[id] = cs_get_user_team( id ) == CS_TEAM_T ? true : false; // Remove previous tasks (if any) remove_task( id + MODELSET_TASK ) if ( g_ctmdl[id] ) { // Store our custom model in g_player_model[id] copy( g_player_model[id], charsmax( g_player_model[] ), CT_MODEL ) // Get current model new currentmodel[32] fm_get_user_model( id, currentmodel, charsmax( currentmodel ) ) // Check whether it matches the custom model if ( !equal( currentmodel, g_player_model[id] ) ) { // An additional delay is offset at round start // since SVC_BAD is more likely to be triggered there if ( get_gametime() - g_roundstarttime < 5.0 ) set_task( 5.0 * MODELCHANGE_DELAY, "fm_user_model_update", id + MODELSET_TASK ) else fm_user_model_update( id + MODELSET_TASK ) } } else if ( g_has_custom_model[id] ) { // Reset it back to the default one fm_reset_user_model( id ) } if ( g_tmdl[id] ) { // Store our custom model in g_player_model[id] copy( g_player_model[id], charsmax( g_player_model[] ), T_MODEL ) // Get current model new currentmodel[32] fm_get_user_model( id, currentmodel, charsmax( currentmodel ) ) // Check whether it matches the custom model if ( !equal( currentmodel, g_player_model[id] ) ) { // An additional delay is offset at round start // since SVC_BAD is more likely to be triggered there if ( get_gametime() - g_roundstarttime < 5.0 ) set_task( 5.0 * MODELCHANGE_DELAY, "fm_user_model_update", id + MODELSET_TASK ) else fm_user_model_update( id + MODELSET_TASK ) } } else if ( g_has_custom_model[id] ) { // Reset it back to the default one fm_reset_user_model( id ) }} /*================================================================================ [Forwards]=================================================================================*/ public fw_SetClientKeyValue( id, const infobuffer[], const key[] ){ // Block CS model changes if ( g_has_custom_model[id] && equal( key, "model" ) ) return FMRES_SUPERCEDE; return FMRES_IGNORED;} public fw_ClientUserInfoChanged( id ){ // Player doesn't have a custom model if ( !g_has_custom_model[id] ) return FMRES_IGNORED; // Get current model static currentmodel[32] fm_get_user_model( id, currentmodel, charsmax( currentmodel ) ) // Check whether it matches the custom model - if not, set it again if ( !equal( currentmodel, g_player_model[id] ) && !task_exists( id + MODELSET_TASK ) ) fm_set_user_model( id + MODELSET_TASK ) return FMRES_IGNORED;} /*================================================================================ [Tasks]=================================================================================*/ public fm_user_model_update( taskid ){ static Float:current_time current_time = get_gametime() // Do we need a delay? if ( current_time - g_models_targettime >= MODELCHANGE_DELAY ) { fm_set_user_model( taskid ) g_models_targettime = current_time } else { set_task( (g_models_targettime + MODELCHANGE_DELAY) - current_time, "fm_set_user_model", taskid ) g_models_targettime = g_models_targettime + MODELCHANGE_DELAY }} public fm_set_user_model( player ){ // Get actual player id player -= MODELSET_TASK // Set new model engfunc( EngFunc_SetClientKeyValue, player, engfunc( EngFunc_GetInfoKeyBuffer, player ), "model", g_player_model[player] ) // Remember this player has a custom model g_has_custom_model[player] = true} /*================================================================================ [Stocks]=================================================================================*/ stock fm_get_user_model( player, model[], len ){ // Retrieve current model engfunc( EngFunc_InfoKeyValue, engfunc( EngFunc_GetInfoKeyBuffer, player ), "model", model, len )} stock fm_reset_user_model( player ){ // Player doesn't have a custom model any longer g_has_custom_model[player] = false dllfunc( DLLFunc_ClientUserInfoChanged, player, engfunc( EngFunc_GetInfoKeyBuffer, player ) )}
Re: SZ_GetSpace
Posted: 2011 Jun 10 10:46
by beast
Taip. Naudojant šį metodą, nebemeta žaidėjų lauk iš serverio dėl overflow (aišku jei tai dėl modelių keitimo.)
Re: SZ_GetSpace
Posted: 2011 Jun 10 10:49
by KamiN
O paciam kode viskas gerai?
Tarkim sitoj vietoj
Code: Select all
public plugin_precache(){ new modelpath[100] formatex( modelpath, charsmax( modelpath ), "models/player/%s/%s.mdl", CT_MODEL, CT_MODEL ) engfunc( EngFunc_PrecacheModel, modelpath ) formatex( modelpath, charsmax( modelpath ), "models/player/%s/%s.mdl", T_MODEL, T_MODEL ) engfunc( EngFunc_PrecacheModel, modelpath )}
reikia 2 kartus kartot?
Code: Select all
engfunc( EngFunc_PrecacheModel, modelpath )
Arba sita vieta
Code: Select all
public fw_PlayerSpawn( id ){ // Not alive or didn't join a team yet if ( !is_user_alive( id ) || !cs_get_user_team( id ) ) return; g_ctmdl[id] = cs_get_user_team( id ) == CS_TEAM_CT ? true : false; g_tmdl[id] = cs_get_user_team( id ) == CS_TEAM_T ? true : false; // Remove previous tasks (if any) remove_task( id + MODELSET_TASK ) if ( g_ctmdl[id] ) { // Store our custom model in g_player_model[id] copy( g_player_model[id], charsmax( g_player_model[] ), CT_MODEL ) // Get current model new currentmodel[32] fm_get_user_model( id, currentmodel, charsmax( currentmodel ) ) // Check whether it matches the custom model if ( !equal( currentmodel, g_player_model[id] ) ) { // An additional delay is offset at round start // since SVC_BAD is more likely to be triggered there if ( get_gametime() - g_roundstarttime < 5.0 ) set_task( 5.0 * MODELCHANGE_DELAY, "fm_user_model_update", id + MODELSET_TASK ) else fm_user_model_update( id + MODELSET_TASK ) } } else if ( g_has_custom_model[id] ) { // Reset it back to the default one fm_reset_user_model( id ) } if ( g_tmdl[id] ) { // Store our custom model in g_player_model[id] copy( g_player_model[id], charsmax( g_player_model[] ), T_MODEL ) // Get current model new currentmodel[32] fm_get_user_model( id, currentmodel, charsmax( currentmodel ) ) // Check whether it matches the custom model if ( !equal( currentmodel, g_player_model[id] ) ) { // An additional delay is offset at round start // since SVC_BAD is more likely to be triggered there if ( get_gametime() - g_roundstarttime < 5.0 ) set_task( 5.0 * MODELCHANGE_DELAY, "fm_user_model_update", id + MODELSET_TASK ) else fm_user_model_update( id + MODELSET_TASK ) } } else if ( g_has_custom_model[id] ) { // Reset it back to the default one fm_reset_user_model( id ) }}
gal taip reiketu?
Code: Select all
public fw_PlayerSpawn( id ){ // Not alive or didn't join a team yet if ( !is_user_alive( id ) || !cs_get_user_team( id ) ) return; g_ctmdl[id] = cs_get_user_team( id ) == CS_TEAM_CT ? true : false; g_tmdl[id] = cs_get_user_team( id ) == CS_TEAM_T ? true : false; // Remove previous tasks (if any) remove_task( id + MODELSET_TASK ) if ( g_ctmdl[id] ) { // Store our custom model in g_player_model[id] copy( g_player_model[id], charsmax( g_player_model[] ), CT_MODEL ) // Get current model new currentmodel[32] fm_get_user_model( id, currentmodel, charsmax( currentmodel ) ) // Check whether it matches the custom model if ( !equal( currentmodel, g_player_model[id] ) ) { // An additional delay is offset at round start // since SVC_BAD is more likely to be triggered there if ( get_gametime() - g_roundstarttime < 5.0 ) set_task( 5.0 * MODELCHANGE_DELAY, "fm_user_model_update", id + MODELSET_TASK ) else fm_user_model_update( id + MODELSET_TASK ) } } else if ( g_tmdl[id] ) { // Store our custom model in g_player_model[id] copy( g_player_model[id], charsmax( g_player_model[] ), T_MODEL ) // Get current model new currentmodel[32] fm_get_user_model( id, currentmodel, charsmax( currentmodel ) ) // Check whether it matches the custom model if ( !equal( currentmodel, g_player_model[id] ) ) { // An additional delay is offset at round start // since SVC_BAD is more likely to be triggered there if ( get_gametime() - g_roundstarttime < 5.0 ) set_task( 5.0 * MODELCHANGE_DELAY, "fm_user_model_update", id + MODELSET_TASK ) else fm_user_model_update( id + MODELSET_TASK ) } } else if ( g_has_custom_model[id] ) { // Reset it back to the default one fm_reset_user_model( id ) }}