AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Spec Switch (https://forums.alliedmods.net/showthread.php?t=64340)

many 12-13-2007 09:32

Spec Switch
 
3 Attachment(s)
Hello.
This plugin allow to go Spectator and back.
Type /spec if you want to go Spectator
Type /back to return from Spectator to your comand.
When you type /back you should not wait for the end of a round it respawn you immediately.
The death does not increase and Kill does not diminish.
It is good for CSDM
P.S. If you found bug please write it here
Add Cvar:
amx_specmode 0 or 1
0 - enable use to all, 1 - enable use only ADMINs
:wink:

ConnorMcLeod 12-13-2007 09:36

Re: Spec Switch
 
Code:
new CsTeams:zTeam new zDeath

Those variables should be 33 arrays

many 12-13-2007 09:58

Re: Spec Switch
 
Thanx. Updated

Battousai-sama 12-16-2007 20:47

Re: Spec Switch
 
isnt this included with amx_super?

many 12-17-2007 07:38

Re: Spec Switch
 
I dont know. I did'nt use this plugin

Battousai-sama 12-17-2007 11:30

Re: Spec Switch
 
ah ok, but amx_super is all in one plugin. and that is included in. u shud get it (^,^)

many 12-17-2007 16:02

Re: Spec Switch
 
in amx_super u need wait end of round
here u respawn automatical

Battousai-sama 12-17-2007 16:10

Re: Spec Switch
 
ah, dunno bout that.

Daniel1337 12-21-2007 13:03

Re: Spec Switch
 
Start of error session.
L 12/21/2007 - 18:03:24: Info (map "aim_ak-colt2k3") (file "addons/amxmodx/logs/error_20071221.log")
L 12/21/2007 - 18:03:24: Function "unspec" was not found
L 12/21/2007 - 18:03:24: [AMXX] Displaying debug trace (plugin "Spec_Switch.amxx")
L 12/21/2007 - 18:03:24: [AMXX] Run time error 19: function not found
L 12/21/2007 - 18:03:24: [AMXX] [0] Spec_Switch.sma::plugin_init (line 19)

pls help!

AMXX v1.8.0.3660

sma:
#define PLUGIN "Spec Switch"
#define VERSION "0.0.5"
#define AUTHOR "many"

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say spec", "spec")
register_clcmd("say_team spec", "spec")
register_clcmd("say unspec", "unspec")
register_clcmd("say_team unspec", "unspec")
}

and

public rule(id){
client_print(id,print_chat,"Type spec if you want to go Spectator")
client_print(id,print_chat,"Type unspec to return from Spectator")
}

EDIT: I found the error:

i changed

public back(id)

in

public unspec(id)

vl@d 12-21-2007 13:41

Re: Spec Switch
 
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fun>

#define PLUGIN "Spec Switch"
#define VERSION "0.0.5"
#define AUTHOR "many"

new CsTeams:zTeam[33]
new 
zDeath[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /spec""spec")
    
register_clcmd("say_team /spec""spec")
    
register_clcmd("say /back""back")
    
register_clcmd("say_team /back""back")
}

public 
client_putinserver(id)
    
set_task(20.0,"rule",id)


public 
spec(id
{
    
zDeath[id] = cs_get_user_deaths(id)
    if(
cs_get_user_team(id) == CS_TEAM_SPECTATOR) return 1;
    else
    
zTeam[id] = cs_get_user_team(id)
    
cs_set_user_team(idCS_TEAM_SPECTATOR)
    
user_kill(id1)
    return 
0;
}

public 
back(id
{
    if(
cs_get_user_team(id) == CS_TEAM_SPECTATOR)
    
cs_set_user_team(idzTeam[id])
    
cs_set_user_deaths(idzDeath[id])
    
set_task(0.2,"respawn",id)
    
set_task(0.4,"respawn",id)
}

public 
rule(id)
{
    
client_print(id,print_chat,"Type /spec if you want to go Spectator")
    
client_print(id,print_chat,"Type /back to return from Spectator")
}

public 
respawn(id)
{
    
cs_user_spawn(id)
    if (
cs_get_user_team(id) == CS_TEAM_T)
    {
        
give_item(id,"weapon_knife")
        
give_item(id,"weapon_glock18")
        
give_item(id,"ammo_9mm")
    }
    if (
cs_get_user_team(id) == CS_TEAM_CT)
    {
        
give_item(id,"weapon_knife")
        
give_item(id,"weapon_usp")
        
give_item(id,"ammo_45acp")
        
give_item(id,"ammo_45acp")
    }
    return 
0;




All times are GMT -4. The time now is 20:42.

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