It is currently 26 May 2018 20:45






Reply to topic  [ 2 posts ] 
 [Plugin] 
Author Message
Membru, skill +1
Membru, skill +1

Joined: 03 Jul 2016 23:13
Posts: 104
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Vreau sa ma ajutati cu pluginul asta:
Vreau cand imi fac un cont nou pe sv sa nu mai imi dea 5000 ammo+ ci decat 5 ca m-am conectat cu un nume la intamplare si aveam 5000 ammo pe el si era nou numele...

| Afiseaza codul
#include <amxmodx> 

#include <nvault>



//Uncomment 'IM_USING_ZP50' if your server is running ZP50 and above.

//#define IM_USING_ZP50

#if defined IM_USING_ZP50

native zp_ammopacks_get(id)

native zp_ammopacks_set(id, amount)

#else

native zp_get_user_ammo_packs(id)

native zp_set_user_ammo_packs(id, amount)

#endif



//Your vault name

#define VAULT_NAME "apstore"



//Max player's ammopack that can be save in vault.

#define MAX_AMMOPACK 9999999



//Max day player's ammopack can be stay in vault, set 0 = permanent.

#define DAY_PRUNE 0

new hVaultHandle, bool:bIsLoaded[33], szSteamid[33][35]



public plugin_init()

{

register_plugin("ZP AP Store", "0.0.1", "wbyokomo")

}



public plugin_cfg()

{

hVaultHandle = nvault_open(VAULT_NAME)

if(hVaultHandle == INVALID_HANDLE)

{

new szText[128]

formatex(szText, 127, "Error opening '%s' nVault.", VAULT_NAME)

set_fail_state(szText)

}



new day = DAY_PRUNE

if(day > 0) nvault_prune(hVaultHandle, 0, get_systime() - (DAY_PRUNE * 86400));

}



public plugin_end()

{

nvault_close(hVaultHandle)

}



public client_putinserver(id)

{

if(is_user_hltv(id)) return;

if(is_user_bot(id)) return;



get_user_authid(id, szSteamid[id], 34)

LoadData(id)

}



public client_disconnect(id)

{

SaveData(id)

bIsLoaded[id] = false

}



LoadData(id)

{

new szKey[40]

formatex(szKey, 39, "%sZPAP", szSteamid[id])

new iAmmo = nvault_get(hVaultHandle, szKey)

#if defined IM_USING_ZP50

zp_ammopacks_set(id, iAmmo)

#else

zp_set_user_ammo_packs(id, iAmmo)

#endif

bIsLoaded[id] = true

}



SaveData(id)

{

if(!bIsLoaded[id]) return;



#if defined IM_USING_ZP50

new ap = zp_ammopacks_get(id)

#else

new ap = zp_get_user_ammo_packs(id)

#endif

if(ap > MAX_AMMOPACK) ap = MAX_AMMOPACK;

new szAmmo[12], szKey[40]

formatex(szKey, 39, "%sZPAP", szSteamid[id])

formatex(szAmmo, 11, "%d", ap)

nvault_set(hVaultHandle, szKey, szAmmo)

}


18 Feb 2017 17:06
Profile multumesc WWW
Membru, skill 0
Membru, skill 0

Joined: 17 Jan 2017 20:03
Posts: 35
Detinator Steam: Da
CS Status: Rub mint :)
SteamID: http://steamcommunit
Fond eXtream: 0
Ai pus pluginul gresit. Nu in asta se schimba.


06 Apr 2017 10:04
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 34 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group