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

Help / Support Error in Plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OST_Aloe
Junior Member
Join Date: Apr 2019
Location: Russia
Old 04-14-2019 , 07:52   Error in Plugins
Reply With Quote #1

Hi, my English is bad, so I don’t understand everything.
I get errors when compiling the plugin.
Quote:
zp_zclass_assasin.sma(5) : error 041: invalid ellipsis, array size is not known
zp_zclass_assasin.sma(43) : error 017: undefined symbol "register_plugin"
zp_zclass_assasin.sma(44) : error 017: undefined symbol "register_forward"
zp_zclass_assasin.sma(45) : error 017: undefined symbol "register_clcmd"
zp_zclass_assasin.sma(51) : error 017: undefined symbol "zp_register_zombie_class"
zp_zclass_assasin.sma(5 : error 017: undefined symbol "zp_get_user_zombie_class"
zp_zclass_assasin.sma(60) : error 017: undefined symbol "get_user_health"
zp_zclass_assasin.sma(61) : error 017: undefined symbol "set_pev"
zp_zclass_assasin.sma(62) : warning 204: symbol is assigned a value that is never used: "ZM_HP"
zp_zclass_assasin.sma(63) : error 017: undefined symbol "zp_get_user_zombie_class"
zp_zclass_assasin.sma(67) : error 017: undefined symbol "zp_get_user_zombie"
zp_zclass_assasin.sma(71) : error 017: undefined symbol "zp_get_user_nemesis"
zp_zclass_assasin.sma(75) : error 017: undefined symbol "set_pev"
zp_zclass_assasin.sma(76) : error 017: undefined symbol "client_cmd"
zp_zclass_assasin.sma(76) : error 017: undefined symbol "e"
zp_zclass_assasin.sma(76) : error 017: undefined symbol "USE"
zp_zclass_assasin.sma(76) : fatal error 107: too many error messages on one line
Код:
new MODEL_NUM[8][0] =
{
{
122, ...
},
{
122, ...
},
{
122, ...
},
{
122, ...
},
{
122, ...
},
{
122, ...
},
{
122, ...
},
{
122, ...
}
};
new zclass_name[15] =
{
208, 144, 209, 129, 209, 129, 208, 176, 209, 129, 208, 184, 208, 189, 0
};
new zclass_info[21] =
{
208, 161, 208, 186, 209, 128, 209, 139, 209, 130, 208, 189, 208, 190, 209, 129, 209, 130, 209, 140, 0
};
new zclass_clawmodel[26] =
{
122, 111, 109, 98, 105, 101, 115, 47, 104, 97, 110, 100, 115, 95, 97, 115, 115, 97, 115, 105, 110, 46, 109, 100, 108, 0
};
new g_zclass_spy;
public plugin_init()
{
register_plugin("[ZP] Class : Assasin", "1.2.2", "NullWarez");
register_forward(104, "fm_PlayerPreThink", MODEL_NUM);
register_clcmd("zp_drop_gun", "drop_gun", -1, 1108, -1);
return 0;
}

public plugin_precache()
{
g_zclass_spy = zp_register_zombie_class(zclass_name, zclass_info, MODEL_NUM[random(], zclass_clawmodel, "zp_human_man_1", 300, 1060320051, 1080033280);
return 0;
}

public zp_user_infected_post(player, infector)
{
new var1;
if (g_zclass_spy == zp_get_user_zombie_class(infector) && zp_get_user_zombie(infector))
{
new ZM_HP = get_user_health(infector) - 1500;
set_pev(infector, 41, float(ZM_HP));
}
if (g_zclass_spy != zp_get_user_zombie_class(player))
{
return 0;
}
if (!zp_get_user_zombie(player))
{
return 0;
}
if (zp_get_user_nemesis(player))
{
return 0;
}
set_pev(player, 77, 4);
client_cmd(player, "bind \"e\" \"+USE;zp_drop_gun\"");
new usp_clip = give_item(player, "weapon_usp");
cs_set_weapon_ammo(usp_clip, 3);
set_task(1036831949, "AddHP", player, 1292, MODEL_NUM, 1296, MODEL_NUM);
return 0;
}

public fm_PlayerPreThink(id)
{
if (!is_user_alive(id))
{
return 0;
}
if (g_zclass_spy != zp_get_user_zombie_class(id))
{
return 0;
}
if (!zp_get_user_zombie(id))
{
return 0;
}
if (zp_get_user_nemesis(id))
{
return 0;
}
set_pev(id, 77, 4);
if (pev(id, 84) & 16384)
{
set_pev(id, 40, 0);
return 0;
}
set_pev(id, 40, 1132396544);
return 0;
}

public drop_gun(id)
{
if (!is_user_alive(id))
{
return 0;
}
if (!zp_get_user_zombie(id))
{
return 0;
}
if (!g_zclass_spy == zp_get_user_zombie_class(id))
{
return 0;
}
if (zp_get_user_nemesis(id))
{
return 0;
}
new body;
new t;
get_user_aiming(id, t, body, 9999);
if (!is_user_alive(t))
{
return 0;
}
if (zp_get_user_zombie(t))
{
return 0;
}
if (zp_get_user_survivor(t))
{
return 0;
}
new P1_origin[3];
new P2_origin[3];
get_user_origin(id, P1_origin, MODEL_NUM);
get_user_origin(t, P2_origin, MODEL_NUM);
new distance = get_distance(P1_origin, P2_origin);
if (distance >= 120)
{
return 0;
}
drop_current_weapon(t);
return 0;
}

drop_current_weapon(id)
{
static ammo;
static clip;
static weapon_id;
weapon_id = get_user_weapon(id, clip, ammo);
new var1;
if (1 << weapon_id & 1509749160 || 1 << weapon_id & 67308546)
{
static weapon_name[32];
get_weaponname(weapon_id, weapon_name, 31);
engclient_cmd(id, "drop", weapon_name, 1460);
}
return 0;
}

public AddHP(id)
{
if (!zp_get_user_zombie(id))
{
return 0;
}
if (!g_zclass_spy == zp_get_user_zombie_class(id))
{
return 0;
}
if (zp_get_user_nemesis(id))
{
return 0;
}
if (!is_user_alive(id))
{
return 0;
}
new HP = get_user_health(id);
new max_HP = zp_get_zombie_maxhealth(id);
if (max_HP > HP +
{
set_user_health(id, HP + ;
}
if (8 > max_HP - HP)
{
set_user_health(id, max_HP);
}
set_task(1065353216, "AddHP", id, 1292, MODEL_NUM, 1296, MODEL_NUM);
return 0;
}
OST_Aloe is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 04-14-2019 , 09:43   Re: Error in Plugins
Reply With Quote #2

where did u find this code?
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video below to see blind grenade for zombies

https://www.youtube.com/watch?v=ORC7ZmoaipQ

Look at the video below to see Zombie Hide And Seek mode

https://www.youtube.com/watch?v=xpyYb65EgGs
Krtola is offline
Send a message via Skype™ to Krtola
OST_Aloe
Junior Member
Join Date: Apr 2019
Location: Russia
Old 04-14-2019 , 15:33   Re: Error in Plugins
Reply With Quote #3

Quote:
Originally Posted by Krtola View Post
where did u find this code?
Why are you so interested?
OST_Aloe is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 04-14-2019 , 17:52   Re: Error in Plugins
Reply With Quote #4

No specific reason. I just want to see original version. It looks to me that you edit a lot and make a lot mistakes.
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video below to see blind grenade for zombies

https://www.youtube.com/watch?v=ORC7ZmoaipQ

Look at the video below to see Zombie Hide And Seek mode

https://www.youtube.com/watch?v=xpyYb65EgGs
Krtola is offline
Send a message via Skype™ to Krtola
OST_Aloe
Junior Member
Join Date: Apr 2019
Location: Russia
Old 04-14-2019 , 18:29   Re: Error in Plugins
Reply With Quote #5

Quote:
Originally Posted by Krtola View Post
I just want to see original version. It looks to me that you edit a lot and make a lot mistakes.
I did not change this code. Just decompiled the plugin as it did not work.
Can you check this plugin?

Last edited by OST_Aloe; 04-14-2019 at 18:32.
OST_Aloe is offline
Old 04-14-2019, 18:30
OST_Aloe
This message has been deleted by OST_Aloe.
OST_Aloe
Junior Member
Join Date: Apr 2019
Location: Russia
Old 04-14-2019 , 18:34   Re: Error in Plugins
Reply With Quote #6

Here is the plug-in.
Attached Files
File Type: amxx zp_zclass_assasin.amxx (5.2 KB, 97 views)
OST_Aloe is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 04-14-2019 , 18:41   Re: Error in Plugins
Reply With Quote #7

Amxx decompiling method will always give you bad code.
All I can do is try to find sma of that class.
Code from first post= it looks to me like deimos class. That class skill is to drop weapon from human hand.
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video below to see blind grenade for zombies

https://www.youtube.com/watch?v=ORC7ZmoaipQ

Look at the video below to see Zombie Hide And Seek mode

https://www.youtube.com/watch?v=xpyYb65EgGs

Last edited by Krtola; 04-14-2019 at 18:45.
Krtola is offline
Send a message via Skype™ to Krtola
OST_Aloe
Junior Member
Join Date: Apr 2019
Location: Russia
Old 04-14-2019 , 19:08   Re: Error in Plugins
Reply With Quote #8

Quote:
Originally Posted by Krtola View Post
Amxx decompiling method will always give you bad code.
All I can do is try to find sma of that class.
Code from first post= it looks to me like deimos class. That class skill is to drop weapon from human hand.
Here the code will probably be better
ttps://c-s.net.ua/forum/topic88833.html
OST_Aloe is offline
OST_Aloe
Junior Member
Join Date: Apr 2019
Location: Russia
Old 04-15-2019 , 02:46   Re: Error in Plugins
Reply With Quote #9

Quote:
Originally Posted by Krtola View Post
I just want to see original version. It looks to me that you edit a lot and make a lot mistakes.
Errors
Quote:
zp_zclass_assasin.sma(2 : error 017: undefined symbol "register_plugin"
zp_zclass_assasin.sma(29) : error 017: undefined symbol "register_forward"
zp_zclass_assasin.sma(29) : warning 215: expression has no effect
zp_zclass_assasin.sma(29) : warning 215: expression has no effect
zp_zclass_assasin.sma(29) : error 001: expected token: ";", but found ")"
zp_zclass_assasin.sma(29) : error 029: invalid expression, assumed zero
zp_zclass_assasin.sma(29) : fatal error 107: too many error messages on one line
Here's a better code
Code:
new MODEL_NUM[8][] =
{
    "zp_human_woman_1",
    "zp_human_man_1",
    "zp_human_woman_2",
    "zp_human_man_2",
    "zp_human_woman_3",
    "zp_human_man_3",
    "zp_human_woman_4",
    "zp_human_woman_5"
};
new zclass_name[15] =
{
    208, 144, 209, 129, 209, 129, 208, 176, 209, 129, 208, 184, 208, 189, 0
}
new zclass_info[21] =
{
    208, 161, 208, 186, 209, 128, 209, 139, 209, 130, 208, 189, 208, 190, 209, 129, 209, 130, 209, 140, 0
}
new zclass_clawmodel[26] =
{
    122, 111, 109, 98, 105, 101, 115, 47, 104, 97, 110, 100, 115, 95, 97, 115, 115, 97, 115, 105, 110, 46, 109, 100, 108, 0
}
new g_zclass_spy;
 
public plugin_init()
{
    register_plugin("[ZP] Class : Assasin", "1.2.2", "NullWarez");
    register_forward(FM_PlayerPreThink, "fm_PlayerPreThink", 0);
    register_clcmd("zp_drop_gun", "drop_gun", -1, "", -1);
    return 0;
}
 
public plugin_precache()
{
    g_zclass_spy = zp_register_zombie_class(zclass_name, zclass_info, MODEL_NUM[random(8)][0][0], zclass_clawmodel, "zp_human_man_1", 300, 0.70/*1060320051*/, 3.50/*1080033280*/);
    return 0;
}
 
public zp_user_infected_post(player, infector)
{
    !!! Removed Phi
    if (g_zclass_spy == zp_get_user_zombie_class(infector) && zp_get_user_zombie(infector))
    {
        new ZM_HP = get_user_health(infector) - 1500;
        set_pev(infector, pev_health, float(ZM_HP));
    }
    if (g_zclass_spy != zp_get_user_zombie_class(player))
    {
        return 0;
    }
    if (!zp_get_user_zombie(player))
    {
        return 0;
    }
    if (zp_get_user_nemesis(player))
    {
        return 0;
    }
    set_pev(player, pev_rendermode, 4);
    client_cmd(player, "bind \"e\" \"+USE;zp_drop_gun\"");
    new usp_clip = give_item(player, "weapon_usp");
    cs_set_weapon_ammo(usp_clip, 3);
    set_task(0.10, "AddHP", player, "", 0, "", 0);
    return 0;
}
 
public fm_PlayerPreThink(id)
{
    if (!is_user_alive(id))
    {
        return 0;
    }
    if (g_zclass_spy != zp_get_user_zombie_class(id))
    {
        return 0;
    }
    if (!zp_get_user_zombie(id))
    {
        return 0;
    }
    if (zp_get_user_nemesis(id))
    {
        return 0;
    }
    set_pev(id, pev_rendermode, 4);
    if (pev(id, pev_flags) & 16384)
    {
        set_pev(id, pev_renderamt, 0);
        return 0;
    }
    set_pev(id, pev_renderamt, 255.00/*1132396544*/);
    return 0;
}
 
public drop_gun(id)
{
    if (!is_user_alive(id))
    {
        return 0;
    }
    if (!zp_get_user_zombie(id))
    {
        return 0;
    }
    if (!g_zclass_spy == zp_get_user_zombie_class(id))
    {
        return 0;
    }
    if (zp_get_user_nemesis(id))
    {
        return 0;
    }
    new body = 0;
    new t = 0;
    get_user_aiming(id, t, body, 9999);
    if (!is_user_alive(t))
    {
        return 0;
    }
    if (zp_get_user_zombie(t))
    {
        return 0;
    }
    if (zp_get_user_survivor(t))
    {
        return 0;
    }
    new P1_origin[3];
    new P2_origin[3];
    get_user_origin(id, P1_origin, 0);
    get_user_origin(t, P2_origin, 0);
    new distance = get_distance(P1_origin, P2_origin);
    if (distance >= 120)
    {
        return 0;
    }
    drop_current_weapon(t);
    return 0;
}
 
drop_current_weapon(id)
{
    !!! Removed Phi
    if (1 << weapon_id & 8899675000000000.00/*1509749160*/ || 1 << weapon_id & 67308546)
    {
        static weapon_name[32];
        get_weaponname(weapon_id, "", 31);
        engclient_cmd(id, "drop", "", "");
    }
    return 0;
}
 
public AddHP(id)
{
    !!! Removed Phi
    if (!zp_get_user_zombie(id))
    {
        return 0;
    }
    if (!g_zclass_spy == zp_get_user_zombie_class(id))
    {
        return 0;
    }
    if (zp_get_user_nemesis(id))
    {
        return 0;
    }
    if (!is_user_alive(id))
    {
        return 0;
    }
    new HP = get_user_health(id);
    new max_HP = zp_get_zombie_maxhealth(id);
    if (max_HP > HP + 8)
    {
        set_user_health(id, HP + 8);
    }
    if (8 > max_HP - HP)
    {
        set_user_health(id, max_HP);
    }
    set_task(1.00, "AddHP", id, "", 0, "", 0);
    return 0;
}

Last edited by OST_Aloe; 04-15-2019 at 02:47.
OST_Aloe is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 04-15-2019 , 06:21   Re: Error in Plugins
Reply With Quote #10

I do not know how to fix this. When this error is corrected, then new ones appear.
Maybe this plugin need some special inc file.

https://www.dodaj.rs/image/cpJtm
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video below to see blind grenade for zombies

https://www.youtube.com/watch?v=ORC7ZmoaipQ

Look at the video below to see Zombie Hide And Seek mode

https://www.youtube.com/watch?v=xpyYb65EgGs
Krtola is offline
Send a message via Skype™ to Krtola
Reply


Thread Tools
Display Modes

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 09:29.


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