View Single Post
GoRRageBoy
BANNED
Join Date: Jul 2011
Old 09-06-2011 , 21:39   Re: [TF2Items] Give Weapon (v2.7, 02/24/2011)
Reply With Quote #7

Quote:
Originally Posted by FlaminSarge View Post
Clearly the quote is related to your question. Clearly.

I sent a tester the plugin, and he's gonna test it for a bit. It's done.

GorRageBoy: I'll paste the code here for what you're trying to do.

PHP Code:
public Action:Command_WeaponBase(clientweaponLookupIndexweaponSlot)
{
    switch (
weaponLookupIndex)
    {
        case 
2171:
        {
            if (
TF2_GetPlayerClass(client) != TFClass_Sniper)
            {
                  
PrintToChat(client"[TF2Items] Item index %d cannot be used with your current class."weaponLookupIndex);
                  return;
            }
        }
    }
    
decl String:strSteamID[32];
    new 
weaponIndex;
    while ((
weaponIndex GetPlayerWeaponSlot(clientweaponSlot)) != -1)
    {... 
If it's givew_ex'd, they'd get the message every time they respawned/touched a locker.
Thank you kindly, sir.
GoRRageBoy is offline