View Single Post
dhruv
Junior Member
Join Date: Dec 2019
Old 12-07-2019 , 07:17   Re: Need a simple auto respawn plugin
Reply With Quote #4

Quote:
Originally Posted by Napoleon_be View Post
Untested:

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") } 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)         }     } }
working good.. need some changes
1. Remove guns ak and m4 for t ct remove that
2. instead make buy menu time unlimited
3. add hostname it should change the hostname to which i want
4. when new player connect he cant spawn.. plz fix that

thanks

Last edited by dhruv; 12-07-2019 at 07:18.
dhruv is offline