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

Help About A Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Creasy
New Member
Join Date: Jun 2015
Location: In The Hell :O
Old 06-05-2015 , 10:06   Help About A Plugin
Reply With Quote #1

Hi all
I am beginner In the Make Plugin
i want make plugin for disable extra items for some classes but get errors
Its My Plugin And Has Error

PHP Code:
#include < amxmodx >  

    #include <zp50_class_sniper>
    #include <zp50_class_survivor>
    #include <zp50_class_plasma> 
    #include <zp50_class_knifer>
    #include <zp50_class_dragon>  
    #include <zp50_class_assassin>  
    #include <zp50_class_nemesis> 
    #include < zp50_items > 

#define PLUGIN "[ZP] Addon: Disable Items In Classes"  
#define VERSION "1.0"  
#define AUTHOR "CreasY"

public plugin_init( ) {  
    
register_pluginPLUGINVERSIONAUTHOR )   
}  

public 
zp_fw_items_select_pre(iditemid) {  
    if ( 
zp50_class_sniper
    
|| zp50_class_survivor
    
|| zp50_class_plasma
    
|| zp50_class_knifer
    
|| zp50_class_dragon
    
|| zp50_class_assassin
    
|| zp50_class_nemesis) {
        return 
ZP_ITEM_DONT_SHOW;          
    }  
    return 
ZP_ITEM_AVAILABLE;  

what's the problem?
help me plz

Last edited by Creasy; 06-06-2015 at 05:48.
Creasy is offline
being noob
Senior Member
Join Date: Jan 2012
Location: Hindustan!!
Old 06-06-2015 , 07:10   Re: Help About A Plugin
Reply With Quote #2

well, i dont remember zombie plague now. but i guess you are checking it improperly.
open all the include files you have included in your code and find the proper way to get whether the id is of that given class or not(.inc files).

e.g., To check the id is nemesis -

Quote:
if( zp_class_nemesis_get(id))
{
//do what you are trying to do here with that id
}
in a similar way check other classes.
__________________
<3<3
being noob is offline
Old 06-06-2015, 08:14
Creasy
This message has been deleted by Creasy.
being noob
Senior Member
Join Date: Jan 2012
Location: Hindustan!!
Old 06-06-2015 , 09:02   Re: Help About A Plugin
Reply With Quote #3

PHP Code:
#include < amxmodx >  

    #include <zp50_class_sniper>
    #include <zp50_class_survivor>
    #include <zp50_class_plasma> 
    #include <zp50_class_knifer>
    #include <zp50_class_dragon>  
    #include <zp50_class_assassin>  
    #include <zp50_class_nemesis> 
    #include < zp50_items > 


#define PLUGIN "[ZP] Addon: Disable Items In Classes"  
#define VERSION "1.0"  
#define AUTHOR "CreasY"

public plugin_init( ) {  
    
register_pluginPLUGINVERSIONAUTHOR )   
}  

public 
zp_fw_items_select_pre(iditemid) {  
    if ( 
zp_class_nemesis_get(id) || zp_class_survivor_get(id) || zp_class_sniper_get(id) || zp_class_assassin_get(id)) // this are included in their include files such as zp50_class_sniper.inc etc. if you had read all .inc files you wouldn't make mistake. you can find this files in addons\amxmodx\scripting\include . read all include files you are including at the start of the program. try to understand them. and include other natives such as dragon and knifer and other things you want
   
{
        return 
ZP_ITEM_DONT_SHOW;          
    }  
    return 
ZP_ITEM_AVAILABLE;  

__________________
<3<3
being noob is offline
Old 06-06-2015, 09:53
Creasy
This message has been deleted by Creasy.
Depresie
Veteran Member
Join Date: Nov 2013
Old 06-13-2015 , 17:05   Re: Help About A Plugin
Reply With Quote #4

you have to put that in every extra item you want to disable..
also if you run zp 5.0.8 with zpa compatibility, you could use zpa natives, and put ZP_TEAM_ZOMBIE / ZP_TEAM_HUMAN
Code:
public zp_fw_items_select_pre(id, itemid) {   
    if ( zp_class_nemesis_get(id) || zp_class_survivor_get(id) || zp_class_sniper_get(id) || zp_class_assassin_get(id)) // this are included in their include files such as zp50_class_sniper.inc etc. if you had read all .inc files you wouldn't make mistake. you can find this files in addons\amxmodx\scripting\include . read all include files you are including at the start of the program. try to understand them. and include other natives such as dragon and knifer and other things you want 
   { 
        return ZP_ITEM_DONT_SHOW;           
    }   
    return ZP_ITEM_AVAILABLE;   
}  
Depresie 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 19:58.


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