#include <sourcemod>
#include <sdktools>
#pragma semicolon 1
public Plugin:myinfo =
{
name = "[紫冰] 武器给予",
author = "紫冰",
description = "输入指令获得武器",
version = "1.0",
url = "https://blog.csdn.net/ZBzibing/article/details/124114073"
};
public OnPluginStart()
{
RegConsoleCmd("sm_qiang",qiang, "指令!qiang");
}
public Action:scout(client, Args)
{
//GivePlayerItem(client, "weapon_autoshotgun"); //在玩家位置产生一个自动霰弹枪
new wq = CreateEntityByName("weapon_autoshotgun"); //获得自动霰弹枪
DispatchSpawn(wq);
EquipPlayerWeapon(client, wq);
PrintToChatAll("武器已经获得");
return Plugin_Handled;
}
武器代码:
weapon_autoshotgun
weapon_first_aid_kit
weapon_hunting_rifle
weapon_molotov
weapon_pain_pills
weapon_pipe_bomb
weapon_pistol
weapon_pumpshotgun
weapon_rifle
weapon_smg