• Get player spawned props amount
    6 replies, posted
Hello, How can i get from a player the amount of props he spawned i tried (clientside) : [CODE]ply:GetCount("prop_physics")[/CODE] But I always get 0.
Try [lua] function getPeps() for _,v in pairs do (players.getAll()) print( v:Nick().. " " ..v:GetCount("prop_physics") ) end end conCommand.Add("props", getPeps) [/lua]
I spawned 2 props then run your script, but it prints 0.
Add a hook for PlayerSpawnProp. Increment a networked variable by one every time they spawn a prop. Decrement it when they delete a prop.
I can't find hook for the deleted props.
It should be props, not prop_physics.
Thanks, this way its easier than using hooks or networking data between server and client.
Sorry, you need to Log In to post a reply to this thread.