Raised This Month: $51 Target: $400
 12% 

[L4D2]Clear drop items


Post New Thread Reply   
 
Thread Tools Display Modes
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 01-10-2021 , 21:20   Re: [L4D2]Clear drop items
Reply With Quote #21

You could take a look at here line 179
How to use EntRefToEntIndex correctly.

PHP Code:
if(entity && (entity EntRefToEntIndex(entity)) != INVALID_ENT_REFERENCE)
{
    if(
IsValidEntity(entity))
    {
    
    }

__________________

Last edited by HarryPotter; 01-10-2021 at 21:23.
HarryPotter is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 12-02-2021 , 05:41   Re: [L4D2]Clear drop items
Reply With Quote #22

Quote:
Originally Posted by Balloons View Post
From HarryPotter's version
My version?
Pretty sure these is no function called "Timer_LevelupAnimation" in my scrpit.
__________________

Last edited by HarryPotter; 12-02-2021 at 05:43.
HarryPotter is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 12-11-2021 , 18:32   Re: [L4D2]Clear drop items
Reply With Quote #23

looks this cant handle weapon created by CreateEntityByName ?
like this drop plugin https://forums.alliedmods.net/showthread.php?t=158962
can i way to solution?
__________________
NoroHime is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 12-13-2021 , 04:12   Re: [L4D2]Clear drop items
Reply With Quote #24

Quote:
Originally Posted by NoroHime View Post
looks this cant handle weapon created by CreateEntityByName ?
like this drop plugin https://forums.alliedmods.net/showthread.php?t=158962
can i way to solution?
In my version, I provide native "Timer_Delete_Weapon", you can use that in other script.

PHP Code:
native int Timer_Delete_Weapon(int entity); 
PHP Code:
int entity CreateEntityByName(...);
...
Timer_Delete_Weapon(entity); 
__________________
HarryPotter is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 12-13-2021 , 16:48   Re: [L4D2]Clear drop items
Reply With Quote #25

how can i reference it before using?
error 017: undefined symbol "Timer_Delete_Weapon"
i just known i cant #include it im sourcepawn noob
__________________
NoroHime is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 12-16-2021 , 06:03   Re: [L4D2]Clear drop items
Reply With Quote #26

Quote:
Originally Posted by NoroHime View Post
how can i reference it before using?
error 017: undefined symbol "Timer_Delete_Weapon"
i just known i cant #include it im sourcepawn noob
1. download my version .smx file

2. write the code, take your l4d_drop.sp as example
PHP Code:
native int Timer_Delete_Weapon(int entity); //register native function from clear_weapon_drop.sp

public Plugin:myinfo 
{
    
name "L4D & L4D2 item drop",
    
author "Pan Xiaohai & Frustian & kwski43",
    
description "<- Description ->",
    
version "1.1",
    
url "<- URL ->"


PHP Code:
        new index CreateEntityByName(weapon); 
        ...
        ...
        ...

        
Timer_Delete_Weapon(index); //call function 
3. compile and done.
__________________

Last edited by HarryPotter; 12-16-2021 at 06:04.
HarryPotter is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 12-16-2021 , 14:46   Re: [L4D2]Clear drop items
Reply With Quote #27

wow, it is works, i finally known native function is call in runtime rather than compile reference,thanks you
__________________
NoroHime 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 17:00.


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