Can't write the same command for 1 min ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Can't write the same command for 1 min ? (
/showthread.php?tid=162987)
Can't write the same command for 1 min ? -
Bumper - 25.07.2010
Is it possible to make this command -
pawn Код:
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -50);
return 1;
}
to be written only one time for on minute ?
Re: Can't write the same command for 1 min ? -
Shadow™ - 25.07.2010
Here, try this:
Click Here
Re: Can't write the same command for 1 min ? -
Bumper - 25.07.2010
WOW , that's a lot of writing ,anyways tnx
Re: Can't write the same command for 1 min ? -
Shadow™ - 25.07.2010
haha

It's alright, I'm a little bored you see so... I have to help to keep myself occupied, feel free to ask for help if you need it again.
Re: Can't write the same command for 1 min ? -
Fj0rtizFredde - 25.07.2010
Or a more simple one:
pawn Код:
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
if(GetPVarInt(playerid,"Wiiee") == 1) return SendClientMessage(playerid, COLOR, "You cant use this cmd right now.");
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -50);
SetPVarInt(playerid, "Wiiee", 1);
SetTimerEx("CantTalk", 60000, 0, "i", playerid);
return 1;
}
//At the bottom of your script:
forward CantTalk(playerid);
public CantTalk(playerid)
{
SetPVarInt(playerid, "Wiiee", 0);
return 1;
}
Re: Can't write the same command for 1 min ? -
Shadow™ - 25.07.2010
Either way, they both work.