[ZP] XP System and Level's

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori

Post Reply
User avatar
LondoN eXtream
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2839
Joined: 10 Oct 2014, 05:21
Detinator Steam: Da
SteamID: /id/london_extreamcs
Reputatie: Scripter eXtreamCS
Moderator ajutator
Membru Club eXtreamCS (6 luni)
Fond eXtream: 0
Location: Roman, Neamț
Has thanked: 1 time

01 Feb 2019, 10:42

Descriere: Este un plugin de zombie xp + level simplu..si cu native

Descarcare: https://pastebin.com/2XT1YhC3

Nume: [ZP] XP + Levels
Versiune: 1.0
Link oficial: http://www.legatura_catre_plugin.com/unde/se/afla/originalul.html

Instalare:
1. Fisierul nume_plugin.sma il puneti in addons/amxmodx/scripting
2. Fisierul nume_plugin.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code: Select all

nume_plugin.amxx
4. Alti pasi necesari....

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
  • zp_xp_damage_for_experience 600 - la cat damage facut sa primeasca intre 1, 3 XP
Astept ceva pareri..cat mai mult pentru optimizare..poate il dezvoltam si il facem si mai frumos de atat.
Olium
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2480
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 260 times
Been thanked: 279 times
Contact:

01 Feb 2019, 14:07

Daca isi schimbaa numele pe server ce faci? Tine cont și de 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ș
Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage
Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu
User avatar
LondoN eXtream
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2839
Joined: 10 Oct 2014, 05:21
Detinator Steam: Da
SteamID: /id/london_extreamcs
Reputatie: Scripter eXtreamCS
Moderator ajutator
Membru Club eXtreamCS (6 luni)
Fond eXtream: 0
Location: Roman, Neamț
Has thanked: 1 time

01 Feb 2019, 17:57

YONTU wrote:Daca isi schimbaa numele pe server ce faci? Tine cont și de asta
e doar un basic..cand am inceput realizarea pluginului am facut strict sistemul si salvarea...dar totusi o sa adaug si restrictia de schimbare a numelui.
dannyel98
Membru, skill 0
Membru, skill 0
Posts: 44
Joined: 26 Mar 2017, 20:58
Detinator Steam: Da
SteamID: dannyel1998
Fond eXtream: 0

16 Apr 2019, 21:22

Cum adaugi clase human si zombie pe levele?
https://www.youtube.com/watch?v=M91um1UBb6I&t=83s

Vand Cont Clash Royale - 20 Euro https://imgur.com/a/Lue2vtq
Vand Addons Zombie XP Mode 16 Levele cu sma 10 euro (fara errori, buguri, suport tehnic urc eu resursele)
Vand Addons CSGO REMAKE 5 EURO (fara errori, buguri, suport tehnic urc eu resursele)
Vand Tema IPB 3 Euro (+toate resursele pentru un forum daca ai nevoie)

Plata: Webmoney / Steam
Mai multe informatii: anunturi/vand-aceste-produse-t362989.html
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2042
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 330 times
Contact:

16 Apr 2019, 23:36

dannyel98 wrote:
16 Apr 2019, 21:22
Cum adaugi clase human si zombie pe levele?
prin nativele acestui plugin, incluzi native în plg pentru clasa pe care o veri pe level, și faci verificarea prin nativ dacă are levelul necesar(zpxp_get_level(id)==1)
User avatar
Rainq
Manager FURIEN
Manager FURIEN
Posts: 2560
Joined: 21 Jul 2015, 18:50
Detinator Steam: Da
CS Status: Busy
Detinator server CS: ---
Reputatie: Fost moderator
Manager FURIEN.eXtreamCS.COM
Fost manager ZM.eXtreamCS.COM
Fost Membru Club eXtreamCS (trei luni)
Fond eXtream: 0
Location: Bucuresti
Been thanked: 8 times
Contact:

19 Apr 2019, 00:17

ar fi ok sa pui sursa pe forum de acum incolo pe alte site-uri se poate pierde

Code: Select all

#include < amxmodx >
#include < amxmisc >
#include < fvault >
 
#define PLUGIN  "Zombie XP"
#define VERSION "1.0 Beta"
#define AUTHOR  "LondoN eXtream"
 
#define SAVE_FILE_NAME  "ZPXP_fVault"
#define MAX_LEVEL   10
 
new g_PlayerName [ 33 ] [ 32 ];
new g_Experience [ 33 ], g_Level [ 33 ];
new g_CvarAmmoPacksDamage;
 
new const ExperienceNeed [ MAX_LEVEL ] =
{
    0,  //  Level 1
    500,    //  Level 2
    1000,   //  Level 3
    2000,   //  Level 4
    3500,   //  Level 5
    4000,   //  Level 6
    5500,   //  Level 7
    6300,   //  Level 8
    7200,   //  Level 9
    9000,   //  Level 10
}
 
public plugin_init ( )
{
    register_plugin ( PLUGIN, VERSION, AUTHOR );
    register_cvar ( "zombie_xp_london", VERSION, FCVAR_SERVER|FCVAR_SPONLY );
    set_cvar_string ( "zombie_xp_london", VERSION );
 
    g_CvarAmmoPacksDamage = register_cvar ( "zp_xp_damage_for_experience", "500" );
 
    register_event ( "Damage", "Event_UserMakeDamage", "b", "2!=0" );
    register_event ( "DeathMsg", "Event_UserKillSomeone", "a" );
}
 
public plugin_natives ( )
{
    register_native ( "zpxp_set_experience", "_set_experience", 1 );
    register_native ( "zpxp_get_experience", "_get_experience", 1 );
    register_native ( "zpxp_set_level", "_set_level", 1 );
    register_native ( "zpxp_get_level", "_get_level", 1 );
}
 
public _set_experience ( Player, Amount )
{
    if ( !is_user_connected ( Player ) )
        return;
 
    g_Experience [ Player ] += Amount;
 
    check_user_level ( Player );
}
 
public _get_experience ( Player )
{
    return g_Experience [ Player ];
}
 
public _set_level ( Player, Level )
{
    if ( !is_user_connected ( Player ) )
        return;
 
    if ( Level > MAX_LEVEL )
        return;
 
    g_Level [ Player ] = Level;
 
    g_Experience [ Player ] = ExperienceNeed [ g_Level [ Player ] ];
}
 
public _get_level ( Player )
{
    return g_Level [ Player ];
}
 
public Event_UserMakeDamage ( Player )
{
    new Damage = read_data ( 2 );
    new ID = get_user_attacker ( Player );
 
    if ( ID == Player || !ID || !is_user_alive ( ID ) )
        return;
 
    while ( Damage >= get_pcvar_num ( g_CvarAmmoPacksDamage ) )
    {
        Damage -= get_pcvar_num ( g_CvarAmmoPacksDamage );
        g_Experience [ ID ] += random_num ( 1, 3 );
    }
 
    check_user_level ( ID );
 
}
 
 
public Event_UserKillSomeone ( )
{
    new Attacker;   Attacker = read_data ( 1 );
    new Victim; Victim = read_data ( 2 );
 
    if ( Attacker == Victim || !Attacker || !is_user_alive ( Attacker ) )
        return;
 
    g_Experience [ Attacker ] += 20;
 
    check_user_level ( Attacker );
}
 
public check_user_level ( Player )
{
    if ( g_Level [ Player ] < MAX_LEVEL )
    {
        while ( g_Experience [ Player ] >= ExperienceNeed [ g_Level [ Player ] ] )
        {
            g_Level [ Player ]++;
        }
    }
 
    save_user_data ( Player );
}
 
public client_connect ( Player )
{
    if ( is_user_bot ( Player ) || is_user_hltv ( Player ) )
        return;
 
    get_user_name ( Player, g_PlayerName [ Player ], charsmax ( g_PlayerName ) );
 
    load_user_data ( Player );
}
 
public client_disconnect ( Player )
{
    if ( is_user_bot ( Player ) || is_user_hltv ( Player ) )
        return;
 
    save_user_data ( Player );
}
 
public save_user_data ( Player )
{
    new g_String [ 32 ];
    formatex ( g_String, charsmax ( g_String ), "%s %s", g_Level [ Player ], g_Experience [ Player ] );
 
    fvault_set_data ( SAVE_FILE_NAME, g_PlayerName [ Player ], g_String );
}
 
public load_user_data ( Player )
{
    new g_String [ 32 ];
   
    if ( fvault_get_data ( SAVE_FILE_NAME, g_PlayerName [ Player ], g_String, charsmax ( g_String ) ) )
    {
        // a = level | b = experience
        new a [ 16 ], b [ 16 ];
        parse ( g_String, a, charsmax ( a ), b, charsmax ( b ) );
 
        g_Level [ Player ] = str_to_num ( a );
        g_Experience [ Player ] = str_to_num ( b );
    }
    else
    {
        g_Level [ Player ] = 0;
        g_Experience [ Player ] = 0;
    }
}
RETRAS
Image
Leul si tigru sunt mai puternici ca lupul,dar lupul la circ nu participa.
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2042
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 330 times
Contact:

19 Apr 2019, 09:11

Event_UserMakeDamage - cam aiurea ce e în el

public Event_UserKillSomeone ( )
!Attacker || !is_user_alive ( Attacker ) (cam acleași..)


public save_user_data ( Player )
formatex ( g_String, charsmax ( g_String ), "%s %s", g_Level [ Player ], g_Experience [ Player ] );
>
formatex ( g_String, charsmax ( g_String ), "%d %d", g_Level [ Player ], g_Experience [ Player ] );
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests