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

Furien Mod v0.3


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Gameplay       
ImYourBro
Senior Member
Join Date: Jun 2014
Old 07-05-2016 , 12:07   Furien Mod v0.3
Reply With Quote #1

Hello!

I tried to make a this mod and i finally finished it!

<Description>:
This is a gamemode. Its Human(CT) vs. Furien(T). Furiens have some nice features (Features below). Human is team which have to defeat the furiens with guns.

<Features>:
  • Shop Included for Humans and Furiens
  • Furien Invisible while not moving and knife in hand.
  • Furien Increased movement speed and gravity.
  • Round Start kit for Humans and Furiens.
    - Humans = Gun Menu
    - Furiens = Grenades
  • Round Start Money

<CVARS>:
  • furien_Invisible_Enable(Deafult: 1) - Enables/Disables the invisible ability for Furiens.
  • furien_roundmoney(Default: 16000) - The amount of money you get each round.
  • furien_maxspeed(Default: 800.0) - Sets the speed of furiens (ALWAYS BE A FLOAT VALUE)
  • furien_gravity(Default: 0.3) - Sets the gravity of furiens (ALWAYS BE A FLOAT VALUE)

    Shop:
  • furienshop_enable(Default: 1) - Enables/Disables the shop for humans and furiens.
  • furienshop_HEcost(Default: 4000) - Sets the cost of HE Grenade
  • furienshop_Flashcost(Default: 2000) - Sets the cost of Flashbang
  • furienshop_Smokecost(Default: 1000) - Sets the cost of Smoke Grenade
  • furienshop_SuperKnifecost(Default: 12000) - Sets the cost of SuperKnife for Furiens
  • furienshop_SuperDeaglecost(Default: 12000) - Sets the cost of Super Deagle for Humans
  • furienshop_m249cost(Default: 12000) - Sets the cost of M249 for Humans
  • furienshop_HPT25cost(Default: 2000) - Sets the cost of 25+ HP for Furiens
  • furienshop_HPT50cost(Default: 4000) - Sets the cost of 50+ HP for Furiens
  • furienshop_HPCT25cost(Default: 2000) - Sets the cost of 25+ HP for Humans
  • furienshop_HPCT50cost(Default: 4000) - Sets the cost of 50+ HP for Humans
  • furienshop_Armorcost(Default: 4000) - Sets the cost of Armor.

<CREDITS>:
  • OciXCrom for explaining fix in my codes.
  • Bugsy for explaining fix in my codes.
  • Napoleon_be for helping with codes and explaining.
  • indraraj striker for helping with codes and explaining
  • Hamlet Eagle for inspiration for Invisible code.
  • EFFx for detecting some unnecessary code.

<CHANGELOG>:
Spoiler
Attached Files
File Type: zip furienshop_models.zip (636.6 KB, 323 views)
File Type: sma Get Plugin or Get Source (furien_mod.sma - 1106 views - 19.4 KB)

Last edited by ImYourBro; 07-10-2016 at 14:24.
ImYourBro is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-05-2016 , 12:17   Re: Furien Mod v0.1
Reply With Quote #2

PHP Code:
SetHamParamFloat(4damage 20.4
LOL
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
ImYourBro
Senior Member
Join Date: Jun 2014
Old 07-05-2016 , 12:21   Re: Furien Mod v0.1
Reply With Quote #3

Quote:
Originally Posted by EFFx View Post
PHP Code:
SetHamParamFloat(4damage 20.4
LOL
Didnt even notice that lol.

Code updated.
__________________
Hello!
I'm learning AMXX right now, so please No Hate if i suck

-----------------------------------------------------------------------
Check out my Furien Mod v0.3 here

ImYourBro is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-05-2016 , 14:00   Re: Furien Mod v0.1
Reply With Quote #4

I'll give suggestions for you, but they will not make the plugin be approved.

1.

PHP Code:
public Player_Spawn(id)
{    
    if (!
is_user_alive(id))
    {
        return 
HAM_IGNORED;
    }
    else
    {
        
ColorChat(idDontChange"%s ^1Write ^4/shop ^1to open the shop menu!"prefix)
        
g_bHasSuperKnife[id] = false;
        
g_bHasSuperDeagle[id] = false;
        if(
cs_get_user_team(id) == CS_TEAM_T)
        {
            
set_user_maxspeed(id get_pcvar_float(pMaxSpeed))
            
set_user_gravity(idget_pcvar_float(pGravity))
            
set_user_footsteps(id0)
        }
    }
    return 
HAM_SUPERCEDE

- >

PHP Code:
public Player_Spawn(id)
{    
    if(
is_user_alive(id))
    {
        
ColorChat(idDontChange"%s ^1Write ^4/shop ^1to open the shop menu!"prefix)
        
g_bHasSuperKnife[id] = false;
        
g_bHasSuperDeagle[id] = false;
    }

2.

PHP Code:
public gunMenu(id)
{
    new 
Players[32], iNumid;
    
get_players(PlayersiNum"ah")
    while ( --
iNum >= 0)
    {
        
id Players[iNum]
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_CT:
            {
                
strip_user_weapons(id)
                
give_item(id"weapon_knife")
                
                
primaryguns(id)
            }
            case 
CS_TEAM_T:
            {
                
strip_user_weapons(id)
                
give_item(id"weapon_knife")
                
give_item(id"weapon_hegrenade")
                
give_item(id"weapon_flashbang")
                
give_item(id"weapon_smokegrenade")
            }
        }
    } 

For what (id) at the public if you has created new id = Players[iNum] ?

Do it:

Delete this

PHP Code:
register_logevent("gunMenu"2"1=Round_Start"
And at Player_Spawn()

PHP Code:
        strip_user_weapons(id)
        
give_item(id"weapon_knife")
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_CT:
            {
                
primaryguns(id)
                
set_user_footsteps(id1)
            }
            case 
CS_TEAM_T:
            {
                
give_item(id"weapon_hegrenade")
                
give_item(id"weapon_flashbang")
                
give_item(id"weapon_smokegrenade")
            }
        } 
Like this

PHP Code:
public Player_Spawn(id)
{    
    if(
is_user_alive(id))
    {
        
strip_user_weapons(id)
        
give_item(id"weapon_knife")
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_CT:
            {
                
primaryguns(id)
                
set_user_footsteps(id1)
            }
            case 
CS_TEAM_T:
            {
                
give_item(id"weapon_hegrenade")
                
give_item(id"weapon_flashbang")
                
give_item(id"weapon_smokegrenade")
                
set_user_maxspeed(id get_pcvar_float(pMaxSpeed))
                
set_user_gravity(idget_pcvar_float(pGravity))
                
set_user_footsteps(id0)
            }
        }
        
ColorChat(idDontChange"%s ^1Write ^4/shop ^1to open the shop menu!"prefix)
        
g_bHasSuperKnife[id] = false;
        
g_bHasSuperDeagle[id] = false;
    }

3.

Add checks for see if the player has already X item.
If they will buy HP but has selected the Super Knife ? Add a check for it.

PHP Code:
            if ( iMoney >= get_pcvar_num(g_pCvarSuperCutCost))
            {
                
cs_set_user_money(idiMoney get_pcvar_num(g_pCvarSuperCutCost));
                
g_bHasSuperKnife[id] = true;
                
give_item(id"weapon_knife");
                
ColorChat(idDontChange"%s ^1You just bought ^3SuperKnife ^1for ^4%d"prefixget_pcvar_num(g_pCvarSuperCutCost))
            }
            else
            {
                
ColorChat(idDontChange"%s You do not have enough ^4money!"prefix)
            } 
- >

PHP Code:
            if ( iMoney >= get_pcvar_num(g_pCvarSuperCutCost))
            {
                if(!
g_bHasSuperKnife[id])
                {
                    
cs_set_user_money(idiMoney get_pcvar_num(g_pCvarSuperCutCost));
                    
g_bHasSuperKnife[id] = true;
                    
give_item(id"weapon_knife");
                    
ColorChat(idDontChange"%s ^1You just bought ^3SuperKnife ^1for ^4%d"prefix,         get_pcvar_num(g_pCvarSuperCutCost))
                }
                else
                {
                    
ColorChat(id,DontChange,"%s ^1You already have ^3SuperKnife^1",prefix)
                }
            }
            else
            {
                
ColorChat(idDontChange"%s You do not have enough ^4money!"prefix)
            } 
Make the same for Deagle.

4. I think the roundMoney(id) will not be good in your furien. I suggest to you delete it too and update your code. I cant understand the invisibility o.O
PHP Code:
public CBaseEntity_Think(Entity)
{
    if(
get_pcvar_num(g_CvarInvisEnable) == && pev_valid(Entity))
    {
        static 
Players[32], Numidbool:RestorePlayerVisibilityi
        
static Float:PlayerVelocity[3], Float:PlayerSpeed
        
        get_players
(PlayersNum"ach")
        
        for(
0Numi++)
        {
            
RestorePlayerVisibility false
            id 
Players[i]
            
            if(
get_user_weapon(id) == CSW_KNIFE && cs_get_user_team(id) == CS_TEAM_T)
            {
                
pev(idpev_velocityPlayerVelocity)
                
PlayerSpeed vector_length(PlayerVelocity)
                
                if(!
PlayerSpeed)
                {
                    
set_user_rendering(idkRenderFxNone000kRenderTransTexture0)
                }
                else 
                {
                    
RestorePlayerVisibility true
                
}
            }
            else 
            {
                
RestorePlayerVisibility true 
            
}
            if(
RestorePlayerVisibility)
            {
                
set_user_rendering(idkRenderFxNone000kRenderNormal0)
            }
        }
        
set_pev(Entitypev_nextthinkget_gametime() + 0.1)
    }

For what the RestorePlayerVisibility ?? Just add the set_user_rendering() to normal and gg.
->

PHP Code:
public CBaseEntity_Think(Entity)
{
    if(
pev_valid(Entity))
    {
        static 
Players[32], Numidi
        
static Float:PlayerVelocity[3], Float:PlayerSpeed
        
        get_players
(PlayersNum"ach")
        
        for(
0Numi++)
        {
            
id Players[i]
            
            if(
get_user_weapon(id) == CSW_KNIFE && cs_get_user_team(id) == CS_TEAM_T)
            {
                
pev(idpev_velocityPlayerVelocity)
                
PlayerSpeed vector_length(PlayerVelocity)
                
                if(!
PlayerSpeed)
                {
                    
set_user_rendering(idkRenderFxNone000kRenderTransTexture0)
                }
                else 
                {
                    
set_user_rendering(idkRenderFxNone000kRenderNormal0)
                }
            }
            else 
            {
                
set_user_rendering(idkRenderFxNone000kRenderNormal0)
            }
        }
        
set_pev(Entitypev_nextthinkget_gametime() + 0.1)
    }

5. For what cvar for deactive/active invisibility? What's the chance for it be good? Without it, the mod will not be furien mod.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 07-05-2016 at 14:18.
EFFx is offline
ImYourBro
Senior Member
Join Date: Jun 2014
Old 07-05-2016 , 15:35   Re: Furien Mod v0.1
Reply With Quote #5

Quote:
Originally Posted by EFFx View Post
I'll give suggestions for you, but they will not make the plugin be approved.

1.

PHP Code:
public Player_Spawn(id)
{    
    if (!
is_user_alive(id))
    {
        return 
HAM_IGNORED;
    }
    else
    {
        
ColorChat(idDontChange"%s ^1Write ^4/shop ^1to open the shop menu!"prefix)
        
g_bHasSuperKnife[id] = false;
        
g_bHasSuperDeagle[id] = false;
        if(
cs_get_user_team(id) == CS_TEAM_T)
        {
            
set_user_maxspeed(id get_pcvar_float(pMaxSpeed))
            
set_user_gravity(idget_pcvar_float(pGravity))
            
set_user_footsteps(id0)
        }
    }
    return 
HAM_SUPERCEDE

- >

PHP Code:
public Player_Spawn(id)
{    
    if(
is_user_alive(id))
    {
        
ColorChat(idDontChange"%s ^1Write ^4/shop ^1to open the shop menu!"prefix)
        
g_bHasSuperKnife[id] = false;
        
g_bHasSuperDeagle[id] = false;
    }

2.

PHP Code:
public gunMenu(id)
{
    new 
Players[32], iNumid;
    
get_players(PlayersiNum"ah")
    while ( --
iNum >= 0)
    {
        
id Players[iNum]
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_CT:
            {
                
strip_user_weapons(id)
                
give_item(id"weapon_knife")
                
                
primaryguns(id)
            }
            case 
CS_TEAM_T:
            {
                
strip_user_weapons(id)
                
give_item(id"weapon_knife")
                
give_item(id"weapon_hegrenade")
                
give_item(id"weapon_flashbang")
                
give_item(id"weapon_smokegrenade")
            }
        }
    } 

For what (id) at the public if you has created new id = Players[iNum] ?

Do it:

Delete this

PHP Code:
register_logevent("gunMenu"2"1=Round_Start"
And at Player_Spawn()

PHP Code:
        strip_user_weapons(id)
        
give_item(id"weapon_knife")
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_CT:
            {
                
primaryguns(id)
                
set_user_footsteps(id1)
            }
            case 
CS_TEAM_T:
            {
                
give_item(id"weapon_hegrenade")
                
give_item(id"weapon_flashbang")
                
give_item(id"weapon_smokegrenade")
            }
        } 
Like this

PHP Code:
public Player_Spawn(id)
{    
    if(
is_user_alive(id))
    {
        
strip_user_weapons(id)
        
give_item(id"weapon_knife")
        switch(
cs_get_user_team(id))
        {
            case 
CS_TEAM_CT:
            {
                
primaryguns(id)
                
set_user_footsteps(id1)
            }
            case 
CS_TEAM_T:
            {
                
give_item(id"weapon_hegrenade")
                
give_item(id"weapon_flashbang")
                
give_item(id"weapon_smokegrenade")
                
set_user_maxspeed(id get_pcvar_float(pMaxSpeed))
                
set_user_gravity(idget_pcvar_float(pGravity))
                
set_user_footsteps(id0)
            }
        }
        
ColorChat(idDontChange"%s ^1Write ^4/shop ^1to open the shop menu!"prefix)
        
g_bHasSuperKnife[id] = false;
        
g_bHasSuperDeagle[id] = false;
    }

3.

Add checks for see if the player has already X item.
If they will buy HP but has selected the Super Knife ? Add a check for it.

PHP Code:
            if ( iMoney >= get_pcvar_num(g_pCvarSuperCutCost))
            {
                
cs_set_user_money(idiMoney get_pcvar_num(g_pCvarSuperCutCost));
                
g_bHasSuperKnife[id] = true;
                
give_item(id"weapon_knife");
                
ColorChat(idDontChange"%s ^1You just bought ^3SuperKnife ^1for ^4%d"prefixget_pcvar_num(g_pCvarSuperCutCost))
            }
            else
            {
                
ColorChat(idDontChange"%s You do not have enough ^4money!"prefix)
            } 
- >

PHP Code:
            if ( iMoney >= get_pcvar_num(g_pCvarSuperCutCost))
            {
                if(!
g_bHasSuperKnife[id])
                {
                    
cs_set_user_money(idiMoney get_pcvar_num(g_pCvarSuperCutCost));
                    
g_bHasSuperKnife[id] = true;
                    
give_item(id"weapon_knife");
                    
ColorChat(idDontChange"%s ^1You just bought ^3SuperKnife ^1for ^4%d"prefix,         get_pcvar_num(g_pCvarSuperCutCost))
                }
                else
                {
                    
ColorChat(id,DontChange,"%s ^1You already have ^3SuperKnife^1",prefix)
                }
            }
            else
            {
                
ColorChat(idDontChange"%s You do not have enough ^4money!"prefix)
            } 
Make the same for Deagle.

4. I think the roundMoney(id) will not be good in your furien. I suggest to you delete it too and update your code. I cant understand the invisibility o.O
PHP Code:
public CBaseEntity_Think(Entity)
{
    if(
get_pcvar_num(g_CvarInvisEnable) == && pev_valid(Entity))
    {
        static 
Players[32], Numidbool:RestorePlayerVisibilityi
        
static Float:PlayerVelocity[3], Float:PlayerSpeed
        
        get_players
(PlayersNum"ach")
        
        for(
0Numi++)
        {
            
RestorePlayerVisibility false
            id 
Players[i]
            
            if(
get_user_weapon(id) == CSW_KNIFE && cs_get_user_team(id) == CS_TEAM_T)
            {
                
pev(idpev_velocityPlayerVelocity)
                
PlayerSpeed vector_length(PlayerVelocity)
                
                if(!
PlayerSpeed)
                {
                    
set_user_rendering(idkRenderFxNone000kRenderTransTexture0)
                }
                else 
                {
                    
RestorePlayerVisibility true
                
}
            }
            else 
            {
                
RestorePlayerVisibility true 
            
}
            if(
RestorePlayerVisibility)
            {
                
set_user_rendering(idkRenderFxNone000kRenderNormal0)
            }
        }
        
set_pev(Entitypev_nextthinkget_gametime() + 0.1)
    }

For what the RestorePlayerVisibility ?? Just add the set_user_rendering() to normal and gg.
->

PHP Code:
public CBaseEntity_Think(Entity)
{
    if(
pev_valid(Entity))
    {
        static 
Players[32], Numidi
        
static Float:PlayerVelocity[3], Float:PlayerSpeed
        
        get_players
(PlayersNum"ach")
        
        for(
0Numi++)
        {
            
id Players[i]
            
            if(
get_user_weapon(id) == CSW_KNIFE && cs_get_user_team(id) == CS_TEAM_T)
            {
                
pev(idpev_velocityPlayerVelocity)
                
PlayerSpeed vector_length(PlayerVelocity)
                
                if(!
PlayerSpeed)
                {
                    
set_user_rendering(idkRenderFxNone000kRenderTransTexture0)
                }
                else 
                {
                    
set_user_rendering(idkRenderFxNone000kRenderNormal0)
                }
            }
            else 
            {
                
set_user_rendering(idkRenderFxNone000kRenderNormal0)
            }
        }
        
set_pev(Entitypev_nextthinkget_gametime() + 0.1)
    }

5. For what cvar for deactive/active invisibility? What's the chance for it be good? Without it, the mod will not be furien mod.
Im learning it right now, but thanks for seeing these things.

Code updated
__________________
Hello!
I'm learning AMXX right now, so please No Hate if i suck

-----------------------------------------------------------------------
Check out my Furien Mod v0.3 here

ImYourBro is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-05-2016 , 15:57   Re: Furien Mod v0.1
Reply With Quote #6

Quote:
Originally Posted by ImYourBro View Post
Im learning it right now, but thanks for seeing these things.

Code updated
Where is the update?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 07-05-2016 , 16:33   Re: Furien Mod v0.2
Reply With Quote #7

Does everything work as it should be? Not to be rude, but i doubt it.

1) As EFFx said, you don't use checks to see wether a player already has selected something from the menu or not...

2) Also, menu items should start with the key string "1", allthough entering a key is not even nessecary. also i don't see why you formatex for things like this
PHP Code:
formatex(Textcharsmax(Text), "\wAK47"
You could easily save CPU usage by deleting an array and just add the item like this
PHP Code:
menu_additem(menuPrim"\wAK47"
3) Secondguns can easily be called at the end of your handler and not in every case.

4) I see you have some indentation problems in your plugin initiate which leads to a copy/paste action in my eyes

5) Your public ShopHandle(id) function contains 2 menu's. I think they could be stored in a constant two-dimensional array and loop trough them to add these items..

example:

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

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

new const szMenuItems[][] = {
    
"Item 1",
    
"Item 2",
    
"Item 3",
    
"Item 4",
    
"Item 5"
}

new const 
iMenuCosts[][] = {
    
50,
    
100,
    
200,
    
300,
    
400
}

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /menu""CmdMenu")
}

public 
CmdMenu(id) {
    new 
szTemp[150]
    
    new 
menu menu_create("Menu Title""menu_handler")
    
    for(new 
isizeof(szMenuItems); i++) {
        
formatex(szTempcharsmax(szTemp), "%s [%i]"szMenuItems[i], iMenuCosts[i])
        
menu_additem(menuszTemp)
    }
    
menu_display(idmenu)
}

public 
menu_handler(idmenuitem) {
    
// Handle it

__________________

Last edited by Napoleon_be; 07-05-2016 at 16:35.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-05-2016 , 16:40   Re: Furien Mod v0.2
Reply With Quote #8

Removing Kb from your code Napoleon:

PHP Code:
enum _:MenuSett
{
     
ItemName[50],
     
ItemCost
}
new const 
szMenuItems[][MenuSett] = 
{
    { 
"Item 1"3000 },
    { 
"Item 2"4000 },
    { 
"Item 3"2000 },
    { 
"Item 4"1000 },
    { 
"Item 5"6000 }

Will be like this

PHP Code:
#include <amxmodx>
#include <cstrike>

#define PLUGIN "Menu Sett"
#define VERSION "1.0"
#define AUTHOR "EFFx"

enum _:MenuSett
{
     
ItemName[50],
     
ItemCost
}
new const 
szMenuItems[][MenuSett] = 
{
    { 
"Item 1"3000 },
    { 
"Item 2"4000 },
    { 
"Item 3"2000 },
    { 
"Item 4"1000 },
    { 
"Item 5"6000 }
}


public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /Item","szItem")
}
public 
szItem(id)
{
    new 
szItems[45], menu
    
    menu 
menu_create("Menu Settings","menu_set_handler")
    
    for(new 
isizeof szMenuItems;i++)
    {
        
formatex(szItems,charsmax(szItems),"%s",szMenuItems[i][ItemName])
        
menu_additem(menu,szItems)
    }
    
    
menu_display(id,menu)
}
public 
menu_set_handler(id,menu,item)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
0
    
}
    new 
iMoney cs_get_user_money(id)
    if(
iMoney >= szMenuItems[item][ItemCost])
    {
        switch(
item)
        {
            case 
0// Item 1
            
{
                
cs_set_user_money(idiMoney szMenuItems[item][ItemCost])
            }
            case 
1// Item 2
            
{
                
cs_set_user_money(idiMoney szMenuItems[item][ItemCost])
            }
            case 
2// Item 3
            
{
                
cs_set_user_money(idiMoney szMenuItems[item][ItemCost])
            }
            case 
3// Item 4
            
{
                
cs_set_user_money(idiMoney szMenuItems[item][ItemCost])
            }
            case 
4// Item 5
            
{
                
cs_set_user_money(idiMoney szMenuItems[item][ItemCost])
            }
        }
        
szItem(id)
    }
    else
    {
        
client_print(id,print_chat,"[AMXX]: You have not money!")
    }
    return 
0

__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 07-05-2016 at 16:52.
EFFx is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 07-05-2016 , 16:48   Re: Furien Mod v0.2
Reply With Quote #9

Quote:
Originally Posted by EFFx View Post
Removing Kb from your code Napoleon:

PHP Code:
enum _:MenuSett
{
     
ItemName[50],
     
ItemCost
}
new const 
szMenuItems[][MenuSett] = 
{
    { 
"Item 1"3000 },
    { 
"Item 2"4000 },
    { 
"Item 3"2000 },
    { 
"Item 4"1000 },
    { 
"Item 5"6000 }

For check if the player have money to buy:

PHP Code:
if(cs_get_user_money(id) >= szMenuItems[item][ItemCost]) 
For take price:

PHP Code:
cs_set_user_money(idcs_get_user_money(id) - szMenuItems[item][ItemCost]) 
You should also explain how you're going to format this.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-05-2016 , 16:54   Re: Furien Mod v0.2
Reply With Quote #10

Updated my suggest, look again.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx 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 18:07.


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