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

[CS:GO] Give Weapon


Post New Thread Reply   
 
Thread Tools Display Modes
September
Senior Member
Join Date: Jul 2015
Location: Russian Federation
Old 12-05-2015 , 07:28   Re: [CS:GO] Give Weapon
Reply With Quote #51

Quote:
Originally Posted by Apina View Post
Added
weapon_m4a1_silencer and weapon_awp
Add usp-s, please.
September is offline
Send a message via Skype™ to September
asdfxD
Veteran Member
Join Date: Apr 2011
Old 12-09-2015 , 11:08   Re: [CS:GO] Give Weapon
Reply With Quote #52

Quote:
Originally Posted by September View Post
Add usp-s, please.
use this one.

added cz75-auto, usp silencer, r8 revolver "volvo R8"
Attached Files
File Type: sp Get Plugin or Get Source (giveweapons.sp - 772 views - 2.8 KB)

Last edited by asdfxD; 12-09-2015 at 11:12.
asdfxD is offline
mufin
BANNED
Join Date: Aug 2015
Old 01-08-2016 , 15:41   Re: [CS:GO] Give Weapon
Reply With Quote #53

anyway to allow @all with awps the @all is broken and stuff also no awps
mufin is offline
asdfxD
Veteran Member
Join Date: Apr 2011
Old 02-18-2016 , 09:29   Re: [CS:GO] Give Weapon
Reply With Quote #54

added medi shot and tactical awareness grenade.
Attached Files
File Type: sp Get Plugin or Get Source (giveweapons.sp - 811 views - 2.9 KB)
asdfxD is offline
NickischLP
Senior Member
Join Date: Jun 2013
Location: Germany
Old 02-23-2016 , 13:46   Re: [CS:GO] Give Weapon
Reply With Quote #55

Would be cool if we can use item_assaultsuit and item_heavyassauiltsuit
__________________
NickischLP is offline
Send a message via Skype™ to NickischLP
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 03-08-2016 , 10:57   Re: [CS:GO] Give Weapon
Reply With Quote #56

Quote:
Originally Posted by mufin View Post
anyway to allow @all with awps the @all is broken and stuff also no awps
This was never supported.

Check above post for all current weapons.
sneaK is offline
Pandoma
New Member
Join Date: Nov 2016
Old 11-21-2016 , 00:25   Re: [CS:GO] Give Weapon
Reply With Quote #57

Lets say the user's name has spaces, how do i type? Because if i typed sm_weapon John Burg ak47, it will instead say Weapon Burg is invalid... so how do i..?
Pandoma is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 11-22-2016 , 16:21   Re: [CS:GO] Give Weapon
Reply With Quote #58

Quote:
Originally Posted by Pandoma View Post
Lets say the user's name has spaces, how do i type? Because if i typed sm_weapon John Burg ak47, it will instead say Weapon Burg is invalid... so how do i..?
sm_weapon "John Burg" ak47
sm_weapon Burg ak47
Maxximou5 is offline
nguyenbaodanh
AlliedModders Donor
Join Date: Jun 2007
Location: HCMC, Vietnam
Old 02-09-2018 , 23:33   Re: [CS:GO] Give Weapon
Reply With Quote #59

Quote:
Originally Posted by asdfxD View Post
added medi shot and tactical awareness grenade.
I tried to remove all nades but why it can't compile ?

Code:
#include <sourcemod>
#include <sdktools>

#pragma semicolon 1

#define MAX_WEAPONS		43

public Plugin:myinfo = {
	name = "Give Weapon",
	author = "Kiske",
	description = "Give a weapon to a player from a command",
	version = "1.0",
	url = "http://www.sourcemod.net/"
};

new const String:g_weapons[MAX_WEAPONS][] = {"weapon_ak47", "weapon_aug", "weapon_bizon", "weapon_deagle", "weapon_decoy", "weapon_elite", "weapon_famas", "weapon_fiveseven", "weapon_flashbang",	"weapon_g3sg1", "weapon_galilar", "weapon_glock", "weapon_hkp2000", "weapon_knife", "weapon_m249", "weapon_m4a1","weapon_mac10", "weapon_mag7", "weapon_molotov", "weapon_mp7", "weapon_mp9", "weapon_negev", "weapon_nova", "weapon_p250", "weapon_p90", "weapon_sawedoff",	"weapon_scar20", "weapon_sg556", "weapon_ssg08", "weapon_taser", "weapon_tec9", "weapon_ump45", "weapon_xm1014", "weapon_awp", "weapon_m4a1_silencer",	"weapon_cz75a", "weapon_usp_silencer", "weapon_revolver", "weapon_healthshot", "weapon_tagrenade"};
	
public OnPluginStart()
{
	RegAdminCmd("sm_weapon", smWeapon, ADMFLAG_BAN, "- <target> <weaponname>");
	RegAdminCmd("sm_weaponlist", smWeaponList, ADMFLAG_BAN, "- list of the weapon names");
}

public Action:smWeapon(id, args)
{
	if(args < 2)
	{
		ReplyToCommand(id, "[SM] Usage: sm_weapon <name | #userid> <weaponname>");
		return Plugin_Handled;
	}
	
	decl String:sArg[256];
	decl String:sTempArg[32];
	decl String:sWeaponName[32];
	decl String:sWeaponNameTemp[32];
	decl iL;
	decl iNL;
	
	GetCmdArgString(sArg, sizeof(sArg));
	iL = BreakString(sArg, sTempArg, sizeof(sTempArg));
	
	if((iNL = BreakString(sArg[iL], sWeaponName, sizeof(sWeaponName))) != -1)
		iL += iNL;
	
	new i;
	new iValid = 0;
	
	if(StrContains(sWeaponName, "weapon_") == -1)
	{
		FormatEx(sWeaponNameTemp, 31, "weapon_");
		StrCat(sWeaponNameTemp, 31, sWeaponName);
		
		strcopy(sWeaponName, 31, sWeaponNameTemp);
	}
	
	for(i = 0; i < MAX_WEAPONS; ++i)
	{
		if(StrEqual(sWeaponName, g_weapons[i]))
		{
			iValid = 1;
			break;
		}
	}
	
	if(!iValid)
	{
		ReplyToCommand(id, "[SM] The weaponname (%s) isn't valid", sWeaponName);
		return Plugin_Handled;
	}
	
	decl String:sTargetName[MAX_TARGET_LENGTH];
	decl sTargetList[1];
	decl bool:bTN_IsML;
	
	new iTarget = -1;
	
	if(ProcessTargetString(sTempArg, id, sTargetList, 1, COMMAND_FILTER_ALIVE|COMMAND_FILTER_NO_MULTI, sTargetName, sizeof(sTargetName), bTN_IsML) > 0)
		iTarget = sTargetList[0];
	
	if(iTarget != -1 && !IsFakeClient(iTarget))
		GivePlayerItem(iTarget, sWeaponName);
	
	return Plugin_Handled;
}

public Action:smWeaponList(id, args)
{
	new i;
	for(i = 0; i < MAX_WEAPONS; ++i)
		ReplyToCommand(id, "%s", g_weapons[i]);
	
	ReplyToCommand(id, "");
	ReplyToCommand(id, "* No need to put weapon_ in the <weaponname>");
	
	return Plugin_Handled;
}
__________________
nguyenbaodanh is offline
panikajo
Member
Join Date: Jan 2013
Old 02-12-2018 , 06:23   Re: [CS:GO] Give Weapon
Reply With Quote #60

Can someone do by category?
1. Pistols.
2. Rifles.
3. Sniping.
And make sure that the pistols can be taken from round 2.
Rifles with 3 and snipers with 4?
panikajo 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 07:46.


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