View Single Post
Kvote
New Member
Join Date: May 2019
Old 02-08-2020 , 05:09   Re: Need a simple auto respawn plugin
Reply With Quote #13

Quote:
Originally Posted by Napoleon_be View Post
Updated version. Allthough i'm not sure what you mean with changing hostname (Do you mean the server name?) Untill i get clear intell on that, i'll just leave it for now.

1. Guns on respawn have been removed
2. added a server command that changes mp_buytime to 0, allthough i'm not sure if this would work, you gotta test it.
3. will be worked on
4. Should be fixed.

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <hamsandwich> #include <cstrike> #include <fun> #define PLUGIN "Respawn" #define VERSION "1.0" #define AUTHOR "NapoleoN#" new pRespawnEnabled public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         RegisterHam(Ham_Killed, "player", "PostPlayerKilled", 1)         pRespawnEnabled = register_cvar("amx_respawn","1")         server_cmd("mp_buytime 0") } public client_putinserver(id) {     RespawnVictim(id) } public PostPlayerKilled(iVictim, iAttacker, shouldgib) {     if(get_pcvar_num(pRespawnEnabled)) {         set_task(2.0, "RespawnVictim", iVictim)     } } public RespawnVictim(id) {     if(get_pcvar_num(pRespawnEnabled) && !is_user_alive(id)) {         ExecuteHamB(Ham_CS_RoundRespawn, id)         // set_task(0.5, "GiveWeapons", id) // Delay the give weapon option to avoid spawning weapons too fast.     } } /*public GiveWeapons(id) {     if(is_user_alive(id)) {         if(cs_get_user_team(id) == CS_TEAM_CT) {             give_item(id, "weapon_m4a1")             cs_set_user_bpammo(id, CSW_M4A1, 90)         }                 else if(cs_get_user_team(id) == CS_TEAM_T) {             give_item(id, "weapon_ak47")             cs_set_user_bpammo(id, CSW_AK47, 90)         }     } }*/
can you stop respawn when i move a player or all, to spec?
Kvote is offline