2.A plugin where for example if ZM spawn is blocked either the blocks will automatically remove that are blocking zm spawn or a plugin where if ZM uses a command for example "say /escape" or whatever they spawn to a random CT spawn
__________________
Copy-and-Paste was programmed by programmers for programmers actually
2.A plugin where for example if ZM spawn is blocked either the blocks will automatically remove that are blocking zm spawn or a plugin where if ZM uses a command for example "say /escape" or whatever they spawn to a random CT spawn
I using this plugin in my server, It made for zombie basebuilder mod and will be work perfectly in your server
public plugin_init() { register_plugin(PLUGIN, VERSION, "ConnorMcLeod");
register_clcmd("menuselect", "ClCmd_MenuSelect_JoinClass"); // old style menu register_clcmd("joinclass", "ClCmd_MenuSelect_JoinClass"); // VGUI menu
DisableHamForward( g_iHhCBasePlayerPreThink = RegisterHam(Ham_Player_PreThink, "player", "OnCBasePlayer_PreThink_Post", true) ); // register it for later }
// player is pressing a key in an old style menu // or player is sending joinclass command, either by typing it in console, either selecting a option from VGUI skins selection menu public ClCmd_MenuSelect_JoinClass(id) { // Don't need to check args here, because (assuming player is in the skin select menu, // we gonna check this) if there is no arg, or if arg is bad, game gonna act as if player was choosing auto-select. // So first check if player is in the correct menu, pdata m_iMenu can just tell us // Then check if player has just joined the server, m_iJoiningState is used by the game for this if( get_pdata_int(id, m_iMenu) == MENU_CHOOSEAPPEARANCE && get_pdata_int(id, m_iJoiningState) == JOIN_CHOOSEAPPEARANCE ) { // Enable PreThink for 1 frame if not already if( !g_iBitHookPlayerPreThink ) { EnableHamForward( g_iHhCBasePlayerPreThink ); } MarkPlayerPreThink(id); } }
// Little explanation on what should happen after player has chosen a skin : // In CBasePlayer::PreThink, if player pdata m_iJoiningState is different from 0, function CBasePlayer::JoinThink gonna be called // In JoinThink function, if m_iJoiningState 5 it means that player has just chosen a skin, we had checked if pdata was 4 because player has not chosen a team yet // Then game checks if that player can be respawn with function CGameRules::FPlayerCanRespawn (if no objective or no player in 1 team player can respawn, // else if we are less that 20sec after round start player can respawn, else player won't spawn)
// So now that PreThink and JoinThink have been called, let's check if player has been respawned or not. public OnCBasePlayer_PreThink_Post( id ) { if( !HookPlayerPreThink(id) ) { return HAM_IGNORED; }
if( !is_user_alive(id) ) { // if player has not been respawned by the game, let's force it. ExecuteHam(Ham_Spawn, id); return HAM_HANDLED; } return HAM_IGNORED; }
The second request: I think there's no one can help you for this, only Traint or Veco But i have another plugin working for after prep time mod removing automatically blocks that's no one has move it
new Baslik[64]
new satir_sayisi = file_size(Konum_Kayit_Dosyasi, FSOPT_LINES_COUNT) - 2
formatex(Baslik,charsmax(Baslik),"\r*** \wAlan Kontrol Menusu \r***^nKorumali Alan Sayisi : \w%d",satir_sayisi)
new Menu = menu_create(Baslik, "Yasakli_Menu_Islemler")
menu_additem(Menu , "\wKorumali Alan Ekle" , "1")
menu_additem(Menu , "\wEklenmis Butun Alanlari Sil" , "2")
menu_setprop(Menu,MPROP_EXITNAME,"\wCikis")
menu_setprop(Menu,MPROP_EXIT, MEXIT_NORMAL)
menu_display(id,Menu,0)
}
else client_print_color( id , print_team_default, "^3Yetkiniz Yeterli Degil.")
return PLUGIN_HANDLED
}
public Yasakli_Menu_Islemler(id, Oylama_menu , item){
new data[6], iName[64]
new acces, callback
menu_item_getinfo(Oylama_menu, item, acces, data,5, iName, 63, callback)
new Deger = str_to_num(data)
switch(Deger)
{
case 1 : Yasakli_Alan_Olustur(id)
case 2 : Dosyayi_Sifirla(id)
}
if ( Deger != 0 ) Yasakli_Alan_Menu(id)
}
public Gorselleri_Olustur(DURUM){
if ( DURUM == OLUSTUR ) while ( Konum_Belirle() == 1 ) Logo_Yerlestir(Kontrol_Konumu)
else remove_entity_name(LOGO_SINIF_ISMI)
if ( file_size(Konum_Kayit_Dosyasi) == -1 )
Yeni_Kayit_Olustur()
set_task(5.0,"Yeni_Tur_Basladi")
}
public plugin_precache() precache_model( Unlem_Logosu )
public Yeni_Kayit_Olustur() write_file(Konum_Kayit_Dosyasi,Harita_Ismi,0)
public Dosyayi_Sifirla(id){
client_cmd(id,"spk sound/buttons/button1.wav")
delete_file(Konum_Kayit_Dosyasi)
Gorselleri_Olustur(KALDIR)
Yeni_Kayit_Olustur()
}
public Nesneyi_Saydamlastir(ent){
set_pev( ent , pev_classname , SAYDAM_TAS_SINIF_ISMI)
set_pev( ent , pev_rendermode,2)
set_pev( ent , pev_renderamt,TAS_SAYDAMLIGI)
set_pev( ent , pev_solid , SOLID_NOT )
}
public Cevrede_Tas_Var( ent ){
static szClassName[32];
static szTargetName[32];
pev(ent,pev_classname,szClassName,sizeof(szClassName)-1);
pev(ent,pev_targetname,szTargetName,sizeof(szTargetName)-1);
if(equal(szClassName,"func_wall") && ent != gBarrierEnt && !equal(szTargetName,"ignore")) {
return 1
}
return 0
}
public Spawn_Kontrol(Spawn_Turu[25]){
new ent_spawn = gMaxPlayers+1;
while ( (ent_spawn = find_ent_by_class(ent_spawn, Spawn_Turu)) ){
new Float:ent_spawn_Konum[3]
pev( ent_spawn , pev_origin , ent_spawn_Konum )
new ent = gMaxPlayers+1;
while((ent = engfunc(EngFunc_FindEntityInSphere,ent,ent_spawn_Konum,Kuresel_Kontrol_Capi_Spawn))) {
if ( Cevrede_Tas_Var(ent) == 1 )
Nesneyi_Saydamlastir(ent)
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/
but the problem is , im getting some errors while trying to compile
PHP Code:
AMX Mod X Compiler 1.9.0.5263
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team
Error: Invalid symbol name "" on line 43
Error: Undefined symbol "Baslik" on line 45
Error: "sizeof" operator is invalid on "function" symbols on line 45
Error: Invalid expression, assumed zero on line 45
Error: Too many error messages on one line on line 45
Compilation aborted.
5 Errors.
__________________
Copy-and-Paste was programmed by programmers for programmers actually