Raised This Month: $ Target: $400
 0% 

block command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alphad
Senior Member
Join Date: Jun 2014
Old 07-08-2014 , 23:30   block command
Reply With Quote #1

I have a command on my server
/transfer NAME <AMOUNT>
How can I do that if you type /transfer it will not do anything? even if he types the full command with name and amount.
And I cant delete the plugin with it because im doing that if its your first time on the server you cant send.
Alphad is offline
PreDominance
Member
Join Date: Jul 2014
Old 07-08-2014 , 23:50   Re: block command
Reply With Quote #2

Return PLUGIN_HANDLED in order to do nothing when the user has not previously joined the server. You still need to add a check, EX if (!user_prev_exists(id)) { RETURN PLUGIN_HANDLED; }

Last edited by PreDominance; 07-08-2014 at 23:51.
PreDominance is offline
Alphad
Senior Member
Join Date: Jun 2014
Old 07-09-2014 , 00:03   Re: block command
Reply With Quote #3

Quote:
Originally Posted by PreDominance View Post
Return PLUGIN_HANDLED in order to do nothing when the user has not previously joined the server. You still need to add a check, EX if (!user_prev_exists(id)) { RETURN PLUGIN_HANDLED; }
I already have the plugin where it saves it and when its his first time or second on server
Could you tell me how to do if he is 20 min on the server he can use the command /transfer? and before that he cant.
Alphad is offline
PreDominance
Member
Join Date: Jul 2014
Old 07-09-2014 , 00:20   Re: block command
Reply With Quote #4

Learn to use the nVault system. It auto-generates timestamps for you so you can simply use those. Create the KV pair once the user hops on the server, and check it when the user types the command.
PreDominance is offline
Alphad
Senior Member
Join Date: Jun 2014
Old 07-09-2014 , 00:23   Re: block command
Reply With Quote #5

Quote:
Originally Posted by PreDominance View Post
Learn to use the nVault system. It auto-generates timestamps for you so you can simply use those. Create the KV pair once the user hops on the server, and check it when the user types the command.
Well I dont know how I already have a plugin that use Vault and saves if its the first time on the server.
I dont really know much scripting how can I do if he is 20 min on the server he can only use /transfer?
and before it just ignore? return?
Alphad is offline
plazma
Senior Member
Join Date: Oct 2013
Old 07-10-2014 , 08:55   Re: block command
Reply With Quote #6

post sma here i will help you.
__________________
Free Palestine ♥
plazma is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:05.


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