Raised This Month: $32 Target: $400
 8% 

Why ENT is exits after AcceptEntityInput()?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 12-21-2017 , 05:08   Why ENT is exits after AcceptEntityInput()?
Reply With Quote #1

Code:
stock bool RemAnyPlayerSlot(int client, int wep, bool bIsRefUsed = false) {     if(!IsValidPlayer(client))         return false;         if(bIsRefUsed)         wep = RefToEnt(wep);         if(!Weapon_IsValid(wep))         return false;         if(!Entity_GetOwner(EntToRef(wep), client))         return false;         if(RemovePlayerItem(client, wep))         AcceptEntityInput( wep, "Kill" );         else if(Weapon_IsValid(wep))     {         SDKHooks_DropWeapon(client, wep);                 if(IsValidEntity(wep))             AcceptEntityInput( wep, "Kill" );     }         PrintToServer("[%i] %i/%i", wep, IsValidEdict(wep), Weapon_IsValid(wep) );     return !Weapon_IsValid(wep); // must be return true }

Code:
[153] 1/1
[155] 1/1
[188] 1/1
[190] 1/1
Why weapon after removing is exists? Where is logic?)

Last edited by ZASTRELIS; 12-21-2017 at 10:21.
ZASTRELIS is offline
xFlane
AlliedModders Donor
Join Date: Nov 2017
Location: Israel
Old 12-21-2017 , 11:55   Re: Why ENT is exits after AcceptEntityInput()?
Reply With Quote #2

AcceptEntityInput( wep, "Kill" ), lets the game engine to delete the entity instead of sourcemod,
and as far as i know this happens at the next game frame.
xFlane is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 12-21-2017 , 21:30   Re: Why ENT is exits after AcceptEntityInput()?
Reply With Quote #3

Quote:
Originally Posted by xFlane View Post
AcceptEntityInput( wep, "Kill" ), lets the game engine to delete the entity instead of sourcemod,
and as far as i know this happens at the next game frame.
ok, thx
ZASTRELIS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode