[CS:S] Stop bots from going knife at the start of a round
So, i'm trying to stop bots from going knife at the start of a round, because that creates problems when playing on aim and fy maps, this is my first sourcemod coding experience and this is what i have so far, it does not even work:
#include <sourcemod> #include <cstrike> #include <sdktools_functions> public Plugin myinfo = { name = "BotSwitchPrimary", author = "Xeller", description = "Switches fakeclients to primary weapon on round start", version = "1.0", }; public void OnPluginStart() { HookEvent("player_spawn", EventSpawn); } public void EventSpawn(Event event, const char[] name, bool bdb) { int client = GetEventInt(event, "userid"); if (IsFakeClient(client)) { new weapon = GetPlayerWeaponSlot(client, 1); SetEntPropEnt(client, Prop_Send, "m_hActiveWeapon", weapon) } } If anyone knows how to do it properly i would greatly appreciate the help. |
Re: [CS:S] Stop bots from going knife at the start of a round
One trick would be, drop knife and "kill" it.
|
Re: [CS:S] Stop bots from going knife at the start of a round
Quote:
|
Re: [CS:S] Stop bots from going knife at the start of a round
https://sm.alliedmods.net/new-api/cstrike/CS_DropWeapon
Edit Here is example, if you want player to use another weapon for example https://forums.alliedmods.net/showpo...76&postcount=8 |
Re: [CS:S] Stop bots from going knife at the start of a round
Quote:
|
All times are GMT -4. The time now is 01:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.