Raised This Month: $ Target: $400
 0% 

Problem on my plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Eviatar Mor
Senior Member
Join Date: Jun 2014
Location: israel
Old 07-31-2014 , 09:05   Problem on my plugin
Reply With Quote #1

hey,
i had build this plugin:
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

new g_bDGL33 ]
new 
g_bAWP33 ]
new 
g_bKNIFE33 ]
new 
szName33 ]
new 
again;

new const 
pref[] = "[LoL Models - HNR]"
    
public plugin_init() {
    
register_event("CurWeapon""DGL_Weapon""be""1=1")
    
register_event("CurWeapon""AWP_Weapon""be""1=1")
    
register_event("CurWeapon""Knife_Weapon""be""1=1")
    
register_logevent("logevent_round"2"1=Round_Start"
    
register_logevent("logevent_round"2"1=Round_End"
    
register_clcmd("say /skins","NormalSkins")
    
register_clcmd("say /models","NormalSkins")
    
register_clcmd("say /model","NormalSkins")
    
register_clcmd("say /skinim","NormalSkins")
    
register_clcmd("say /modelim","NormalSkins")
    
register_clcmd("say /normal","NormalSkins")
    
register_clcmd("say /normalskins","NormalSkins")
    
register_clcmd("say /turn","NormalSkins")
    }
public 
plugin_precache(){
    
precache_model("models/lolmodels/v_deagle.mdl")
    
precache_model("models/lolmodels/p_deagle.mdl")
    
precache_model("models/lolmodels/v_admindeagle.mdl")
    
precache_model("models/lolmodels/p_admindeagle.mdl")
    
precache_model("models/lolmodels/v_awp.mdl")
    
precache_model("models/lolmodels/p_awp.mdl")
    
precache_model("models/lolmodels/v_adminawp.mdl")
    
precache_model("models/lolmodels/p_adminawp.mdl")
    
precache_model("models/lolmodels/v_knife.mdl")
    
precache_model("models/lolmodels/p_knife.mdl")
}

public 
DGL_Weapon(id){
    if (
g_bDGL id ] && read_data(2) == CSW_DEAGLE){
        
set_pev(idpev_viewmodel2"models/lolmodels/v_deagle.mdl")
        
set_pev(idpev_weaponmodel2"models/lolmodels/p_deagle.mdl")
    }
    return 
PLUGIN_CONTINUE

public 
AWP_Weapon(id){
    if (
g_bAWP id ] && read_data(2) == CSW_AWP){
        
set_pev(idpev_viewmodel2"models/lolmodels/v_awp.mdl")
        
set_pev(idpev_weaponmodel2"models/lolmodels/p_awp.mdl")
    }
    return 
PLUGIN_CONTINUE

public 
KNIFE_Weapon(id){
    if (
g_bKNIFE id ] && read_data(2) == CSW_KNIFE){
        
set_pev(idpev_viewmodel2"models/lolmodels/v_knife.mdl")
        
set_pev(idpev_weaponmodel2"models/lolmodels/p_knife.mdl")
    }
    return 
PLUGIN_CONTINUE

public 
NormalSkins (id){
    if(
again)
    {
    
g_bDGLid ] = false
    g_bKNIFE
id ] = false
    g_bAWP
id ] = false
    
    get_user_name
(idszNamecharsmax(szName))
         
client_print(idprint_chat"%s Disabled Skins For HNR"szName
}
    else
    {
    
g_bDGLid ] = true
    g_bKNIFE
id ] = true
    g_bAWP
id ] = true
    get_user_name
(idszNamecharsmax(szName))
         
client_print(idprint_chat"%s Enabled Skins For HNR"szName
}
}
public 
logevent_round(client)
{
    
client_print(clientprint_chat"%d This Mod Created BY /A/ & SerMajor"pref)    

the problem i got is that i have 2 warnings.
Eviatar Mor is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-31-2014 , 11:34   Re: Problem on my plugin
Reply With Quote #2

Use descriptive topic titles, just posting "Problem on my plugin" doesn't help. About this two warnings, you don't need to care about them. You just have to indent your code.

Last edited by HamletEagle; 07-31-2014 at 11:34.
HamletEagle is offline
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 07-31-2014 , 20:36   Re: Problem on my plugin
Reply With Quote #3

PHP Code:
public NormalSkins (id){
    if(
again)
    {
    
g_bDGLid ] = false
    g_bKNIFE
id ] = false
    g_bAWP
id ] = false
    
    get_user_name
(idszNamecharsmax(szName))
         
client_print(idprint_chat"%s Disabled Skins For HNR"szName
}
    else
    {
    
g_bDGLid ] = true
    g_bKNIFE
id ] = true
    g_bAWP
id ] = true
    get_user_name
(idszNamecharsmax(szName))
         
client_print(idprint_chat"%s Enabled Skins For HNR"szName
}


PHP Code:
public NormalSkins (id){
    if(
again)
    {
    
g_bDGLid ] = false
    g_bKNIFE
id ] = false
    g_bAWP
id ] = false
    
    get_user_name
(idszNamecharsmax(szName))
    
client_print(idprint_chat"%s Disabled Skins For HNR"szName
}
    else
    {
    
g_bDGLid ] = true
    g_bKNIFE
id ] = true
    g_bAWP
id ] = true
    get_user_name
(idszNamecharsmax(szName))
    
client_print(idprint_chat"%s Enabled Skins For HNR"szName
}

__________________
Eagle07 is offline
Eviatar Mor
Senior Member
Join Date: Jun 2014
Location: israel
Old 08-01-2014 , 07:47   Re: Problem on my plugin
Reply With Quote #4

Quote:
Originally Posted by Eagle07 View Post
PHP Code:
public NormalSkins (id){
    if(
again)
    {
    
g_bDGLid ] = false
    g_bKNIFE
id ] = false
    g_bAWP
id ] = false
    
    get_user_name
(idszNamecharsmax(szName))
         
client_print(idprint_chat"%s Disabled Skins For HNR"szName
}
    else
    {
    
g_bDGLid ] = true
    g_bKNIFE
id ] = true
    g_bAWP
id ] = true
    get_user_name
(idszNamecharsmax(szName))
         
client_print(idprint_chat"%s Enabled Skins For HNR"szName
}


PHP Code:
public NormalSkins (id){
    if(
again)
    {
    
g_bDGLid ] = false
    g_bKNIFE
id ] = false
    g_bAWP
id ] = false
    
    get_user_name
(idszNamecharsmax(szName))
    
client_print(idprint_chat"%s Disabled Skins For HNR"szName
}
    else
    {
    
g_bDGLid ] = true
    g_bKNIFE
id ] = true
    g_bAWP
id ] = true
    get_user_name
(idszNamecharsmax(szName))
    
client_print(idprint_chat"%s Enabled Skins For HNR"szName
}

eagle thank you but i dont know why i cant see the models...
Eviatar Mor 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:56.


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