mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-02-21 19:29:38 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a24f3b9fa | ||
|
|
1527eea686 |
@@ -22,6 +22,7 @@ Unfinished, unoptimized and not fully functional ugly demo weapon paints plugin
|
||||
- in `addons/counterstrikesharp/configs/core.json` set **FollowCS2ServerGuidelines** to **false**
|
||||
|
||||
### Web install:
|
||||
- requires PHP (tested on php ver `8.2.3` and nginx webserver)
|
||||
- copy website to web server
|
||||
- import `database.sql` to mysql
|
||||
- get steam api key [https://steamcommunity.com/dev/apikey](https://steamcommunity.com/dev/apikey)
|
||||
|
||||
@@ -131,10 +131,15 @@ public class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig>
|
||||
private HookResult OnPlayerSpawn(EventPlayerSpawn @event, GameEventInfo info)
|
||||
{
|
||||
var player = @event.Userid;
|
||||
if (!player.IsValid || !player.PlayerPawn.IsValid || player.IsBot)
|
||||
if (!player.IsValid || !player.PlayerPawn.IsValid)
|
||||
{
|
||||
return HookResult.Continue;
|
||||
}
|
||||
if (player.IsBot)
|
||||
{
|
||||
player.GiveNamedItem("weapon_knife");
|
||||
return HookResult.Continue;
|
||||
}
|
||||
if (!PlayerHasKnife(player)) player.GiveNamedItem(g_playersKife[(int)player.EntityIndex!.Value.Value]);
|
||||
|
||||
return HookResult.Continue;
|
||||
|
||||
Reference in New Issue
Block a user