It must be somthing like this :

(perhaps it won't appear very well at screen... Copy/paste into an other
editor and remove the return to line)

if ( FStrEq(pcmd, "sl_kick") && IsAdmin(pEntity) )
{
        for ( int i = 1; i < gpGlobals->maxClients; i++ )
        {
                CBaseEntity* pPlayer;
                if ( pPlayer = UTIL_PlayerByIndex(i) && !strcmp(CMD_ARGV(1),
STRING(pPlayer->pev->netname)) )
                { // pPlayer points to the requested player, so kick him
                        CLIENT_COMMAND(pEntity->edict(), "disconnect\n");

                        // just for fun :)
                        UTIL_ClientPrintAll(HUD_PRINT_CONSOLE, "%s has just
been kicked by an admin.\n", STRING(pPlayer->pev->netname);
                }
        }
}

Here you are :) I've not made a lot of comments because the functions uses
are logical. If you've any question about the code, feel free to ask ;)
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 21, 2002 9:36 PM
Subject: [hlcoders] (no subject)


This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Ok i am doing a tfc server-side and im coding off of HPB_bot dll.cpp and i
want to make it so that i can go into the console and type "sl_kick
<player>" im using this function for my command "if (FStrEq(pcmd, "sl_kick")
&& IsAdmin(pEntity))"

ok but i cant get it for some reason? can someone show me what my code
should look like? (all of the code, would be a really big help, thanks)
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to