AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem on my plugin (https://forums.alliedmods.net/showthread.php?t=245316)

Eviatar Mor 07-31-2014 09:05

Problem on my plugin
 
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.

HamletEagle 07-31-2014 11:34

Re: Problem on my plugin
 
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.

Eagle07 07-31-2014 20:36

Re: Problem on my plugin
 
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
}


:arrow:
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
}



Eviatar Mor 08-01-2014 07:47

Re: Problem on my plugin
 
Quote:

Originally Posted by Eagle07 (Post 2177020)
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
}


:arrow:
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...


All times are GMT -4. The time now is 12:56.

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