Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Level System API


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 476
  • Lokalizacja:AMXX.PL
Offline

Napisano 22.09.2015 13:20

Level System API
v1.0
by CreePs



[left]Introduction:

This level system is only the main system that means you got to make what you want every level.
there is alot of API so it will be easy to make addons for this level system


Admin Console Commands:

Code: Cvar's:

kill_xp "num" - give xp for each kill * default "5" *
hs_xp "num" - give xp for each headshot kill * default "2" *
he_xp "num" - give xp for each he grenade kill * default "2" *
knife_xp "num" - give xp for each knife kill * default "3" *

Client Chat Commands:

Code: say /level or /xp - to show your stats

Plugin API:

Code: /**
*
* register max level and started xp
*
* @maxlevel the level max
*
* @started_xp_level the started xp for first level
*
* @noreturn
*/
native register_maxlevels( maxlevel = 25, started_xp_level = 100 );


/**
*
* get user level info
*
* @param Client - Index of player
*
* @return user level info
*/
native get_user_level( index );

/**
*
* set user level
*
* @param Client - Index of player
*
* @param Number - of level you set
*
* @noreturn
*/
native set_user_level( index, level );

/**
*
* get user xp info
*
* @param Client - Index of player
*
* @return user xp info
*/
native get_user_xp( index );

/**
*
* set user xp
*
* @param Client - Index of player
*
* @param Number - of xp you set
*
* @noreturn
*/
native set_user_xp( index, level );

/**
*
* Called when player level up
*
* @param Client - Index of player
*
* @param Number - of level
*
* @param Number - of xp
*
* @return Client info of level and xp
*
*/
forward forward_client_levelup( index, level, xp );



/**
*
*
* @param Client - Index of player
*
* @param Number - of level
*
* @param Number - of xp
*
* @return Client info of level and xp
*
*/
forward forward_client_spawn( index, level, xp );


Plugin Requirements:

  • AMX Mod X 1.8.0 or higher
  • Steam
  • FVault System

Credits:

CreePs - made the plugin
Exolent[jNr] - FVault System


Changelog:

Code: * v1.0
- first public release

Note:

REMEMBER this is only the main plugin not any addons of levels only the main system
you need to make the addons of what you want to every level will do

you can post here request of addons for the level system and i will make them if i will have time

Enjoy



Attached Files Dołączona grafikaLevelSystem.inc (1.6 KB) Dołączona grafikaGet Plugin or Get Source (Level-System.sma - 6.7 KB) Dołączona grafikaGet Plugin or Get Source (Commands-Addons.sma - 5.2 KB)

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych