Crash when creating a bot
Hello, i was trying to create a simple BOT with the following code.
PHP Code:
Some more info: Using AMXX 1.8.3 +dev5154, Metamod-P v1.21p37. |
Re: Crash when creating a bot
FL_FAKECLIENT this is not a spawn flag constants/values it doesnt go with pev_spawnflags, the ones that does go with it starts with prefix SF_
Try looking at some already existing plugins for how to correctly create a fake bot. |
Re: Crash when creating a bot
What? This code is from Bugsy's Aimbot Detection Plugin (https://forums.alliedmods.net/showthread.php?p=689045)
He even had problems with this before, here ( https://forums.alliedmods.net/showthread.php?p=768468 ) Also, if i remove them the game still crashes. |
Re: Crash when creating a bot
Try swaping the bot into a team.
The code looks fine. The crash might be not from that peice of code. If you still believe the crash is from this use log to file. As debug |
Re: Crash when creating a bot
Did as you requested with the same code, but changed everything to log_amx()
PHP Code:
Code:
L 06/22/2018 - 01:36:38: -------- Mapchange to bhm_novice -------- |
Re: Crash when creating a bot
After doing a clean install for the second time it started working, but now when i spawn the bot he is invisible.
PHP Code:
Neither option listed above worked. |
Re: Crash when creating a bot
Try running this line twice in a row:
ExecuteHamB( Ham_CS_RoundRespawn, g_iBotIndex ); // Tried I can't remember what exactly, but there's some issues when executing it just once, this might be one of them. |
Re: Crash when creating a bot
Tested, same happens, and i'm pretty sure you're talking about fun's spawn() function, because it used to have problems when spawning players (i'm not sure if it still does, but everyone says you should use ExecuteHam to spawn a player)
|
Re: Crash when creating a bot
I tried the exact code you last posted as the only plugin on my server and the bot is visible to me. Could the problem be somewhere else?
|
Re: Crash when creating a bot
Try giving him amodel and set an animation.
Can i ask whats the point of this? |
| All times are GMT -4. The time now is 12:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.