View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-05-2016 , 11:31   Re: Deathrun: CTSafe buttons (prevent CTs from activating traps)
Reply With Quote #6

Using entity id is totally unreliable, because if another entity is spawned it could break the code(since index will be changed). Also using multiple files is more organized, so don't change.

PHP Code:
new g_szDirectory[512], g_szFilename[512
Way too much, 256 would be just enough.

PHP Code:
new iEnt find_ent_by_model(-1szClassszModel
Create iEnt var before looping.

PHP Code:
fclose(iFilePointer
should be inside if(iFilePointer) check.

Since pev_mins and pev_maxs give you float values use EngFunc_WriteCoord instead of converting float to int.
__________________

Last edited by HamletEagle; 07-05-2016 at 11:44.
HamletEagle is online now