Quake1011 / CS2-plugins-lua

Includes 14 in one usefull lua plugins for CS2
57 stars 3 forks source link

PlantSideBlocker fix for bots #17

Open andreiseverin opened 10 months ago

andreiseverin commented 10 months ago

Hi,

Can you add a feature for this plugin not to count bots but only real players?

Quake1011 commented 10 months ago

https://github.com/Quake1011/CS2-plugins-lua/blob/d2f0f496686aa6dbfa31da4e83b5ef76748a30f2/PlantSideLocker/vscripts/PlantSideLocker.lua#L68-L76

Replace this

        if v:GetTeam() == team then

to this

        if v:GetTeam() == team and v:IsNPC() == false then
andreiseverin commented 10 months ago

@Quake1011 I tried it and it still doesn't work

Quake1011 commented 10 months ago

@Quake1011 I tried it and it still doesn't work

Hm. Weird... Thats should working

andreiseverin commented 10 months ago

@Quake1011 Maybe they are not seen as NPC. Isn't it a function to check its steamid? It should be 0 for bots

Quake1011 commented 10 months ago

@Quake1011 Maybe they are not seen as NPC. Isn't it a function to check its steamid? It should be 0 for bots

U can't check this for steam Id. For it need create array of players in which one will store player data then. Weird that's didn't work currently function :/