Jump to content
News ticker
  • Bienvenue sur le nouveau forum VeryGames
  • Welcome to the new VeryGames forum
  • VeryNews

    acces au different level d'admin


    max51

    Recommended Posts

    Bonjour,

     

    Je souhaiterais savoir comment configurer un plugin pour que seuls les admin de level H puisse activer ce plugin ?

     

    Je m'explique, j'ai le plugin deathmatch et je voudrais que seul 3admin puissent executer cette commade

    AMX dispose des level et j'aimerais utiliser celui ci

     

    Merci d'avance

    Link to comment
    Share on other sites

    il est gros je vous previens ..... /* by BAILOPAN, Contributors: Asskicr, FreeCode, Ideas: isbunk * * csdm_mod.sma * Allows for Counter-Strike to be played as DeathMatch. * (C)2004 The TCW Organization and David "BAILOPAN" Anderson * Creation: 01-02-2004 Last Edit: 02-25-2004 * * [url]http://www.tcwonline.org/[/url] - BAILOPAN * * Give credit where due. * Share the source - it sets you free * [url]http://www.opensource.org/[/url] * [url]http://www.gnu.org/[/url] */ //Tampering with the author and name lines will violate copyrights new PLUGINNAME[] = "CSDM Mod" new VERSION[] = "1.70" new BUILD_VERSION[] = "296" new AUTHORS[] = "BAILOPAN" //TROGDOR the MEMORY LEAKER! #pragma dynamic 131072 #include #include #include #include #include #define MAX_SPAWNS 41 #define MAX_ENTITIES 1200 #define MAX_ENTS 250 #define MAX_DROP 200 #define MAX_TASKS 500 #define MAXMENUPOS 34 #define MAX_RESTRICTS 30 #define MAX_HOSTAGES 30 #define PISTOL_AMMO 1 #define SHOTGUN_AMMO 2 #define SMG_AMMO 3 #define RIFLE_AMMO 4 #define AWP_AMMO 5 #define PARA_AMMO 6 //These variables are for spawn points. new SPAWN[MAX_SPAWNS][3] //For spawn points new Float:SpnVec[MAX_SPAWNS][3] // new Float:SpnAng[MAX_SPAWNS][3] // new SpnTeam[MAX_SPAWNS] // new SPAWNS_ENABLED // new SPAWNS // //For the old spawn points... new Float:OldSpawns[MAX_SPAWNS][3] new OldSpawnIDs[MAX_SPAWNS] new Float:OldSpawnVecs[MAX_SPAWNS][3] new Float:OldSpawnAngs[MAX_SPAWNS][3] new OLD_SPAWNS //These variables _PROBABLY_ hold data! new mapFile[48] // new EntList[MAX_ENTS][24] //For entities new EntVecs[MAX_ENTS][3] // new EntId[MAX_ENTS] // new EntCount // new EntFile[60] // new Origins[33][3] //Track origins new bool:Swep[33] = false //Menus new g_MenuPos[33] // new g_LastWep[33][2] // new bool:g_getArmor[33] // new bool:g_getGrens[33] // new bool:ShowMenu[33] = true // new bool:isSpawning[33] //Spawning new bool:isRespawn[33] // new DropId[MAX_DROP] //Track dropped weapons new DropTask[MAX_DROP] //Track dropped weapon remove tasks new Tasks[MAX_TASKS] //Track tasks new PackId[MAX_DROP] //drop_pack tempents new PackAmmo[MAX_DROP][6] //0=pistol, 1=shotgun, 2=smg, 3=rifle, 4=awp, 5=para new PackGren[MAX_DROP][3] //0=fb, 1=sg, 2=he new PackTask[MAX_DROP] //pack tfasks new EdictSlot[MAX_ENTITIES] //Entities new BlockedWps[MAX_RESTRICTS] new RestrictWps[MAX_RESTRICTS] // new Float:HostageVecs[MAX_HOSTAGES][3] new HostageEnts[MAX_HOSTAGES] new hostages new Blocks new bool:PackJump[MAX_DROP] //pack longjumps new Entities //entities new bool:HasLongJump[33] = false new g_Aliases[MAXMENUPOS][] = {"usp","glock","deagle","p228","elites","fn57","m3","xm1014","mp5","tmp","p90","mac10","ump45","ak47","galil","famas","sg552","m4a1","aug","scout","awp","g3sg1","sg550","m249","vest","vesthelm","flash","hegren","sgren","defuser","nvgs","shield","primammo","secammo"} new g_Aliases2[MAXMENUPOS][] = {"km45","9x19mm","nighthawk","228compact","elites","fiveseven","12gauge","autoshotgun","smg","mp","c90","mac10","ump45","cv47","defender","clarion","krieg552","m4a1","bullpup","scout","magnum","d3au1","krieg550","m249","vest","vesthelm","flash","hegren","sgren","defuser","nvgs","shield","primammo","secammo"} new bool:Voting new bool:CancelVote new Votes new Float:lastVote //1=enable/disable 3=norm/freeforall 2=items/!items new VoteFor new menuid_1, menuid_2, menuid_3, menuid_4, menuid_5 public plugin_init() { register_plugin(PLUGINNAME, VERSION, AUTHORS) register_cvar("csdm_active", "0") //Enable CSDM? register_cvar("csdm_freeze_time", "4") //Spawn protection time register_cvar("csdm_add_items", "0") //0=Players choose weapons, 1=Players find weapons register_cvar("csdm_item_time", "20.0") //Time until items respawn register_cvar("csdm_random_spawns", "1") //Use random spawns or regular spawns? register_cvar("csdm_kill_all", "0") //0=Use normal teams 1=Free for all register_cvar("csdm_drop_packs", "0") //0=Drop packs on death 1=Drop weapons on death register_cvar("csdm_allow_clguns", "0") //Allows players to choose gun setups with "guns" command register_cvar("csdm_drop_weapons", "1") //Allow players to drop weapons? register_cvar("csdm_hold_many", "0") //Allows players to hold more than one of each type. register_cvar("csdm_delete_time", "20") // register_cvar("csdm_auto_equip", "0") //Automatically equip players with armor register_cvar("csdm_auto_gren", "0") //Automatically equip players with grenades register_cvar("csdm_spawn_spam", "0") //gives respawning users a message register_cvar("csdm_enable_amenu", "1") //Enables armor menu register_cvar("csdm_enable_gmenu", "1") //Enables grenade menu register_cvar("csdm_spawn_protect", "1") //Sets CSDM spawn mode //0=none //1=normal, stops when you move //2=high, stops after csdm_freeze_time register_cvar("csdm_battery", "15") //Battery health register_cvar("csdm_battery_pack", "15") //Battery pack health register_cvar("csdm_battery_max", "100") //Maximum Armor register_cvar("csdm_medkit", "15") //Medkit health register_cvar("csdm_medkit_pack", "15") //Medkit pack health register_cvar("csdm_medkit_max", "100") //Maximum Health register_cvar("csdm_assaultsuit", "100") //AssaultSuit Health register_cvar("csdm_explain", "1") //Explain some usage, like longjump register_cvar("csdm_auto_drop", "1") //Auto-drop guns register_cvar("csdm_pack_jumps", "1") //Sets whether to pack jumps into drop packs. register_cvar("csdm_asskicr", "0") //Use asskicr's changes: //AWP has separate ammo //Para has separate ammo //New ammo box type register_cvar("csdm_allow_radio", "1") //radio? register_cvar("csdm_voting", "2") //1=public 2=admin_level_a 0=disabled register_cvar("csdm_voteflags", "abc") //a=csdm mod on/off c=norm/freeforall b=items or not register_cvar("csdm_ratio", "0.6") //vote ratio register_cvar("csdm_votetime", "45") //vote length register_cvar("csdm_nextvote", "180") //vote wait time register_cvar("csdm_steam", "1") //Sets for steam or not. register_cvar("csdm_sounds", "1") //Use sounds? register_cvar("csdm_random_skins", "0") //Use random skins when free for all is enabled? register_cvar("csdm_dropc4", "1") //Does the plugin prevent players from using the c4? register_cvar("csdm_stripper", "") //Flags: "abcd" //a: removes objectives of the map //b: removes buyzone //c: removes weapons on floor (like in fy_iceworld, ...) //d: removes starting weapon (like in cs_deagle5, ...) register_cvar("csdm_enable_file", "") //File to execute when csdm is enabled? //example: "addons/amx/csdm/csdm_on.cfg" register_cvar("csdm_disable_file", "") //File to execute when csdm is disabled? //example: "addons/amx/csdm/csdm_off.cfg" menuid_1 = register_menuid("CSDM: Equip") menuid_2 = register_menuid("CSDM: Primary Weapon") menuid_3 = register_menuid("CSDM: Secondary Weapon") menuid_4 = register_menuid("CSDM: Armor") menuid_5 = register_menuid("CSDM: Grenades") register_menucmd(menuid_1,1023,"EquipChoice") register_menucmd(menuid_2,1023,"PrimaryWeapon") register_menucmd(menuid_3,1023,"SecondWeapon") register_menucmd(menuid_4,1023,"ArmorChoice") register_menucmd(menuid_5,1023,"GrenChoice") register_menucmd(register_menuid("CSDM Enable "), (1<<0)|(1<<1), "vote_count") register_menucmd(register_menuid("CSDM Which "), (1<<0)|(1<<1), "vote_count") register_menucmd(register_menuid("CSDM Free "), (1<<0)|(1<<1), "vote_count") register_concmd("csdm_enable", "csdm_onoff", ADMIN_LEVEL_C, "Turn CSDM on or off.") register_concmd("csdm_items", "csdm_items", ADMIN_LEVEL_C, "Use items or not.") register_concmd("csdm_version", "csdm_version", 0, "Show CSDM Version.") register_concmd("csdm_setspawn", "csdm_setspawn", ADMIN_LEVEL_D, "Create a CSDM spawn point.") register_concmd("csdm_setspawnv", "csdm_setspawnv", ADMIN_LEVEL_D, "Create a CSDM spawn point with angle.") register_concmd("csdm_delspawn", "csdm_delspawn", ADMIN_LEVEL_D, "Delete a CSDM spawn point.") register_concmd("csdm_setent", "csdm_setent", ADMIN_LEVEL_D, "Add a CSDM entity.") register_concmd("csdm_delent", "csdm_delent", ADMIN_LEVEL_D, "Delete a CSDM entity.") register_concmd("csdm_ent", "csdm_ent", ADMIN_LEVEL_D, "Find the nearest entity.") register_concmd("csdm_spawncount", "csdm_spawncount", ADMIN_LEVEL_D, "See how many spawns there are.") register_concmd("csdm_viewspawns", "csdm_viewspawns", ADMIN_LEVEL_D, "View all spawns.") register_concmd("csdm_hidespawns", "csdm_hidespawns", ADMIN_LEVEL_D, "Hide all spawns.") register_concmd("csdm_rement", "csdm_rement", ADMIN_LEVEL_D, "Delete an entity.") register_concmd("csdm_origin", "csdm_origin", 0, "Find your origin for debugging bad spawns.") register_concmd("csdm_near", "csdm_near", ADMIN_LEVEL_D, "Shows you the number of the nearest spawn point.") register_concmd("csdm_set_amenu", "csdm_set_amenu", ADMIN_LEVEL_B, "Turns armor menus off/on.") register_concmd("csdm_set_gmenu", "csdm_set_gmenu", ADMIN_LEVEL_B, "Turns grenade menus off/on.") register_concmd("csdm_killall", "csdm_killall", ADMIN_LEVEL_B, "Turns kill everyone mode off/on.") register_concmd("csdm_look", "csdm_look", ADMIN_LEVEL_D, "Returns the entity id you are looking at.") register_concmd("csdm_spawninfo", "csdm_spawninfo", ADMIN_LEVEL_A, "Returns the classname of an entity id.") register_concmd("csdm_entinfo", "csdm_entinfo", ADMIN_LEVEL_A, "Returns the classname of an entity id.") register_concmd("csdm_cancelvote", "cancel_vote", ADMIN_LEVEL_A, "Cancels a CSDM vote in session.") register_concmd("csdm_vote", "csdm_vote", 0, "Vote for CSDM.") register_concmd("vote_csdm", "csdm_vote", 0, "Vote for CSDM.") register_concmd("vote_mode", "vote_mode", 0, "Vote for CSDM Mode.") register_concmd("vote_freeforall", "vote_freeforall", 0, "Vote for Free-For-All mode.") register_concmd("csdm_entdump", "csdm_entdump", ADMIN_LEVEL_D, "Dumps a text file with entity information.") register_concmd("csdm_entcount", "csdm_entcount", ADMIN_LEVEL_D, "Returns the number of entities in the map.") register_clcmd("drop", "hook_drop") register_clcmd("respawn", "hook_respawn") register_clcmd("guns", "hook_guns") register_clcmd("give", "hook_give") register_clcmd("enable_menu", "hook_menu") register_clcmd("gospec", "go_spectator") register_clcmd("say guns", "hook_guns") register_clcmd("say respawn", "hook_respawn") register_clcmd("say menu", "hook_menu") register_clcmd("say enablemenu", "hook_menu") register_clcmd("say enable_menu", "hook_menu") register_clcmd("say gospec", "go_spectator") // from AssKicr register_clcmd("buy", "hook_block") register_clcmd("buyammo1", "hook_block") register_clcmd("buyammo2", "hook_block") register_clcmd("buyequip", "hook_block") register_clcmd("radio1", "hook_block_radio") register_clcmd("radio2", "hook_block_radio") register_clcmd("radio3", "hook_block_radio") register_clcmd("nightvision", "hook_block") register_clcmd("cl_setautobuy","hook_block") register_clcmd("cl_autobuy","hook_block") register_clcmd("cl_setrebuy","hook_block") register_clcmd("cl_rebuy","hook_block") register_clcmd("say csdm_vote", "csdm_votesay") register_clcmd("say vote_csdm", "csdm_votesay") register_clcmd("say vote_mode", "vote_modesay") register_clcmd("say vote mode", "vote_modesay") register_clcmd("say vote_freeforall", "vote_freeforallsay") register_clcmd("say vote freeforall", "vote_freeforallsay") // register_event("ResetHUD","hook_hud","be") register_event("DeathMsg", "hook_death", "a") //from dm autopilot, which took from jailbreak register_menucmd(register_menuid("Terrorist_Select"), 1023, "hook_skin") register_menucmd(register_menuid("CT_Select"), 1023, "hook_skin") register_menucmd(-26,1023, "hook_skin") // VGUI register_menucmd(-27,1023, "hook_skin") // VGUI register_event("ShowMenu", "hook_team", "b", "4&Team_Select") register_event("VGUIMenu", "hook_team", "b", "1=2") register_event("CurWeapon","hook_changeweapon","be","1=1","2=6") register_event("Damage", "event_damage", "b", "2!0") register_event("StatusIcon", "hook_gotbomb", "be", "1=1", "1=2", "2=c4") set_task(0.5, "start_map") set_task(10.0, "check_players", 1210, "", 0, "b") //oink. register_logevent("hook_roundstart", 2, "0=World triggered", "1=Round_Start") return PLUGIN_CONTINUE } public plugin_precache() { precache_model("models/w_medkit.mdl") precache_model("models/w_battery.mdl") precache_model("models/w_357ammobox.mdl") //Pistol Ammo precache_model("models/w_shotbox.mdl") //Shotgun Ammo precache_model("models/w_9mmclip.mdl") //SMG Ammo precache_model("models/w_9mmarclip.mdl") //Rifle Ammo precache_model("models/w_crossbow_clip.mdl") //Awp Ammo precache_model("models/w_isotopebox.mdl") //Full ammo precache_model("models/w_isotopeboxt.mdl") //Full ammo precache_model("models/w_chainammo.mdl") //Full ammo precache_model("models/w_suit.mdl") //Suit precache_model("models/w_suitt.mdl") // " precache_model("models/w_weaponbox.mdl") //Drop pack precache_model("models/w_assault.mdl") //assaultsuit precache_model("models/w_longjump.mdl") //longjump - thanks asskicr precache_model("models/w_longjumpt.mdl") // " precache_model("models/gman.mdl") precache_model("models/gmant.mdl") precache_sound("items/smallmedkit1.wav") precache_sound("items/gunpickup2.wav") precache_sound("items/suitchargeok1.wav") precache_sound("items/ammopickup2.wav") precache_sound("items/clipinsert1.wav") precache_sound("debris/metal3.wav") precache_model("models/player/vip/vip.mdl") precache_model("models/player/urban/urban.mdl") precache_model("models/player/gsg9/gsg9.mdl") precache_model("models/player/sas/sas.mdl") precache_model("models/player/gign/gign.mdl") precache_model("models/player/terror/terror.mdl") precache_model("models/player/leet/leet.mdl") precache_model("models/player/arctic/arctic.mdl") precache_model("models/player/guerilla/guerilla.mdl") return PLUGIN_CONTINUE } bool:isValidSubOwner(oid) { if (oid > 32 && oid) { return true } return false } bool:checkMod() { new mod[16] get_modname(mod, 16) if (!equali(mod, "cstrike") && !equali(mod, "czero")) { log_message("[CSDM] Not running on cstrike/czero, plugin disabled.") set_cvar_string("csdm_active", "0") return false } else { if (get_cvar_num("csdm_active")==1) { set_cvar_num("mp_freezetime", 0) if (get_cvar_num("csdm_kill_all")) { if (get_cvar_num("mp_tkpunish")>0) { set_cvar_num("mp_tkpunish", 0) } if (get_cvar_num("mp_autokick")>0) { set_cvar_num("mp_autokick", 0) } if (get_cvar_num("mp_autoteambalance")>0) { set_cvar_num("mp_autoteambalance",0) } if (get_cvar_num("mp_friendlyfire")!=1) { set_cvar_num("mp_friendlyfire", 1) } if (get_cvar_num("mp_playerid")<2) { set_cvar_num("mp_playerid", 2) } if (file_exists("addons/amx/csdm/ffa_enabled.cfg")) { server_cmd("exec addons/amx/csdm/ffa_enabled.cfg") } set_msg_block(112, BLOCK_SET) client_cmd(0, "hideradar") } set_msg_block(get_user_msgid("TextMsg"), BLOCK_SET) if (!get_cvar_num("csdm_allow_radio")) { set_msg_block(get_user_msgid("SendAudio"), BLOCK_SET) } } } return true } bool:destroyPack(pid) { //This function will remove a pack by ENTID and clear index space for it if (!pid) { return false } new entid = PackId[pid] destroyTask(PackTask[pid]) PackId[pid] = 0 PackTask[pid] = 0 PackAmmo[pid][0] = 0 PackAmmo[pid][1] = 0 PackAmmo[pid][2] = 0 PackAmmo[pid][3] = 0 PackAmmo[pid][4] = 0 PackAmmo[pid][5] = 0 PackGren[pid][0] = 0 PackGren[pid][1] = 0 PackGren[pid][2] = 0 PackJump[pid] = false safe_rm_ent(entid) return true } bool:isWpBlocked(wp) { new wpn[24] new i get_wpname(wp, wpn, 24) for (i=1; i<=Blocks; i++) { if (BlockedWps[i] == wp) { return true } } return false } bool:canGetAmmo(id, ammo) { new c, a switch (ammo) { case PISTOL_AMMO: { get_user_ammo(id, CSW_DEAGLE, c, a) if (a 0) { tfEnt = find_entity(tEnt, "hostage_entity") if (hostages == MAX_HOSTAGES - 1) { hostages = 0 } else { hostages++ } entity_get_vector(tEnt, EV_VEC_origin, HostageVecs[hostages]) HostageEnts[hostages] = tEnt hideEnt(tEnt) //Make it so Dan can't grope them. tEnt = tfEnt } } } restoreHostages() { new i for (i=1; i<=hostages; i++) { entity_set_int(HostageEnts[i], EV_INT_rendermode, kRenderNormal) entity_set_origin(HostageEnts[i], HostageVecs[i]) } hostages = 0 } destroyObjectives() { new stripflags[10] get_cvar_string("csdm_stripper", stripflags, 9) if(equal(stripflags, "")) return PLUGIN_CONTINUE new striptype = read_flags(stripflags) if(striptype & (1<<1) && find_entity(-1, "func_buyzone") <= 0) { create_entity("func_buyzone") } new maxents = floatround(float(MAX_ENTITIES) / 1.5) for(new inum = 1 ; inum <= maxents ; inum++) { if(!is_entity(inum)) continue new class[64] entity_get_string(inum, EV_SZ_classname, class, 63) if(striptype & (1<<0)) { if(equal(class,"func_bomb_target")) remove_entity(inum) else if(equal(class,"func_escapezone")) remove_entity(inum) else if(equal(class,"func_vip_safetyzone")) remove_entity(inum) } if(striptype & (1<<1)) { if(equal(class,"func_buyzone")) { entity_set_vector(inum, EV_VEC_absmin, Float:{4000,4000,4000}) entity_set_vector(inum, EV_VEC_absmax, Float:{4000,4000,4000}) } } if(striptype & (1<<2)) { if(equal(class,"item_longjump")) remove_entity(inum) else if(equal(class,"item_healthkit")) remove_entity(inum) else if(equal(class,"item_battery")) remove_entity(inum) else if(equal(class,"armoury_entity")) remove_entity(inum) } if(striptype & (1<<3)) { if(equal(class,"game_player_equip")) remove_entity(inum) else if(equal(class,"player_weaponstrip")) remove_entity(inum) } } return PLUGIN_CONTINUE } hideEnt(ent) { new Float:Vec[3] = {10000.0,10000.0,10000.0} entity_set_int(ent, EV_INT_rendermode, kRenderTransTexture) entity_set_origin(ent, Vec) } public client_connect(id) { ShowMenu[id] = true isSpawning[id] = true g_LastWep[id][0] = 0 g_LastWep[id][1] = 0 g_getArmor[id] = false g_getGrens[id] = false isRespawn[id] = true HasLongJump[id] = false return PLUGIN_CONTINUE } public client_putinserver(id) { new data[2] if (get_cvar_num("csdm_active")) { data[0] = id set_task(10.0, "introduce", 0, data, 2) } return PLUGIN_CONTINUE } public client_command(id){ //from AssKicr if (get_cvar_num("csdm_active") && is_user_alive(id)) { new arg[13] if (read_argv(0, arg, 12) > 11) return PLUGIN_CONTINUE new a = 0 do { if (equali(g_Aliases[a], arg) || equali(g_Aliases2[a], arg)) { return PLUGIN_HANDLED } } while(++a < MAXMENUPOS) } return PLUGIN_CONTINUE } public introduce(data[]) { new id = data[0] if (get_cvar_num("csdm_active")) { client_print(id, print_chat, "[CSDM] Welcome to Counter-Strike Deathmatch by BAILOPAN") client_print(id, print_chat, "[CSDM] Visit [url]www.lambdacore.net[/url] for more information.") client_print(id, print_chat, "[CSDM] Console commands: ^"respawn^" to manually respawn.") if (get_cvar_num("csdm_allow_clguns")) { client_print(id, print_chat, "[CSDM] ^"guns^" to see a menu and ^"give ^" to get a gun.") } } return PLUGIN_CONTINUE } public go_spectator(id) { if(get_cvar_num("csdm_active")) { new team = get_user_team(id) if(get_cvar_num("allow_spectators") > 0 && is_user_alive(id) && (team == 1 || team == 2)) { set_offset_int(id, 114, 3) user_kill(id, 1) message_begin(MSG_ALL, 86, {0,0,0}, 0) write_byte(id) write_string("SPECTATOR") message_end() } } return PLUGIN_CONTINUE } public plugin_end() { destroyAllItems() return PLUGIN_CONTINUE } destroyAllItems() { new i //kill all ents for (i=1; i 32) { if (is_entity(EntId[i])) { safe_rm_ent(EntId[i]) } EntId[i] = 0 } } for (i=1; i^" to get weapons.") } return PLUGIN_HANDLED } else { ShowMenu[id] = true client_print(id, print_console, "[CSDM] Weapons menu is now on.") if (get_cvar_num("csdm_allow_clguns")) { client_print(id, print_console, "[CSDM] You can use ^"guns^" and ^"give ^" to get weapons.") } return PLUGIN_HANDLED } return PLUGIN_HANDLED } public hook_respawn(id) { if (!get_cvar_num("csdm_active")) { return PLUGIN_HANDLED } if (!is_user_alive(id) && id) { new Data[2] Data[0] = id respawn(Data) } return PLUGIN_HANDLED } public hook_give(id) { if (!get_cvar_num("csdm_active")) { return PLUGIN_HANDLED } if (get_cvar_num("csdm_allow_clguns") && !get_cvar_num("csdm_add_items")) { new data[16], wpn[24], wp read_argv(1, data, 16) format(wpn, 24, "weapon_%s", data) wp = getWepId(wpn) if (!wp) { client_print(id, print_console, "[CSDM] Invalid gun!") return PLUGIN_HANDLED } else { if (get_cvar_num("csdm_hold_many")) { giveGun(id, wp, 2) } else { if (canGetGun(id, wp)) { giveGun(id, wp, 2) } else { client_print(id, print_console, "[CSDM] Sorry, you can't hold this weapon.") return PLUGIN_HANDLED } } } } else { client_print(id, print_console, "[CSDM] Client gun commands are disabled.") } return PLUGIN_HANDLED } public hook_guns(id) { if (!get_cvar_num("csdm_active")) { return PLUGIN_HANDLED } if (get_cvar_num("csdm_allow_clguns") && !get_cvar_num("csdm_add_items")) { if (is_user_alive(id)) { EquipMenu(id) } } else { client_print(id, print_chat, "[CSDM] Sorry, client gun menu command is disabled.") } return PLUGIN_HANDLED } public hook_drop(id) { if (get_cvar_num("csdm_active")) { new wp, c, a, Drop[3] wp = get_user_weapon(id, c, a) Drop[0] = wp if (get_cvar_num("csdm_drop_weapons")) { Drop[1] = 0 } else { Drop[1] = 1 } Drop[2] = id set_task(0.2, "timed_replace", 0, Drop, 3) } return PLUGIN_CONTINUE } force_drop_all(id) { new drop[3], authid[20] get_user_authid(id, authid, 20) if (is_user_alive(id)) { if (get_user_team(id) == 1) { if (is_user_bot(id)) { engclient_cmd(id, "drop", "weapon_glock18") } else { client_cmd(id, "drop %s", "weapon_glock18") } drop[0] = CSW_GLOCK18 drop[1] = 1 drop[2] = id set_task(0.2, "timed_replace", 0, drop, 3) } else if (get_user_team(id) == 2) { if (is_user_bot(id)) { engclient_cmd(id, "drop", "weapon_usp") } else { client_cmd(id, "drop %s", "weapon_usp") } drop[0] = CSW_USP drop[1] = 1 drop[2] = id set_task(0.2, "timed_replace", 0, drop, 3) } } } public csdm_rement(id, level, cid) { if (!(get_user_flags(id)&ADMIN_LEVEL_D)) { client_print(id, print_console, "[CSDM] You do not have appropriate access.") return PLUGIN_HANDLED } new S[4] new s read_argv(1, S, 4) s = str_to_num(S) client_print(id, print_console, "Removing entity #%d", s) remove_entity(s) return PLUGIN_HANDLED } public timed_rem_drop(data[]) { new id = data[0] destroyDrop(id) return PLUGIN_CONTINUE } public timed_replace(data[]) { new wp = data[0] new hide = data[1] new p = data[2] if (!hide) { replaceWeapons(wp, 0, p) } else { replaceWeapons(wp, 1, p) } return PLUGIN_CONTINUE } replaceWeapons(wp, hide=0, p) { new model[32], wmodel[32] new Float:RVec[3], Float:AVec[3] new entid new Float:Vel[3] new oid, tEnt, tfEnt new x = 0 getWepModel(wp, model, 32) if (wp && strlen(model) && isValidDrop(wp)) { tEnt = find_entity(-1, "weaponbox") while (tEnt > 0) { tfEnt = find_entity(tEnt, "weaponbox") entity_get_string(tEnt, EV_SZ_model, wmodel, 32) if (equali(model, wmodel)) { oid = entity_get_edict(tEnt, EV_ENT_owner) if (oid == p) { //Do not recreate C4. if (wp != CSW_C4) { entity_get_vector(tEnt, EV_VEC_origin, RVec) if (get_cvar_num("csdm_drop_weapons") && !hide && !isWpBlocked(wp)) { entity_get_vector(tEnt, EV_VEC_angles, AVec) entity_get_vector(tEnt, EV_VEC_velocity, Vel) entid = makeWeapon(wp, RVec, AVec, Vel) if (entid) { createDrop(entid) } } } //this may or may not work. if(wp != CSW_C4 || get_cvar_num("csdm_dropc4") == 1) { safe_rmweapon(wp, tEnt) } } else { if (wp == CSW_C4 && get_cvar_num("csdm_dropc4") == 1) { safe_rmweapon(wp, tEnt) } } } tEnt = tfEnt } } return x //number of ents removed } //Nine out of ten people agree that BAILOPAN is actually insane. safe_rmweapon(wp, entid) { new wEnt, wfEnt, name[24] new woEnt remove_entity(entid) get_weaponname(wp, name, 24) wEnt = find_entity(-1, name) while (wEnt > 0) { wfEnt = find_entity(wEnt, name) woEnt = entity_get_edict(wEnt, EV_ENT_owner) if (isValidSubOwner(woEnt) && woEnt == entid) { remove_entity(wEnt) } wEnt = wfEnt } return 1 } public hook_hud(id) { new param[2] param[0] = id new menuid, keys get_user_menu(id, menuid, keys) if ( (menuid>0) && (menuid!=menuid_1) && (menuid!=menuid_2) && (menuid!=menuid_3) && (menuid!=menuid_4) && (menuid!=menuid_5) ) { set_task(1.0, "checkmenu", 2000+id, param, 2, "b") // KWo } else { set_task(0.4, "hook_hud_delayed", 3000+id, param, 2) // KWo } return PLUGIN_CONTINUE } public checkmenu(param[]) // KWo { new id = param[0] if (!id) return new menuid, keys get_user_menu(id, menuid, keys) if ( (menuid>0) && (menuid!=menuid_1) && (menuid!=menuid_2) && (menuid!=menuid_3) && (menuid!=menuid_4) && (menuid!=menuid_5) ) { return } else { set_task(0.4, "hook_hud_delayed", 3000+id, param, 2) // KWo remove_task(2000+id) } return } public hook_hud_delayed(param[]) { new id = param[0] if(!id) return PLUGIN_CONTINUE if (get_cvar_num("csdm_active")) { if (!get_cvar_num("csdm_add_items")) { if (isRespawn[id]) { isRespawn[id] = false force_drop_all(id) set_task(0.4, "hook_hud_delayed", 3000+id, param, 2) return PLUGIN_CONTINUE } if (ShowMenu[id]) { EquipMenu(id) if (g_getArmor[id] || get_cvar_num("csdm_auto_equip")) { set_user_armor(id, 100) give_item(id, "item_assaultsuit") } if (g_getGrens[id] || get_cvar_num("csdm_auto_gren")) { giveGun(id, CSW_HEGRENADE, 2) giveGun(id, CSW_SMOKEGRENADE, 2) giveGun(id, CSW_FLASHBANG, 2) giveGun(id, CSW_FLASHBANG, 2) } } else { giveGun(id, g_LastWep[id][0], 1) giveGun(id, g_LastWep[id][1], 0) if (g_getArmor[id] || get_cvar_num("csdm_auto_equip")) { set_user_armor(id, 100) give_item(id, "item_assaultsuit") } if (g_getGrens[id] || get_cvar_num("csdm_auto_gren")) { giveGun(id, CSW_HEGRENADE, 2) giveGun(id, CSW_SMOKEGRENADE, 2) giveGun(id, CSW_FLASHBANG, 2) giveGun(id, CSW_FLASHBANG, 2) } if (get_cvar_num("csdm_spawn_span") && !get_cvar_num("csdm_allow_clguns")) { client_print(id, print_chat, "[CSDM] Type ^"enable_menu^" to re-enable, or ^"guns^" to bring up menu.") } } } else { if (get_cvar_num("csdm_auto_equip")) { set_user_armor(id, 100) give_item(id, "item_assaultsuit") } if (get_cvar_num("csdm_auto_gren")) { giveGun(id, CSW_HEGRENADE, 2) giveGun(id, CSW_SMOKEGRENADE, 2) giveGun(id, CSW_FLASHBANG, 2) giveGun(id, CSW_FLASHBANG, 2) } } if (HasLongJump[id]) { give_item(id, "item_longjump") } if (get_cvar_num("csdm_kill_all") && get_cvar_num("csdm_random_skins")) { switch(random_num(0,8)) { case 0:{ CS_SetModel(id, "vip") } case 1:{ CS_SetModel(id, "urban") } case 2:{ CS_SetModel(id, "gsg9") } case 3:{ CS_SetModel(id, "sas") } case 4:{ CS_SetModel(id, "gign") } case 5:{ CS_SetModel(id, "terror") } case 6:{ CS_SetModel(id, "leet") } case 7:{ CS_SetModel(id, "arctic") } case 8:{ CS_SetModel(id, "guerilla") } } } } return PLUGIN_CONTINUE } public hook_death() { new pk = read_data(1) new pv = read_data(2) new Vec[3] new svIndex[2], wps[32], Drop[3], num if (get_cvar_num("csdm_active")) { svIndex[0] = pv set_task(0.5, "quick_respawn", 0, svIndex, 2) isSpawning[pv] = true get_user_origin(pv, Vec) if (get_cvar_num("csdm_drop_packs") && get_cvar_num("csdm_add_items")) { createPack(pv, Vec) } if (get_cvar_num("csdm_kill_all")) { if (get_user_team(pk) == get_user_team(pv) && pk != pv) { set_user_frags(pk, get_user_frags(pk)+2) } client_cmd(0, "hideradar") } HasLongJump[pv] = false num = 0 get_user_weapons(pv, wps, num) //catch every dropped weapon! new i for (i=0; i^" to get a gun.") } } if (get_cvar_num("csdm_spawn_protect")>0) { set_user_health(vIndex, 10239) if (get_cvar_num("csdm_kill_all") == 1) { set_user_rendering(vIndex, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 30) } else { if (get_user_team(vIndex) == 1) set_user_rendering(vIndex, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 30) else if (get_user_team(vIndex) == 2) set_user_rendering(vIndex, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 30) } if (get_cvar_num("csdm_spawn_protect")==1) { set_task(0.2, "check_move", 0, svIndex, 2, "a", floatround(Time/0.21)) } } } else { return PLUGIN_CONTINUE } } return PLUGIN_CONTINUE } public check_move(svIndex[]) { new vIndex = svIndex[0] new Origin[3] if (isSpawning[vIndex]) { get_user_origin(vIndex, Origin) if (Origins[vIndex][0] != Origin[0]) { if(task_exists(147258+vIndex)) { remove_task(147258+vIndex) } unfreeze(svIndex) } else if (Origins[vIndex][1] != Origin[1]) { if(task_exists(147258+vIndex)) { remove_task(147258+vIndex) } unfreeze(svIndex) } } return PLUGIN_CONTINUE } public unfreeze(svIndex[]) { new vIndex = svIndex[0] if (get_cvar_num("csdm_spawn_protect")>0) { set_user_health(vIndex, 100) set_user_rendering(vIndex, kRenderFxNone, 0, 0, 0, kRenderNormal, 0) } if (get_cvar_num("csdm_add_items")) { if (get_cvar_num("csdm_auto_equip")) { //give_item(vIndex, "item_assaultsuit") set_user_armor(vIndex, 100) } /*if (get_cvar_num("csdm_auto_gren")) { giveGun(vIndex, CSW_HEGRENADE, 2) giveGun(vIndex, CSW_SMOKEGRENADE, 2) giveGun(vIndex, CSW_FLASHBANG, 2) giveGun(vIndex, CSW_FLASHBANG, 2) }*/ } isSpawning[vIndex] = false return PLUGIN_CONTINUE } public csdm_version(id) { console_print(id, "[CSDM] Counter-Strike Deathmatch Version %s, build %s.", VERSION, BUILD_VERSION) console_print(id, "[CSDM] Made by BAILOPAN.") return PLUGIN_HANDLED } public csdm_entcount(id) { if (!(get_user_flags(id)&ADMIN_LEVEL_D)) { client_print(id, print_console, "[CSDM] You do not have appropriate access.") return PLUGIN_HANDLED } console_print(id, "[CSDM] There are currently %d entities in the edict table.", get_num_ents()) console_print(id, "[CSDM] There are currently %d defined entities in the map.", EntCount-1) return PLUGIN_HANDLED } public csdm_entdump(id) { if (!(get_user_flags(id)&ADMIN_LEVEL_D)) { client_print(id, print_console, "[CSDM] You do not have appropriate access.") return PLUGIN_HANDLED } new S[4] new s read_argv(1, S, 4) s = str_to_num(S) new i new model[32] new owner new class[32] new Text[128] new entid, pid, did log_to_file("csdm-ents.txt", "[CSDM] Entity dump output.") for (i=s; i<=get_num_ents(); i++) { if (is_entity(i)) { entity_get_string(i, EV_SZ_classname, class, 32) entity_get_string(i, EV_SZ_model, model, 32) entid = findEntId(i) pid = findPackId(i) did = findDrop(i) owner = entity_get_edict(i, EV_ENT_owner) format(Text, 128, "[%d] (%d,%d,%d,%d) ^"%s^" ^"%s^"", i, owner, entid, pid, did, class, model) write_file("addons\amx\logs\csdm-ents.txt", Text, -1) } } return PLUGIN_HANDLED } public csdm_entinfo(id) { if (!(get_user_flags(id)&ADMIN_LEVEL_A)) { client_print(id, print_console, "[CSDM] You do not have appropriate access.") return PLUGIN_HANDLED } new ptrClass[32] new S[4] new s read_argv(1, S, 4) s = str_to_num(S) if (s>EntCount || s<1) { client_print(id, print_console, "[CSDM] That entity was not found.") return PLUGIN_HANDLED } if (EntId[s]) { entity_get_string(EntId[s], EV_SZ_classname, ptrClass, 32) client_print(id, print_console, "[CSDM] Entity (%d) has classname ^"%s^".", s, ptrClass) } else { client_print(id, print_console, "[CSDM] Entity (%d) is not currently spawned.", s) } return PLUGIN_HANDLED } public csdm_spawninfo(id) { if (!(get_user_flags(id)&ADMIN_LEVEL_A)) { client_print(id, print_console, "[CSDM] You do not have appropriate access.") return PLUGIN_HANDLED } new S[4] new s read_argv(1, S, 4) s = str_to_num(S) if (s>0 && s<=SPAWNS) { console_print(id, "[CSDM] Spawn %d has defs (%d %d %d) [%d %d %d]", s, SPAWN[s][0], SPAWN[s][1], SPAWN[s][2], floatround(SpnVec[s][0]), floatround(SpnVec[s][1]), floatround(SpnVec[s][2])) } return PLUGIN_HANDLED } public csdm_look(id) { if (!(get_user_flags(id)&ADMIN_LEVEL_D)) { client_print(id, print_console, "[CSDM] You do not have appropriate access.") return PLUGIN_HANDLED } new marker, dist=100, cur, PVec[3] new i marker = -1 get_user_origin( id, PVec, 3) for (i=1; iEntCount || s<1) { client_print(id, print_console, "[CSDM] That entity was not found.") return PLUGIN_HANDLED } new entid = EntId[s] rment(entid) if (s == EntCount-1) { EntList[s][0] = 0 EntVecs[s][0] = 0 EntVecs[s][1] = 0 EntVecs[s][2] = 0 EntId[s] = 0 } else if (s == EntCount-2) { copy(EntList[s], 24, EntList[s+1]) EntVecs[s][0] = EntVecs[s+1][0] EntVecs[s][1] = EntVecs[s+1][1] EntVecs[s][2] = EntVecs[s+1][2] EntId[s] = EntId[s+1] } else if (s < EntCount - 2) { for (i=s; iSPAWNS) { client_print(id, print_console, "[CSDM] That spawn point was not found.") return PLUGIN_HANDLED } for (i=s; i 0) { safe_rm_ent(tEnt) tEnt = find_entity(-1, "view_spawn") } client_print(id, print_console, "[CSDM] Spawn markers removed.") return PLUGIN_HANDLED } public csdm_spawncount(id, level, cid) { if (!(get_user_flags(id)&ADMIN_LEVEL_D)) { client_print(id, print_console, "[CSDM] You do not have appropriate access.") return PLUGIN_HANDLED } new tEnt, tfEnt new i=0 tEnt = find_entity(-1, "info_player_deathmatch") while (tEnt > 0) { tfEnt = find_entity(tEnt, "info_player_deathmatch") tEnt = tfEnt i++ } tEnt = find_entity(-1, "info_player_start") while (tEnt > 0) { tfEnt = find_entity(tEnt, "info_player_start") tEnt = tfEnt i++ } console_print(id, "[CSDM] %d spawns found.", i) return PLUGIN_HANDLED } public csdm_viewspawns(id, level, cid) { if (!(get_user_flags(id)&ADMIN_LEVEL_D)) { client_print(id, print_console, "[CSDM] You do not have appropriate access.") return PLUGIN_HANDLED } new entid, Float:Ang[3], Float:Vec[3], Float:vAng[3] new tEnt, tfEnt new i=0 tEnt = find_entity(-1, "info_player_deathmatch") while (tEnt > 0) { tfEnt = find_entity(tEnt, "info_player_deathmatch") entity_get_vector(tEnt, EV_VEC_angles, Ang) entity_get_vector(tEnt, EV_VEC_origin, Vec) entity_get_vector(tEnt, EV_VEC_v_angle, vAng) entid = create_entity("info_target") entity_set_string(entid, EV_SZ_classname, "view_spawn") entity_set_model(entid, "models/w_suit.mdl") entity_set_origin(entid, Vec) entity_set_vector(entid, EV_VEC_angles, Ang) entity_set_vector(entid, EV_VEC_v_angle, vAng) entity_set_int(entid, EV_INT_solid, 1) entity_set_int(entid, EV_INT_movetype, 6) tEnt = tfEnt i++ } tEnt = find_entity(-1, "info_player_start") while (tEnt > 0) { tfEnt = find_entity(tEnt, "info_player_start") entity_get_vector(tEnt, EV_VEC_angles, Ang) entity_get_vector(tEnt, EV_VEC_origin, Vec) entity_get_vector(tEnt, EV_VEC_v_angle, vAng) entid = create_entity("info_target") entity_set_string(entid, EV_SZ_classname, "view_spawn") entity_set_model(entid, "models/gman.mdl") entity_set_origin(entid, Vec) entity_set_vector(entid, EV_VEC_angles, Ang) entity_set_vector(entid, EV_VEC_v_angle, vAng) entity_set_int(entid, EV_INT_solid, 1) entity_set_int(entid, EV_INT_movetype, 6) tEnt = tfEnt i++ } console_print(id, "[CSDM] %d spawns marked.", i) return PLUGIN_HANDLED } public csdm_setent(id, level, cid) { if (!(get_user_flags(id)&ADMIN_LEVEL_D)) { client_print(id, print_console, "[CSDM] You do not have appropriate access.") return PLUGIN_HANDLED } if (EntCount == MAX_ENTS) { client_print(id, print_console, "[CSDM] Entity limit reached at %d", MAX_ENTS) return PLUGIN_HANDLED } if (get_cvar_num("csdm_add_items") != 1) { client_print(id, print_console, "[CSDM] You must have csdm_add_items set to 1.") client_print(id, print_console, "[CSDM] Set it to 1 and restart the map.") return PLUGIN_HANDLED } new IDVec[3] new gEnt[24] new Text[64] read_argv(1, gEnt, 24) get_user_origin(id, IDVec) format(Text, 64, "%s %d %d %d", gEnt, IDVec[0], IDVec[1], IDVec[2]) copy(EntList[EntCount], 24, gEnt) EntVecs[EntCount][0] = IDVec[0] EntVecs[EntCount][1] = IDVec[1] EntVecs[EntCount][2] = IDVec[2] EntId[EntCount] = makeEnt(EntCount) if (EntId[EntCount] > 0) { write_file(EntFile, Text, -1) EntCount++ client_print(id, print_console, "[CSDM] There are now %d entities defined.", EntCount) } else { client_print(id, print_console, "[CSDM] Entity ^"%s^" did not init properly.", gEnt) EntVecs[EntCount][0] = 0 EntVecs[EntCount][1] = 0 EntVecs[EntCount][2] = 0 EntId[EntCount] = 0 copy(EntList[EntCount], 24, "") } return PLUGIN_HANDLED } public csdm_items(id, level, cid) { if (!(get_user_flags(id)&ADMIN_LEVEL_C)) { return PLUGIN_HANDLED } new Bits[4], bit read_argv(1, Bits, 4) bit = str_to_num(Bits) if (!strlen(Bits)) { client_print(id, print_console, "csdm_items [1|0] (1=on, 0=off)") return PLUGIN_HANDLED } if (bit == 0) { set_cvar_num("csdm_add_items", 0) client_print(id, print_console, "Item mode has been turned off. Reverting to menus.") destroyAllItems() return PLUGIN_HANDLED } else { set_cvar_num("csdm_add_items", 1) client_print(id, print_console, "Item mode has been turned on. There may be lag as the items are initialized.") setEnts() if (get_cvar_num("csdm_allow_clguns")) { client_print(id, print_console, "csdm_allow_clguns is chaotic in csdm_add_items mode and is being turned off.") set_cvar_num("csdm_allow_clguns", 0) } return PLUGIN_HANDLED } return PLUGIN_HANDLED } public csdm_onoff(id, level, cid) { if (!(get_user_flags(id)&ADMIN_LEVEL_C)) { return PLUGIN_HANDLED } new Bits[4], bit read_argv(1, Bits, 4) bit = str_to_num(Bits) if (!strlen(Bits)) { client_print(id, print_console, "csdm_enable [1|0] (1=on, 0=off)") return PLUGIN_HANDLED } if (bit == 0) { set_cvar_num("csdm_active", 0) console_print(id, "CSDM Mode turned off.") console_print(id, "There may be some lag as the map is prepared.") client_print(0, print_chat, "CSDM Mode turned off.") log_message("[CSDM] CSDM Mode turned off.") destroyAllItems() restoreSpawns() restoreHostages() if(get_cvar_num("csdm_kill_all") == 1) { set_msg_block(112, BLOCK_NOT) client_cmd(0, "drawradar") set_cvar_num("mp_playerid", 0) if (file_exists("addons/amx/csdm/ffa_disabled.cfg")) { server_cmd("exec addons/amx/csdm/ffa_disabled.cfg") } } new players[32], inum get_players(players, inum) for(new i = 0 ; i < inum ; i++) { CS_ClearModel(players[i]) } new file[64] get_cvar_string("csdm_disable_file", file, 63) if (file_exists(file)) server_cmd("exec %s", file) server_cmd("sv_restartround 2") return PLUGIN_HANDLED } else { set_cvar_num("csdm_active", 1) console_print(id, "CSDM Mode turned on.") client_print(0, print_chat, "CSDM Mode turned on.") log_message("[CSDM] CSDM Mode turned on.") console_print(id, "There may be some lag as the map is prepared.") if(get_cvar_num("csdm_kill_all") == 1) { set_msg_block(112, BLOCK_SET) client_cmd(0, "hideradar") set_cvar_num("mp_playerid", 2) if (file_exists("addons/amx/csdm/ffa_enabled.cfg")) { server_cmd("exec addons/amx/csdm/ffa_enabled.cfg") } } set_task(2.0, "start_map") return PLUGIN_HANDLED } return PLUGIN_HANDLED } bool:cwrap(string1[], string2[]) { if (containi(string1, string2)!=-1) { return true } return false } //This is basically the reverse of the setSpawns() algorithm //Basically, it finds all of the spawns in play and restoreSpawns() { new tEnt new i if
    Link to comment
    Share on other sites

    il me semble que c'est dans cette partie mais pour moi c'est du chinois

     

     

    register_concmd("csdm_enable", "csdm_onoff", ADMIN_LEVEL_C, "Turn CSDM on or off.")

    register_concmd("csdm_items", "csdm_items", ADMIN_LEVEL_C, "Use items or not.")

    register_concmd("csdm_version", "csdm_version", 0, "Show CSDM Version.")

    register_concmd("csdm_setspawn", "csdm_setspawn", ADMIN_LEVEL_D, "Create a CSDM spawn point.")

    register_concmd("csdm_setspawnv", "csdm_setspawnv", ADMIN_LEVEL_D, "Create a CSDM spawn point with angle.")

    register_concmd("csdm_delspawn", "csdm_delspawn", ADMIN_LEVEL_D, "Delete a CSDM spawn point.")

    register_concmd("csdm_setent", "csdm_setent", ADMIN_LEVEL_D, "Add a CSDM entity.")

    register_concmd("csdm_delent", "csdm_delent", ADMIN_LEVEL_D, "Delete a CSDM entity.")

    register_concmd("csdm_ent", "csdm_ent", ADMIN_LEVEL_D, "Find the nearest entity.")

    register_concmd("csdm_spawncount", "csdm_spawncount", ADMIN_LEVEL_D, "See how many spawns there are.")

    register_concmd("csdm_viewspawns", "csdm_viewspawns", ADMIN_LEVEL_D, "View all spawns.")

    register_concmd("csdm_hidespawns", "csdm_hidespawns", ADMIN_LEVEL_D, "Hide all spawns.")

    register_concmd("csdm_rement", "csdm_rement", ADMIN_LEVEL_D, "Delete an entity.")

    register_concmd("csdm_origin", "csdm_origin", 0, "Find your origin for debugging bad spawns.")

    register_concmd("csdm_near", "csdm_near", ADMIN_LEVEL_D, "Shows you the number of the nearest spawn point.")

    register_concmd("csdm_set_amenu", "csdm_set_amenu", ADMIN_LEVEL_B, "Turns armor menus off/on.")

    register_concmd("csdm_set_gmenu", "csdm_set_gmenu", ADMIN_LEVEL_B, "Turns grenade menus off/on.")

    register_concmd("csdm_killall", "csdm_killall", ADMIN_LEVEL_B, "Turns kill everyone mode off/on.")

    register_concmd("csdm_look", "csdm_look", ADMIN_LEVEL_D, "Returns the entity id you are looking at.")

    register_concmd("csdm_spawninfo", "csdm_spawninfo", ADMIN_LEVEL_A, "Returns the classname of an entity id.")

    register_concmd("csdm_entinfo", "csdm_entinfo", ADMIN_LEVEL_A, "Returns the classname of an entity id.")

    register_concmd("csdm_cancelvote", "cancel_vote", ADMIN_LEVEL_A, "Cancels a CSDM vote in session.")

    register_concmd("csdm_vote", "csdm_vote", 0, "Vote for CSDM.")

    register_concmd("vote_csdm", "csdm_vote", 0, "Vote for CSDM.")

    register_concmd("vote_mode", "vote_mode", 0, "Vote for CSDM Mode.")

    register_concmd("vote_freeforall", "vote_freeforall", 0, "Vote for Free-For-All mode.")

    register_concmd("csdm_entdump", "csdm_entdump", ADMIN_LEVEL_D, "Dumps a text file with entity information.")

    register_concmd("csdm_entcount", "csdm_entcount", ADMIN_LEVEL_D, "Returns the number of entities in the map.")

     

    dites moi si je me trompe (j'ai essaye de comprendre)

    Link to comment
    Share on other sites

    Salut, il me semble qu'en remplacant la ligne :

    register_concmd("csdm_enable", "csdm_onoff", ADMIN_LEVEL_C, "Turn CSDM on or off.")

    par la ligne :

    register_concmd("csdm_enable", "csdm_onoff", ADMIN_LEVEL_H, "Turn CSDM on or off.")

     

    en gros tu changes un C en H.

    tu recompiles et ca doit marcher, il me semble.

     

    Cette fonction gere l'activation du plugin, ca regle en gros ton probleme. Il y a d autres fonctions mais ne t embete pas avec toi ce qui t'interesse c'est juste l'activation.

     

    voila j'espere que c'est bon ce que j'ai dit ;-)

     

    A+

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...