View Single Post
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-18-2005 , 16:19  
Reply With Quote #26

I've found there's been problems with the respawning. I'm in no position to test it right now, but I've modified it so that say /respawn might work. If anyone wants to try it, here:

Code:
/* AMXX Mod script. * * (c) Copyright 2004, developed by Geesu * This file is provided as is (no warranties). * * Changelog * 1.0: *   Pistols are now given to players when they respawn *   sv_checkpistols cvar added, if this is set to 0, then players will always spawn with a pistol, otherwise they will only spawn with a pistol when it is not scoutzknivez and not a ka map *   sv_respawn cvar added, set this to 0 to disable the plugin * *   Modified by Hawk552 for surfing */ #include <amxmodx> #include <fun> //#include <cstrike> #define DISABLE_CS 0 // team ids #define UNASSIGNED 0 #define TS 1 #define CTS 2 #define AUTO_TEAM 5 public plugin_init(){     register_plugin("Respawn Forever","1.0","Pimp Daddy (OoTOAoO)")         new mapname[64]     get_mapname(mapname,63)     if(containi(mapname,"surf_")!=-1)     {         register_event("DeathMsg","on_Death","a")         register_clcmd("say /respawn","respawn")     }     register_cvar("surf_respawn", "1") } public respawn(id) {     if(get_cvar_num("surf_respawn")!=1)     {         return PLUGIN_HANDLED     }     if(!is_user_alive(id))     {         if(get_user_team(id)!=UNASSIGNED)         {             set_task(0.5,"respawn_act",id)             set_task(0.7,"respawn_act",id)             set_task(0.9,"player_giveitems",id)         }         else         {             client_print(id,print_chat,"[AMXX] You must be on a team to respawn.")         }     }     else     {         client_print(id,print_chat,"[AMXX] You must be dead to respawn.")     }     return PLUGIN_CONTINUE } public respawn_act(id) {     spawn(id) } public on_Death(id) {     if ( !get_cvar_num("surf_respawn") )         return PLUGIN_CONTINUE         new victim_id = read_data(2)     id=victim_id         /* Spawn the player twice to avoid the HL engine bug */     set_task(0.5,"player_spawn",id)     set_task(0.7,"player_spawn",id)     /* Then give them a suit and a knife */     set_task(0.9,"player_giveitems",id)     return PLUGIN_CONTINUE } public player_giveitems(id) {     give_item(id, "item_suit")     give_item(id, "weapon_knife")     return PLUGIN_CONTINUE } public player_spawn(id) {     spawn(id) }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552