SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 31/03/2020, 01:26 AM   #1
Nahuel0707
Little Clucker
 
Join Date: Dec 2019
Location: Argentina
Posts: 21
Reputation: 0
Default doubt command

this is my command to receive money how can i set a limit for them to put the command and wait so many minutes to put it back? thanks




CMD:recibirpaga(playerid,params[])
{
if(PlayerInfo[playerid][jMiembro] == 3)
{
DarDinero(playerid, 14000);
PlayerPlaySound(playerid,1139,0,0,0);
}
return 1;
}
Nahuel0707 is offline   Reply With Quote
Old 31/03/2020, 02:23 AM   #2
SiaReyes
Gangsta
 
Join Date: Mar 2019
Location: Coordinates X,Y,Z
Posts: 618
Reputation: 57
Default Re: doubt command

Code:
new MoneyLock[MAX_PLAYERS];
CMD:recibirpaga(playerid,params[])
{
if(PlayerInfo[playerid][jMiembro] == 3)
{
    if(MoneyLock[playerid] >= gettime()) return SendClientMessage(playerid, -1, "Command in Cooldown");
     MoneyLock[playerid] = gettime()+120; // 2 mins
    DarDinero(playerid, 14000);
    PlayerPlaySound(playerid,1139,0,0,0);
}
return 1;
}
SiaReyes is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Doubt] how to block a command BigSmokeBB Scripting Help 4 24/04/2018 11:33 AM
Doubt with Command. Shaheen Scripting Help 7 28/08/2017 07:22 PM
[Doubt] - Which command processor is faster? JhefTFJ Scripting Help 4 04/01/2017 04:09 AM
DOubt Shaheen Scripting Help 4 20/02/2016 09:09 AM
a big doubt Skylar Grey General 11 30/05/2012 02:30 AM


All times are GMT. The time now is 05:09 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.