Retreiving 'CBasePlayer.m_iFOV' ?

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
Mahi
Senior Member
Posts: 236
Joined: Wed Aug 29, 2012 8:39 pm
Location: Finland

Postby Mahi » Sun Sep 02, 2012 9:56 am

Tuck wrote:i dont see the difference of using "EasyPlayer or EdictofPlayer" ?
There isn't any if you're only calling SetPropInt. However, EasyPlayer holds in alot more than that. EasyPlayer can use all (or atleast most?) the same functions as EdictOfPlayer, and it has alot more, fe. it can get player's name, steamid, etc.
You should check the wiki of EasyPlayer here, it's quite useful.
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sun Sep 02, 2012 12:59 pm

Tuck wrote:ES:

Syntax: Select all

(es.getplayerprop(a['id'], 'CBasePlayer.m_fFlags') & 1) == 0


What would be the equilivent ?

SP??:

Syntax: Select all

entity = Player.EdictOfPlayer(<PLAYER>)
onground = ((entity.GetPropLong('CBasePlayer.m_fFlags') & 1) == 0)
Tuck wrote:i dont see the difference of using "EasyPlayer or EdictofPlayer" ?

i was asking if it would return the same as it would in es since idk if es gets it as a string to then look into the flags and see if player is in the air or on ground ? :)
Yes, I believe that would be the equivalent. If you are only getting that one property, there would be no reason to get an EasyPlayer instance. If you plan on getting/setting other properties, or doing other things with the player, it would be beneficial to get the EasyPlayer instance, as it can do a lot of other things for you.

Satoon

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 8 guests