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

need fixing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yamin
BANNED
Join Date: Jan 2012
Location: Sharjah
Old 05-26-2012 , 13:21   need fixing
Reply With Quote #1

there is no errors but this plugin doesn't works when anyone activates
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "yamin"

new g_curwep,soloid
new bool:lock,bool:solorun
new item

public plugin_init() {
    
register_concmd("amx_solo""admin_solo"ADMIN_MAP)
    
register_clcmd("usp","HandleCmd")

    
register_event("CurWeapon","fw_CurWeapon","b","1=1")
    
g_curwep get_user_msgid("CurWeapon")
    
    
register_logevent("fw_RoundEnd",2,"1=Round_End")
}

public 
admin_solo(id,level,cid
{
    if(
lock||solorun)
        return
    
    
solorun true
    lock 
true
    soloid 
id
    
    console_print
(id"You have activated Solo Gunner Mode")
    
    if (
get_user_flags(id) & ADMIN_BAN)
    {
        
give_item(id"usp")
                
cs_set_weapon_ammo(item24);
        new 
name [32]
        
get_user_name(id,name,31)
        
client_print(0,print_chat,"*** Solo Gunner is activated by Admin %s.",name)

    }
    if (
get_user_flags(id) & ADMIN_LEVEL_H)
    {
        
give_item(id"usp")
                
cs_set_weapon_ammo(item24);
        new 
name [32]
        
get_user_name(id,name,31)
        
client_print(0,print_chat,"*** Solo Gunner is activated by Golden Player %s",name)
    }
    if (
get_user_flags(id) & ADMIN_LEVEL_G)
    {
        
give_item(id"usp")
                
cs_set_weapon_ammo(item24);
        new 
name [32]
        
get_user_name(id,name,31)
        
client_print(0,print_chat,"*** Solo Gunner is activated by Silver Player %s",name)
    }
}

public 
fw_RoundEnd(){
    if(
solorun)
        
solorun false
}

public 
fw_CurWeapon(id){
    if (!
is_user_alive(id))
        return
        
    if(!
solorun)
        return
    
    if (
id!=soloid&&!((1<<read_data(2))&(1<<CSW_KNIFE))){
        
engclient_cmd(id"weapon_knife")
                
client_cmd(id"drop")
        
emessage_begin(MSG_ONE,g_curwep,_,id)
        
ewrite_byte(1)
        
ewrite_byte(CSW_KNIFE)
        
ewrite_byte(-1)
        
emessage_end()
    }else if(
id==soloid&&!((1<<read_data(2))&(1<<CSW_USP))){
        
engclient_cmd(id"weapon_knife")
        
emessage_begin(MSG_ONE,g_curwep,_,id)
        
ewrite_byte(1)
        
ewrite_byte(CSW_USP)
        
ewrite_byte(-1)
        
emessage_end()
    }

yamin is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-26-2012 , 13:28   Re: need fixing
Reply With Quote #2

HandleCmd public function is missing, therefore, any lines below register_clcmd("usp","HandleCmd") in plugin_init are ignored.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
yamin
BANNED
Join Date: Jan 2012
Location: Sharjah
Old 05-27-2012 , 07:48   Re: need fixing
Reply With Quote #3

can you add?
yamin is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-27-2012 , 12:52   Re: need fixing
Reply With Quote #4

No, your code is full of errors, if you want to learn, let's search and begin with simple plugins.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
yamin
BANNED
Join Date: Jan 2012
Location: Sharjah
Old 05-27-2012 , 14:23   Re: need fixing
Reply With Quote #5

let's?
can you say me what exactly should i learn to make this plugin?
and plugins like topknife

Last edited by yamin; 05-27-2012 at 14:25.
yamin is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-27-2012 , 14:29   Re: need fixing
Reply With Quote #6

You need to learn from the begining.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
yamin
BANNED
Join Date: Jan 2012
Location: Sharjah
Old 05-28-2012 , 06:20   Re: need fixing
Reply With Quote #7

give me the link from where i will start
yamin 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 12:09.


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