This is my function to create fake player which I have found somewhere in this forum:
PHP Code:
new bot_id = engfunc(EngFunc_CreateFakeClient, "Fake_player")
new ptr[128]
dllfunc(DLLFunc_ClientConnect, bot_id, "Fake_player", "127.0.0.1", ptr)
dllfunc(DLLFunc_ClientPutInServer, bot_id)
cs_set_user_team(bot_id, CS_TEAM_CT, CS_CT_URBAN)
set_pev(bot_id, pev_effects, (pev(bot_id, pev_effects) | 128))
set_pev(bot_id, pev_solid, 0)
dllfunc(DLLFunc_Spawn, bot_id)
The problem is, that when I create and put bot to server, he is invisible until I attack him. And when he is visible, he is not on floor, he is like flying.
I have function in my plugin which saves position of player and after few seconds it will create fake player on previous original player position. So I need to create there fake player which will be standing (not moving/flying..etc) as normal player.
Thnx.