Might still be prudent to check if the netprop exists in the first place, at the expense of using OnPluginStart too (unless you don't mind checking it's availability every use). Also handles FindSendPropInfo returning 0 too, though this code could be used for any boolean netprop, mind you.
PHP Code:
new bool:g_bIsAvailable;
public OnPluginStart()
{
g_bIsAvailable = (FindSendPropInfo("CBasePlayer", "m_bIsControllingBot") > 0);
}
bool:IsPlayerControllingBot(const client)
{
return (g_bIsAvailable && GetEntProp(client, Prop_Send, "m_bIsControllingBot") == 1);
}
__________________