Raised This Month: $51 Target: $400
 12% 

chat /spec command crashing server help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bcs16cluj
Member
Join Date: Oct 2011
Old 03-19-2014 , 19:22   chat /spec command crashing server help
Reply With Quote #1

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Spec All"
#define VERSION "1.0.0"
#define AUTHOR "sss"


public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say /spec", "cmd_spec")
}

public cmd_spec(id)
{
new players[32], pnum, tempid
get_players(players, pnum)

for( new i; i<pnum; i++ )
{
tempid = players[i]
user_kill(tempid)
cs_set_user_team(tempid, CS_TEAM_SPECTATOR)
}


sometimes when i use /spec command my server crashes why?can somebody help me ?pls thank you
bcs16cluj is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-19-2014 , 19:34   Re: chat /spec command crashing server help
Reply With Quote #2

Why are you sending everyone to Spec with that command? That is probably the reason there
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
bcs16cluj
Member
Join Date: Oct 2011
Old 03-19-2014 , 19:54   Re: chat /spec command crashing server help
Reply With Quote #3

i use this on my war server to put players to spec!
bcs16cluj is offline
Old 03-19-2014, 20:03
bcs16cluj
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
Baws
Veteran Member
Join Date: Oct 2012
Old 03-19-2014 , 21:27   Re: chat /spec command crashing server help
Reply With Quote #4

Can't you just use amx_transfer?
__________________
Like my clean plugins and work?
Baws is offline
bcs16cluj
Member
Join Date: Oct 2011
Old 03-20-2014 , 03:44   Re: chat /spec command crashing server help
Reply With Quote #5

no
the thing is that we are playing gather mix 5versus5 and first 2 of us choose the teammates and the others must be spec for this !

cand somebody fix this plugin or give me something else for spec

thank you
bcs16cluj is offline
Xunfop
Member
Join Date: Mar 2012
Location: 97Club
Old 03-20-2014 , 14:21   Re: chat /spec command crashing server help
Reply With Quote #6

Try
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Spec All"
#define VERSION "1.0.0"
#define AUTHOR "sss"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);

    
register_clcmd("say /spec""cmd_spec"ADMIN_BAN);
}

public 
cmd_spec(id) {
    new 
players[32], pnumtempid;
    
get_players(playerspnum"h");

    for (new 
ipnumi++) {
        
tempid players[i];
        if (
is_user_alive(tempid))
            
user_kill(tempid1);
        if (
cs_get_user_team(tempid) != CS_TEAM_SPECTATOR)
            
cs_set_user_team(tempidCS_TEAM_SPECTATOR);
    }


Last edited by Xunfop; 03-20-2014 at 14:22.
Xunfop is offline
Reply



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 18:12.


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