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

[Insurgency] Spectator Move


Post New Thread Reply   
 
Thread Tools Display Modes
Author
C.Falcon
Junior Member
Join Date: Dec 2008
Plugin ID:
690
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    move playser to spectator in insurgency
    Old 12-22-2008 , 19:55   [Insurgency] Spectator Move
    Reply With Quote #1

    Hi guys,

    This is my first plugin. Looking for some feedback, as i am noob to scirpting

    It is a simple command sm_move <target> to move players in insurgency to spectator if they are AFK / need to be moved.

    I originally wanted this to be a teamswitch for insurgency but it seems ChangeClientTeam() is acting very odd in Insurgency. I have to execute a kill on the client for the move to work. If i try to move to any other team than spectator i get some very strange behaviour.

    Any help, suggestions, tips, what i did good, what i did bad etc... would be greatly appreciated!


    I apologize if something similar already exists, i am not trying to copy you. I am just trying to start small so i can learn.

    P.S. Thanks @ Rotghar & Sammy-Rock! They were very helpful in teaching me the basics and providing code examples.
    Attached Files
    File Type: sp Get Plugin or Get Source (move.sp - 2096 views - 1,013 Bytes)
    File Type: smx move.smx (2.9 KB, 714 views)
    C.Falcon is offline
    SAMURAI16
    BANNED
    Join Date: Sep 2006
    Old 12-23-2008 , 02:49   Re: [Insurgency] Spectator Move
    Reply With Quote #2

    I have a question. Did you test this ?
    SAMURAI16 is offline
    Send a message via MSN to SAMURAI16
    V0gelz
    Senior Member
    Join Date: Jun 2004
    Old 12-23-2008 , 06:53   Re: [Insurgency] Spectator Move
    Reply With Quote #3

    Quote:
    Originally Posted by C.Falcon View Post
    I originally wanted this to be a teamswitch for insurgency but it seems ChangeClientTeam() is acting very odd in Insurgency. I have to execute a kill on the client for the move to work. If i try to move to any other team than spectator i get some very strange behaviour.
    I think he did :p
    __________________
    V0gelz is offline
    C.Falcon
    Junior Member
    Join Date: Dec 2008
    Old 12-23-2008 , 16:17   Re: [Insurgency] Spectator Move
    Reply With Quote #4

    Quote:
    Originally Posted by SAMURAI16 View Post
    I have a question. Did you test this ?
    Yes i did, locally and on a test server with a friend... is there a problem?
    C.Falcon is offline
    SAMURAI16
    BANNED
    Join Date: Sep 2006
    Old 12-23-2008 , 16:19   Re: [Insurgency] Spectator Move
    Reply With Quote #5

    ClientCommand(target, "kill");
    this is working ?
    SAMURAI16 is offline
    Send a message via MSN to SAMURAI16
    C.Falcon
    Junior Member
    Join Date: Dec 2008
    Old 12-23-2008 , 16:21   Re: [Insurgency] Spectator Move
    Reply With Quote #6

    Quote:
    Originally Posted by SAMURAI16 View Post
    ClientCommand(target, "kill");
    this is working ?
    Yeah on my local server...

    i think i read some where you need a cvar activated to allow this... is this bad?


    EDIT: I did not like using it but .... i did not know any other way to make it work with insurgency. I am looking for suggestions though... remember i am pretty new to this.

    Last edited by C.Falcon; 12-23-2008 at 18:27. Reason: more info
    C.Falcon is offline
    Liam
    SourceMod Developer
    Join Date: Jan 2008
    Location: Atlanta, GA
    Old 12-23-2008 , 21:03   Re: [Insurgency] Spectator Move
    Reply With Quote #7

    Just use ChangeClientTeam( )
    __________________
    Please don't PM me for support of my plugins. If you have a question, reply in the appropriate thread.

    Weapon Restrictions w/ Warmup
    High Ping Kicker - Lite Edition
    AFK Manager
    Liam is offline
    FlyingMongoose
    Veteran Member
    Join Date: Mar 2004
    Old 12-24-2008 , 04:47   Re: [Insurgency] Spectator Move
    Reply With Quote #8

    ChangeClientTeam actually doesn't kil lthe player in insurgency, it causes the team change to occur though. So you have to force the kill for it to work properly (I've tested and seen this myself)
    __________________
    Please do NOT PM for support.

    Only ask for support in plugin threads.

    TunedChaos.com - Precision Tuned Game Servers
    FlyingMongoose is offline
    Lebson506th
    Veteran Member
    Join Date: Jul 2008
    Old 12-24-2008 , 07:52   Re: [Insurgency] Spectator Move
    Reply With Quote #9

    ClientCommand(client, "kill");

    Works fine in insurgency. I used to use it in my STK plugin.... actually I think I still do.
    __________________
    My Plugins
    Spray Tracer by Nican, maintained by me
    Simple TK Manager
    DoD:S Admin Weapons

    Links
    Resistance and Liberation (A HL2 Multiplayer Modification)
    Lebson506th is offline
    sLuGo
    Member
    Join Date: Mar 2008
    Old 12-24-2008 , 08:30   Re: [Insurgency] Spectator Move
    Reply With Quote #10

    That would be nice! Falcon, you cant' come outta your room and no santa for you till you finish!
    I was experiancing what he's talking about, testing with rothgar on the afk plugin. If you are moved to spec in ins, you stay on the team you were on before, and alive, but you are moved on the scoreboard. Then when you die, you enter spec. Weird behaviour for sure, but what in ins mod isn't weird?
    __________________
    sLuGo 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 17:20.


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