Advanced Points System [v1.1] [little update: shop]

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

MoTzoK.
Membru, skill 0
Membru, skill 0
Posts: 22
Joined: 31 Oct 2012, 09:58
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: Furien2.CS1.RO
Has thanked: 13 times
Contact:

23 Feb 2014, 17:53

Problema.

Image
Image
RoyalServer
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

23 Feb 2014, 21:32

Gata, am rezolvat !
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
ariciu
Membru, skill +1
Membru, skill +1
Posts: 104
Joined: 27 Jun 2012, 15:07
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 9 times
Been thanked: 4 times
Contact:

24 Feb 2014, 19:07

The YONTU poti face un shop pe baza la points system si pentru zombie plague ?
MoTzoK.
Membru, skill 0
Membru, skill 0
Posts: 22
Joined: 31 Oct 2012, 09:58
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: Furien2.CS1.RO
Has thanked: 13 times
Contact:

24 Feb 2014, 20:28

Shopul functioneaza perfect :D.
Ce-ar fi sa faci si un top15 cu acest sistem.
Image
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

24 Feb 2014, 21:58

@ariciu: Ce sa contina shop-ul? Sa.mi spui si cat sa coste fiecare. Sa precizezi si pentru ce ecgipa sa fie.

@MoTzocK: Lucrez si la asta :) !
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
Csy[ro]
Membru, skill +1
Membru, skill +1
Posts: 148
Joined: 18 Feb 2014, 15:22
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 7 times
Been thanked: 3 times
Contact:

26 Feb 2014, 18:11

eroare :
| Afiseaza codul
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

shop.sma(173) : error 017: undefined symbol "GREEN"
shop.sma(173) : warning 215: expression has no effect
shop.sma(173) : warning 215: expression has no effect
shop.sma(173) : error 001: expected token: ";", but found ")"
shop.sma(173) : error 029: invalid expression, assumed zero
shop.sma(173) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.
Could not locate output file shop.amx (compile failed).

La comprimare
Image
Image
Image
Image



Plugins by DAG a.k.AaA

Adaugare boti pe server cs 1.6 100% [Private] NR Servare pe care ruleaza : 6 - Detalli : Botii pot fi adaugati pe server , apar in gametracker pot face fraguri , au lag & ping -Update Version 2.0 (sa adaugat functia de vorbire a botilor)-
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

26 Feb 2014, 18:30

Ai nevoi de libraria CC_ColorChat.inc in include :P !
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
ariciu
Membru, skill +1
Membru, skill +1
Posts: 104
Joined: 27 Jun 2012, 15:07
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 9 times
Been thanked: 4 times
Contact:

27 Feb 2014, 11:10

Shopul sa contina:

1.Buy Slot with points - 10 points
2.Buy 100 packs - 50 points
3.Buy 500 packs - 120 points
4.Buy GodMode - 400 points
5.Buy VIP with points - 2500 points ( sa fie pentru o singura zi )

ECHIPA: CT - ZM
si vreau sa fie compatibil cu Zombie Plague Shade 1.0.3 modificat de KronoS # GG

si daca poti sa imi faci separat shopu si sa-mi dai smau-l prin pm TE ROG
Dragos22
Membru, skill 0
Membru, skill 0
Posts: 23
Joined: 14 Mar 2014, 17:23
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 2 times
Contact:

20 Mar 2014, 17:13

Salut ! Imi poti face si mie un shop pe systemu asta ? Daca da uite mai jos ce sa contina:

Speed 350 = 20 points
HP 100 = 15 points
Gravity 700 = 10 points
Grenada HE = 5 Points
50 damage in + == 30 Points

Dupa ce moare sa ii dispara toate astea . sa fie accesat prin comanda /shop oriunde oricand . Multumesc
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

20 Mar 2014, 19:09

Dragos22 wrote:Salut ! Imi poti face si mie un shop pe systemu asta ? Daca da uite mai jos ce sa contina:

Speed 350 = 20 points
HP 100 = 15 points
Gravity 700 = 10 points
Grenada HE = 5 Points
50 damage in + == 30 Points

Dupa ce moare sa ii dispara toate astea . sa fie accesat prin comanda /shop oriunde oricand . Multumesc
| Afiseaza codul
[code=php]#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >
#include < fun >
#include < colorchat >

new const PLUGIN_NAME[  ] = "Points System - SHOP",
     PLUGIN_VERSION[  ] = "1.0",
     PLUGIN_AUTHOR[  ] = "YONTU";

#define is_user_player(%1) ( 1 <= %1 <= 32 )

#define MAX_ITEMS    5

native set_user_points( id, amount );
native get_user_points( id );

new const g_szTag[  ] = "[Shop]^x01";
new const NameShop[  ] = "CS.NUMESERVER.RO";

new Ham:Ham_Player_ResetMaxSpeed = Ham_Item_PreFrame;

new bool:Dmg[ 33 ];
new bool:Health[ 33 ];
new bool:Gravity[ 33 ];
new bool:Speed[ 33 ];

new gCvarCostHealth,
    gCvarHealth,
    gCvarMaxHealth,
    gCvarCostMultiDmg,
    gCvarCostGravity,
    gCvarGravity,
    gCvarCostSpeed,
    gCvarSpeed,
    gCvarCostHeGrenade;

public plugin_init(  ) {

    register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR );

    register_clcmd( "say /shop", "OpenMenu" );
    register_clcmd( "say_team /shop", "OpenMenu" );

    register_event( "CurWeapon", "event_CurWeapon", "be", "1=1" );
    register_event( "DeathMsg", "event_DeathMsg", "a" );

    RegisterHam( Ham_Player_ResetMaxSpeed, "player", "Ham_ResetMaxSpeedPost", 1 );
    RegisterHam( Ham_TakeDamage, "player", "Ham_TakeDamagePre" );

    gCvarCostHealth = register_cvar( "shop_cost_hp", "40" );
    gCvarHealth = register_cvar( "shop_hp", "50" );
    gCvarMaxHealth = register_cvar( "shop_max_hp", "250" );
    gCvarCostMultiDmg = register_cvar( "shop_cost_multidmg", "100" );
    gCvarCostGravity = register_cvar( "shop_cost_gravity", "15" );
    gCvarGravity = register_cvar( "shop_gravity", "450.0" );
    gCvarCostSpeed = register_cvar( "shop_cost_speed", "30" );
    gCvarSpeed = register_cvar( "shop_speed", "600.0" );
    gCvarCostHeGrenade = register_cvar( "shop_cost_hegrenade", "5" );
}

public plugin_cfg(  )
    set_cvar_float( "sv_maxspeed", 1000.0 );

public client_disconnect( id ) {

    Dmg[ id ] = false;
    Gravity[ id ] = false;
    Speed[ id ] = false;
}

public client_putinserver( id ) {

    Dmg[ id ] = false;
    Gravity[ id ] = false;
    Speed[ id ] = false;
}

public event_CurWeapon( id ) {

    if( !is_user_alive( id ) || is_user_bot( id ) )
        return 1;

    if( Gravity[ id ] ) {
        set_user_gravity( id, get_pcvar_num( gCvarGravity ) / 0.00125 );
    } else {
        return 1;
    }

    return 0;
}

public event_DeathMsg(  ) {
    
    if( read_data( 1 ) == read_data( 2 ) || !is_user_alive( read_data( 1 ) ) )
        return 1;

    Dmg[ read_data( 2 ) ] = false;
    Gravity[ read_data( 2 ) ] = false;
    Speed[ read_data( 2 ) ] = false;

    return 0;
}

public Ham_ResetMaxSpeedPost( id ) {

    if( is_user_alive( id ) && get_user_maxspeed( id ) != 1.0 ) {

          new Float:flMaxSpeed;

          if( Speed[ id ] ) {
               flMaxSpeed = float( get_pcvar_num( gCvarSpeed ) );
        }

          if( flMaxSpeed > 0.0 ) {
               set_pev( id, pev_maxspeed, flMaxSpeed );
        }
    }
}

public Ham_TakeDamagePre( iVictim, iInflictor, iAttacker, Float:fDamage ) {

    if( iVictim == iAttacker || !is_user_player( iAttacker ) || !is_user_alive( iAttacker ) )
        return HAM_HANDLED;

    if( Dmg[ iAttacker ] && is_user_player( iAttacker ) ) {

        SetHamParamFloat( 4, fDamage + 50.0 );
        return HAM_HANDLED;
    }

    return HAM_IGNORED;
}

public OpenMenu( id ) {

    if( !is_user_connected( id ) || is_user_bot( id ) )
        return 1;

    if( !is_user_alive( id ) ) {

        ColorChat( id, GREEN, "%s^x01 Trebuie sa fii in viata ca sa poti accesa^x03 shop-ul^x01 !!!", g_szTag );
        return 1;
    } else if( get_user_team( id ) == 3 ) {

        ColorChat( id, GREEN, "%s^x01 Nu poti accesa shop-ul cat timp esti spectator !!!", g_szTag );
        return 1;
    } else {
        ShowShopMenu( id );
    }

    return 1;
}

public ShowShopMenu( id ) {    

    new szMenuName[ 64 ];
    formatex( szMenuName, sizeof( szMenuName ) - 1, "\w%s \rv1.0^n\yYour Points:\r %i\w", NameShop, get_user_points( id ) );

    new iMenu = menu_create( szMenuName, "MenuHandler" );

    new szBuffer[ MAX_ITEMS ][ 64 ];
    new szBufferKey[ MAX_ITEMS - 1 ];
    new iBufferKey = 1;

    if( Speed[ id ] )
        formatex( szBuffer[ 0 ], sizeof( szBuffer[  ] ) - 1, "\d%i Speed\r [\w%i $\r]", get_pcvar_num( gCvarSpeed ), get_pcvar_num( gCvarCostSpeed ) );
    else
        formatex( szBuffer[ 0 ], sizeof( szBuffer[  ] ) - 1, "\y%i Speed\r [\w%i $\r]", get_pcvar_num( gCvarSpeed ), get_pcvar_num( gCvarCostSpeed ) );
    if( get_user_health( id ) >= get_pcvar_num( gCvarMaxHealth ) )
        formatex( szBuffer[ 1 ], sizeof( szBuffer[  ] ) - 1, "\d%i HP\r [\w%i $\r]", get_pcvar_num( gCvarHealth ), get_pcvar_num( gCvarCostHealth ) );
    else
        formatex( szBuffer[ 1 ], sizeof( szBuffer[  ] ) - 1, "\y%i HP\r [\w%i $\r]", get_pcvar_num( gCvarHealth ), get_pcvar_num( gCvarCostHealth ) );
    if( Gravity[ id ] )
        formatex( szBuffer[ 2 ], sizeof( szBuffer[  ] ) - 1, "\d%i Gravity\r [\w%i $\r]", get_pcvar_num( gCvarGravity ), get_pcvar_num( gCvarCostGravity ) );
    else
        formatex( szBuffer[ 2 ], sizeof( szBuffer[  ] ) - 1, "\y%i Gravity\r [\w%i $\r]", get_pcvar_num( gCvarGravity ), get_pcvar_num( gCvarCostGravity ) );
    if( user_has_weapon( id, CSW_HEGRENADE ) )
        formatex( szBuffer[ 3 ], sizeof( szBuffer[  ] ) - 1, "\dHe Grenade\r [\w%i $\r]", get_pcvar_num( gCvarCostHeGrenade ) );
    else
        formatex( szBuffer[ 3 ], sizeof( szBuffer[  ] ) - 1, "\yHe Grenade\r [\w%i $\r]", get_pcvar_num( gCvarCostHeGrenade ) );
    if( Dmg[ id ] )
        formatex( szBuffer[ 4 ], sizeof( szBuffer[  ] ) - 1, "\d+50 Dmg\r [\w%i $\r]", get_pcvar_num( gCvarCostMultiDmg ) );
    else
        formatex( szBuffer[ 4 ], sizeof( szBuffer[  ] ) - 1, "\y+50 Dmg\r [\w%i $\r]", get_pcvar_num( gCvarCostMultiDmg ) );

    for( new i = 0; i < MAX_ITEMS; i++ ) {

        formatex( szBufferKey, sizeof( szBufferKey ) -1, "%i", iBufferKey );
        menu_additem( iMenu, szBuffer[ i ], szBufferKey, 0 );

        iBufferKey++;
    }

    menu_setprop( iMenu, MPROP_EXITNAME, "\wIesire" );
    menu_display( id, iMenu, 0 );

    return 1;
}

public MenuHandler( id, szMenu, szItem ) {

    if( szItem == MENU_EXIT ) {

        menu_destroy( szMenu );
        return PLUGIN_HANDLED;
    }

    new szData[ 6 ], szName[ 64 ];
    new iAccess, iCallBack;

    menu_item_getinfo( szMenu, szItem, iAccess, szData, charsmax( szData ), szName, charsmax( szName ), iCallBack );
    new iKey = str_to_num( szData );

    switch( iKey ) {

        case 1: {

            new CostSpeed = get_pcvar_num( gCvarCostSpeed );
            new Points = get_user_points( id ) - CostSpeed;

            if( Points < 0 ) {

                ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 puncte pentru a cumpara viteza!", g_szTag, CostSpeed - get_user_points( id ) );
                set_task( 0.3, "ShowShopMenu", id );
                return 1;    
            } else if( Speed[ id ] ) {

                ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag );
                set_task( 0.3, "ShowShopMenu", id );
                return 1;    
            } else {

                Speed[ id ] = true;
                set_user_maxspeed( id, get_pcvar_float( gCvarSpeed ) );

                ColorChat( id, GREEN, "%s Ai devenit mai rapid cu^x03 %0.1f^x01 unitati.", g_szTag, get_pcvar_float( gCvarSpeed ) - get_user_maxspeed( id ) );
                set_user_points( id, Points );

                return 1;
            }
        }

        case 2: {

            new CostHealth = get_pcvar_num( gCvarCostHealth );
            new Points = get_user_points( id ) - CostHealth;

            if( Points < 0 ) {

                ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 puncte pentru a cumpara viata in plus!", g_szTag, CostHealth - get_user_points( id ) );
                set_task( 0.3, "ShowShopMenu", id );
                return 1;    
            } else if( get_user_health( id ) >= get_pcvar_num( gCvarMaxHealth ) ) {

                ColorChat( id, GREEN, "%s Ai ajuns la numarul maxim de viata(^x04%i^x01).", g_szTag, get_pcvar_num( gCvarMaxHealth ) );
                set_task( 0.3, "ShowShopMenu", id );
                return 1;    
            } else {

                set_user_health( id, get_user_health( id ) + get_pcvar_num( gCvarHealth ) );

                ColorChat( id, GREEN, "%s Viata ta este acum cu^x03 %i^x01 mai mare.", g_szTag, Health );
                set_user_points( id, Points );

                return 1;
            }
        }

        case 3: {

            new CostGravity = get_pcvar_num( gCvarCostGravity );
            new Points = get_user_points( id ) - CostGravity;

            if( Points < 0 ) {

                ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 puncte pentru a cumpara gravitate!", g_szTag, CostGravity - get_user_points( id ) );
                set_task( 0.3, "ShowShopMenu", id );
                return 1;    
            } else if( Gravity[ id ] ) {

                ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag );
                set_task( 0.3, "ShowShopMenu", id );
                return 1;    
            } else {

                Gravity[ id ] = true;

                ColorChat( id, GREEN, "%s Tocmai ti-ai crescut^x03 gravitatea^x01.", g_szTag );
                set_user_points( id, Points );

                return 1;
            }
        }

        case 4: {

            new CostHe = get_pcvar_num( gCvarCostHeGrenade );
            new Points = get_user_points( id ) - CostHe;

            if( Points < 0 ) {

                ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 puncte pentru a cumpara o grenada !", g_szTag, CostHe - get_user_points( id ) );
                set_task( 0.3, "ShowShopMenu", id );
                return 1;    
            } else if( user_has_weapon( id, CSW_HEGRENADE ) ) {

                ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag );
                set_task( 0.3, "ShowShopMenu", id );
                return 1;    
            } else {

                give_item( id, "weapon_hegrenade" );

                ColorChat( id, GREEN, "%s Ti-ai cumparat o grenada HE^x01.", g_szTag );
                set_user_points( id, Points );

                return 1;
            }
        }

        case 5: {

            new CostMultiDmg = get_pcvar_num( gCvarCostMultiDmg );
            new Points = get_user_points( id ) - CostMultiDmg;

            if( Points < 0 ) {

                ColorChat( id, GREEN, "%s Mai ai nevoie de^x03 %i^x01 puncte pentru a cumpara dublu dmg!", g_szTag, CostMultiDmg - get_user_points( id ) );
                set_task( 0.3, "ShowShopMenu", id );
                return 1;    
            } else if( Dmg[ id ] ) {

                ColorChat( id, GREEN, "%s Ai deja acest item!", g_szTag );
                set_task( 0.3, "ShowShopMenu", id );
                return 1;    
            } else {

                Dmg[ id ] = true;

                ColorChat( id, GREEN, "%s Acum dmg-ul tau este mai mare cu 31%^x01.", g_szTag );
                set_user_points( id, Points );

                return 1;
            }
        }
    }

    menu_destroy( szMenu );
    return PLUGIN_HANDLED;
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ [/code]

Code: Select all

shop_cost_hp "40" - cat costa X viata
shop_hp "50" - cata viata s primesti pentru Y puncte
shop_max_hp "250" - viata maxima pe care o poti atinge
shop_cost_multidmg "100" - cate puncte sa coste dmg-ul dublu // aici dmg-ul tau creste cu +50.0
shop_cost_gravity "15" - cate puncte sa coste X graviate
shop_gravity "450.0" - cata gravitate sa primesti pentru Y puncte
shop_cost_speed "30" - cat sa coste X viteza
shop_speed "600.0" - cata viteza sa primesti pentru Y puncte
shop_cost_hegrenade "50" - cat sa coste no flash-ul( imunitate la flashbang-uri )
new const g_szTag[ ] = "[Shop]^x01";
new const NameShop[ ] = "CS.NUMESERVER.RO";
Astept un multumesc :) !
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
Dragos22
Membru, skill 0
Membru, skill 0
Posts: 23
Joined: 14 Mar 2014, 17:23
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 2 times
Contact:

21 Mar 2014, 09:24

Mersi de la mine + Multumesc
User avatar
HamletEagle
Fost moderator
Fost moderator
Posts: 750
Joined: 21 Sep 2013, 15:05
Detinator Steam: Da
CS Status: Inactiv cateva zile.
SteamID: privat
Reputatie: Fost Scripter eXtreamCS.com
Fost Moderator ajutator
Has thanked: 19 times
Been thanked: 85 times

22 May 2014, 16:24

Edit : Topic gresit.
Daca vreti ajutorul meu, nu dati bump la topic, fara intrebari de genu "cat mai dureaza/mai astept mult?".
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests