AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   block command (https://forums.alliedmods.net/showthread.php?t=243732)

Alphad 07-08-2014 23:30

block command
 
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.

PreDominance 07-08-2014 23:50

Re: block command
 
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; }

Alphad 07-09-2014 00:03

Re: block command
 
Quote:

Originally Posted by PreDominance (Post 2164291)
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.

PreDominance 07-09-2014 00:20

Re: block command
 
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.

Alphad 07-09-2014 00:23

Re: block command
 
Quote:

Originally Posted by PreDominance (Post 2164301)
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?

plazma 07-10-2014 08:55

Re: block command
 
post sma here i will help you.


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

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