Raised This Month: $32 Target: $400
 8% 

error on a plugin for class menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrGarfield
Senior Member
Join Date: Feb 2013
Old 02-09-2019 , 09:25   error on a plugin for class menu
Reply With Quote #1

hello a friend passed me this sma, I would like the same for my mode jail a menu for prisoners and guardians but there is a mistake can you help me thank you.

Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <cstrike>
#pragma semicolon 1
#pragma ctrlchar '\'

new g_PlayersSpeed;

public __fatal_ham_error(Ham:id, HamError:err, String:reason[])
{
    !!! Removed Phi
    if (func != -1 && callfunc_begin_i(func, -1) == 1)
    {
        callfunc_push_int(id);
        callfunc_push_int(err);
        callfunc_push_str(reason, false);
        if (callfunc_end() == 1)
        {
            fail = 0;
        }
    }
    if (fail)
    {
        set_fail_state(reason);
    }
    return 0;
}

public plugin_init()
{
    register_plugin("Armes", "1.1a", "");
    RegisterHam(Ham_Spawn, "player", "PlayerSpawn", 1);
    g_PlayersSpeed = register_cvar("players_speed", "700", 0, 0.00);
    return 0;
}

public PlayerSpawn(id)
{
    if (is_user_alive(id))
    {
        strip_user_weapons(id);
        set_pdata_int(id, 116, 0, 5);
        give_item(id, "weapon_knife");
        switch (cs_get_user_team(id, 0))
        {
            case 1:
            {
                prisonnier(id);
            }
            case 2:
            {
                gardien(id);
            }
            default:
            {
            }
        }
    }
    return 0;
}

public gardien(id)
{
    new menu = menu_create("[Alias#`KraZy] Choisis ta classe de Garde", "gardien_menu", 0);
    menu_additem(menu, "\wMilitaire \y- \w[ \rM4 \w+ \rDeagle \w]", "1", 0, -1);
    menu_additem(menu, "\wSniper \y- \w[ \rAwp \w+ \rDeagle \w]", "2", 0, -1);
    menu_additem(menu, "\wRambo \y- \w[ \rMitrailleuse \w+ \rUsp \w+ \r30HP \w]", "3", 0, -1);
    menu_additem(menu, "\wGarde \y- \w[ \rAk47 \w+ \rDeagle \w]", "4", 0, -1);
    menu_additem(menu, "\wPyro \y- \w[ \rAug \w+ \rDeagle \w] *NEW*", "5", 0, -1);
    menu_setprop(menu, 4, "Quitter");
    menu_setprop(menu, 6, 1);
    menu_display(id, menu, 0);
    return 0;
}

public prisonnier(id)
{
    new menu = menu_create("[Alias#`KraZy] Choisis ta classe de Prisonnier", "prisonnier_menu", 0);
    menu_additem(menu, "\wAssassin \y- \w[ \rGravite \w]", "1", 0, -1);
    menu_additem(menu, "\wDealer \y- \w[ \r130Hp \w]", "2", 0, -1);
    menu_additem(menu, "\wPedobear \y- \w[ \rVitesse \w]", "3", 0, -1);
    menu_additem(menu, "\wTerroriste \y- \w[ \rHe \w+ \rFlash \w+ \rSmoke \w]", "4", 0, -1);
    menu_additem(menu, "\wProtecteur \y- \w[ \rArmure \w+ \rSmoke \w] *NEW*", "5", 0, -1);
    menu_setprop(menu, 4, "Quitter");
    menu_setprop(menu, 6, 1);
    menu_display(id, menu, 0);
    return 0;
}

public gardien_menu(id, menu, item)
{
    !!! Removed Phi
    if (item == -3)
    {
        menu_destroy(menu);
        return 1;
    }
    if (is_user_alive(id) && cs_get_user_team(id, 0) == 2)
    {
        strip_user_weapons(id);
        new key = str_to_num(info);
        switch (key)
        {
            case 1:
            {
                give_item(id, "weapon_knife");
                give_item(id, "weapon_m4a1");
                cs_set_user_bpammo(id, CSW_M4A1, 9000);
                give_item(id, "weapon_deagle");
                cs_set_user_bpammo(id, CSW_DEAGLE, 3500);
                cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM);
            }
            case 2:
            {
                give_item(id, "weapon_knife");
                give_item(id, "weapon_awp");
                cs_set_user_bpammo(id, CSW_AWP, 9000);
                give_item(id, "weapon_deagle");
                cs_set_user_bpammo(id, CSW_DEAGLE, 3500);
                cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM);
            }
            case 3:
            {
                give_item(id, "weapon_knife");
                give_item(id, "weapon_m249");
                cs_set_user_bpammo(id, CSW_M249, 9000);
                give_item(id, "weapon_usp");
                cs_set_user_bpammo(id, CSW_USP, 3500);
                set_user_health(id, get_user_health(id) + 30);
            }
            case 4:
            {
                give_item(id, "weapon_knife");
                give_item(id, "weapon_ak47");
                cs_set_user_bpammo(id, CSW_AK47, 9000);
                give_item(id, "weapon_deagle");
                cs_set_user_bpammo(id, CSW_DEAGLE, 3500);
                cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM);
            }
            case 5:
            {
                give_item(id, "weapon_knife");
                give_item(id, "weapon_aug");
                cs_set_user_bpammo(id, CSW_AUG, 9000);
                give_item(id, "weapon_deagle");
                cs_set_user_bpammo(id, CSW_DEAGLE, 3500);
                cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM);
            }
            default:
            {
            }
        }
    }
    return 0;
}

public prisonnier_menu(id, menu, item)
{
    !!! Removed Phi
    if (item == -3)
    {
        menu_destroy(menu);
        return 1;
    }
    if (is_user_alive(id) && cs_get_user_team(id, 0) == 1)
    {
        new key = str_to_num(info);
        switch (key)
        {
            case 1:
            {
                set_user_gravity(id, 0.40);
            }
            case 2:
            {
                set_user_health(id, get_user_health(id) + 30);
            }
            case 3:
            {
                set_user_maxspeed(id, get_pcvar_float(g_PlayersSpeed));
            }
            case 4:
            {
                give_item(id, "weapon_hegrenade");
                give_item(id, "weapon_flashbang");
                give_item(id, "weapon_smokegrenade");
            }
            case 5:
            {
                give_item(id, "weapon_smokegrenade");
                cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM);
            }
            default:
            {
            }
        }
    }
    return 0;
}
MrGarfield is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 02-09-2019 , 09:41   Re: error on a plugin for class menu
Reply With Quote #2

When you tell the truth someone will help you, this is a "sma" from which you tried to unscram the amxx, no friend gave you anything!
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 02-09-2019 , 14:44   Re: error on a plugin for class menu
Reply With Quote #3

This code looks result of a decompiled plugin.
__________________









Last edited by CrazY.; 02-09-2019 at 14:45.
CrazY. is offline
MrGarfield
Senior Member
Join Date: Feb 2013
Old 02-10-2019 , 05:04   Re: error on a plugin for class menu
Reply With Quote #4

iceeedr I'm not a liar I can give you the name and his steam ID if you want to prove that I do not tell you salads he was in a team and responsible for a server jail so far we opened a jail together because the team was closed since 2012 and he is part of my community, I have no knowledge in plugin he really passed me plugins and many others
MrGarfield is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 02-10-2019 , 05:26   Re: error on a plugin for class menu
Reply With Quote #5

It's code from a decompiled plugin, lol.
__________________
eat1k is offline
MrGarfield
Senior Member
Join Date: Feb 2013
Old 02-10-2019 , 06:13   Re: error on a plugin for class menu
Reply With Quote #6

if the plugin was already extracted, I'm sorry, but as we have already passed, the plugin, now and possible to reformulate it on demand after a little research on the net I found it



And it's possible to have the same choice in the menu style in the plugin I gave thanks

Last edited by MrGarfield; 02-10-2019 at 06:15.
MrGarfield is offline
thEsp
BANNED
Join Date: Aug 2017
Old 02-10-2019 , 07:45   Re: error on a plugin for class menu
Reply With Quote #7

Quote:
Originally Posted by MrGarfield View Post
hello a friend passed me this
Most common thing in coding forums...
This is longdead.
thEsp is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-10-2019 , 08:08   Re: error on a plugin for class menu
Reply With Quote #8

1. The code you provided is not a .sma file, it's a decompiled plugin and won't compile without it being transformed into an actual "readable" code.
2. This is the scripting section and here you SCRIPT yourself, you don't wait for someone else to do the work for you. If you want the second thing, post in the REQUESTS section.
__________________

Last edited by OciXCrom; 02-10-2019 at 08:09.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
MrGarfield
Senior Member
Join Date: Feb 2013
Old 02-10-2019 , 12:16   Re: error on a plugin for class menu
Reply With Quote #9

merci pour le conseil, je voudrais savoir comment reconnaitre un amxx decompiler d'un code sma pour que cette action ne se renouvelle pas merci encore
MrGarfield is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 02-10-2019 , 12:26   Re: error on a plugin for class menu
Reply With Quote #10

This forum is english only.
__________________








CrazY. is offline
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 12:36.


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