AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP]Menu Limit Item Per Days. (https://forums.alliedmods.net/showthread.php?t=295748)

yas17sin 04-03-2017 14:02

[HELP]Menu Limit Item Per Days.
 
Hi all.

I've been searching in the internet but i couldn't find what i am searching for.

i need to set the item in shop per days, so you will have it for x days if you buy it and also if server shutdown or restart etc.... your item will be saved in nvault until the x days finish.

P.S : I will appreciate any help, and thanks in advance.

eyal282 04-03-2017 18:04

Re: Item Menu Limit Time/ Item Per Days.
 
I will give you this plugin that sets admin for a temporary amount of time. Just make another file that determines the cooldown. I hope your scripting ability is good enough.

https://pastebin.com/XpFrvwtE

yas17sin 04-04-2017 07:56

Re: Item Menu Limit Time/ Item Per Days.
 
thanks for your help, but as i don't know how to use time in coding so any example will be enough to learn !

yas17sin 04-05-2017 19:40

Re: [HELP]Item Menu Limit Time/ Item Per Days.
 
Please i sloved the first one only, the second one need to be solved, please any help !!!

CrazY. 04-07-2017 09:52

Re: [HELP]Item Menu Limit Time/ Item Per Days.
 
Hey. I dont understand nothing about your 2nd request. You can explain to me ?

yas17sin 04-07-2017 10:22

Re: [HELP]Item Menu Limit Time/ Item Per Days.
 
Okay, in the 2nd request i need to set a item ( special guns [CSO Guns, etc....], special power [Speed, etc...], etc... ) can be buyed per x days like
PHP Code:

menu_additemmenu"\wBalrog-3 \y[650Point] \r[13days]"""0

this was an a example to understand, so i have created the point system and the shop, all i need is to make the items in shop buyable per days, and i can't do that because i don't know how to do it !!!
any help would be appreciate.

edon1337 04-07-2017 11:40

Re: [HELP]Item Menu Limit Time/ Item Per Days.
 
Which part is un-understandable here ?
Code:
#include < amxmodx > #define TIME_BUY 10.0 new bool:g_bHasBought[ 33 ] ; public plugin_init( ) {     register_clcmd( "say /test", "BuyWeapon" ) ; } public BuyWeapon( id ) {     if( g_bHasBought[ id ] )     return PLUGIN_HANDLED ;     give_item( id, "weapon_m4a1" ) ;     g_bHasBought[ id ] = true ;     set_task( TIME_BUY, "ResetBool", id ) ; } public ResetBool( id ) {     g_bHasBought[ id ] = false ;     remove_task( id ) ; }

yas17sin 04-07-2017 12:31

Re: [HELP]Item Menu Limit Time/ Item Per Days.
 
the task is for 10 secondes, and i need to set the item in shop per days, so you will have it for x days if you buy it and also if server shutdown or restart etc.... your item will be saved in nvault until the x days finish. that's what i need but thanks anyway.

edon1337 04-07-2017 12:33

Re: [HELP]Item Menu Limit Time/ Item Per Days.
 
Oh, just wait for Bugsy, I'm unexperienced with nVault.

yas17sin 04-07-2017 12:37

Re: [HELP]Menu Limit Item Per Days.
 
thanks edon1337, i guess i have to wait.


All times are GMT -4. The time now is 17:50.

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