Author Topic: help how to tell whether weapon user is player or bot?  (Read 759 times)

is there some way to find whether the user of a gun in the weapon script cs file is a player or a bot? perhaps some way to test the child of %obj (weapon -> client?) without actually calling it by name?

%objectOfPossiblyBotOrPlayer.getClassName()

this will return either Player or AIPlayer

%objectOfPossiblyBotOrPlayer.getClassName()

this will return either Player or AIPlayer
hm.



i forgot the other question. the player thing can be called in the weapon script with %obj.client.player . but is there an equivalent for bots?

hm.



i forgot the other question. the player thing can be called in the weapon script with %obj.client.player . but is there an equivalent for bots?
Where exactly are you pulling the Item's %obj from?

Where exactly are you pulling the Item's %obj from?
huh. i think i have been completely wrong the entire time.

it turns out i don't need %obj.client.player (%obj also works for the user???) and this is extremely easy to work around so far



i will still keep getClassName() in mind. i think it could be useful if i ever need it. thank you for answering and good night







unless i'm also wrong about all this