Raised This Month: $ Target: $400
 0% 

Is this a good script? [admin_respawn.sma]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 03-07-2009 , 14:40   Re: Is this a good script? [admin_respawn.sma]
Reply With Quote #8

do you want them to spawn by purchasing it or respawn by typing it?

EDIT: Try This

Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <engine>
new PLUG[] = "Admin Respawn";
new VERS[] = "1.0";
new AUTH[] = "LeviN";
public plugin_init()
{
    register_plugin(PLUG, VERS, AUTH);
    
    RegisterHam(Ham_DeathNotice, "player", "player_death", 1);
    
    register_clcmd("say /respawn", "cmd_buyspawn");
    register_clcmd("say_team /respawn", "cmd_buyspawn");
}
public cmd_buyspawn(id)
{
 if(get_user_flags(id) & ADMIN_KICK)
 {
  set_hudmessage(0, 255, 0, -1.0, -1.0)
  show_hudmessage(id, "You respawned!")
  set_task(1.0, "StartSpawn", id);
 }
 
 else
 {
  client_print(id, print_center, "[CrazY EffecT] You have no acces to this command!")
 }
}
public StartSpawn(id)
{
    if(!is_user_alive(id))
    {
        cs_set_user_team(id, CS_TEAM_T);
        set_task(1.0, "spawn_again", id);
    }
    return PLUGIN_HANDLED;
}
public spawn_again(id)
{
    ExecuteHamB(Ham_CS_RoundRespawn,id);
}
Attached Files
File Type: sma Get Plugin or Get Source (ce_spawn.sma - 560 views - 1.1 KB)
__________________

Last edited by DruGzOG; 03-07-2009 at 14:49.
DruGzOG is offline
Send a message via AIM to DruGzOG
 



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 08:50.


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