Raised This Month: $ Target: $400
 0% 

respawn


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 04-06-2006 , 21:56  
Reply With Quote #3

Quote:
Originally Posted by johnjg75
Code:
#include <amxmodx> #include <amxmisc> #include <fun> public plugin_init() {      register_plugin("Respawn","1.0","Johnjg75")      register_concmd("amx_respawn","dorespawn",ADMIN_SLAY," <player> - Respawns a player") } public dorespawn(id) {      new pplayer[33]      read_argv(1,pplayer, 32)      new iindex = get_user_index( pplayer )      if(!is_user_alive( iindex ))           spawn(iindex)      return PLUGIN_HANDLED }

Not sure if it works but you can try it
That will not work. You either have to do 2 set_tasks and each one use spawn and then give them their weapons and suit, or do cs_user_spawn(iindex).

A fixed version would look like this:

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> public plugin_init() {      register_plugin("Respawn","1.0","Johnjg75")      register_concmd("amx_respawn","dorespawn",ADMIN_SLAY," <player> - Respawns a player") } public dorespawn(id,level,cid) {      if(!cmd_access(id,level,cid,2))     return PLUGIN_HANDLED          new pplayer[33]      read_argv(1,pplayer, 32)      new iindex = get_user_index( pplayer )      if(!is_user_alive( iindex ))           cs_user_spawn(iindex)            return PLUGIN_HANDLED }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode