Raised This Month: $ Target: $400
 0% 

Admin menu problem [CS:S]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
comp_noob
Senior Member
Join Date: Nov 2010
Old 07-09-2011 , 23:29   Admin menu problem [CS:S]
Reply With Quote #1

hi, it's me agaiin. i've ran into a few problems with adding commands into the admin menu for my plugin.
a cut out version of my code:
Code:
public Action:Give_Weapon(client, arg)
{
            decl String:target[10], String:weapon_Name[40], playerId;
            GetCmdArg(1, weapon_Name, sizeof(weapon_Name));
            GetCmdArg(2, target, sizeof(target));
            playerId = StringToInt(target);
            new Ent = CreateEntityByName(weapon_Name); 
            if(IsValidEntity(Ent))
            {
                DispatchSpawn(Ent);
                EquipPlayerWeapon(playerId, Ent);
                Bypass_And_Execute(playerId, "givecurrentammo", "");
            }
}
when i tried to use this from the ingame chat or console itself (typed myself) it works, it spawns a weapon for the player, and when the player kills with that weapon, it displays the correct image on the top right hand corner when i killed someone. but when i added the command to the custom admin menu config, whenever i try to spawn a weapon from the admin menu and uses it to kill someone, it shows a skull image on the top right hand corner instead of the usual image which resembles the weapon i use to kill. i tried using the "give" command from the game to give weapons, it seems that counter strike source removed the cheat flag from the command but gave it some other, nothing happens when i strips the cheat flag from it and try to give weapon with that command. can anyone please help me?
comp_noob is offline
miniman
Senior Member
Join Date: Aug 2009
Location: Israel
Old 07-10-2011 , 14:26   Re: Admin menu problem [CS:S]
Reply With Quote #2

try GivePlayerItem http://docs.sourcemod.net/api/index....ad=show&id=36&
miniman is offline
comp_noob
Senior Member
Join Date: Nov 2010
Old 07-11-2011 , 12:37   Re: Admin menu problem [CS:S]
Reply With Quote #3

hmmm thanks for the solution it works
comp_noob 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 05:14.


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