[Include] CountDownForPlayer, CountDownForAll
#1

CountDown include 1.0
Created by:
Biesmen


About
Well, I'm sure someone else has made something like this before, but I couldn't find it on this forum. I decided to create an include like this for you. I saw some people requested an include like this. It's a very simple script. It's not hard to use, only two functions. This script will create a timer, which will stop once the second variable reached 0. It will countdowon from the seconds you selected, and it will send a final message once the countdown ended.

Functions:
pawn Код:
CountDownForAll(Color, EndMessage, Seconds);
CountDownForPlayer(playerid, Color, EndMessage, Seconds);
How-to-use
Download the file below, extract the two files to the correct folder(The correct folder is also being shown in the .rar file).
Once you installed the include, type this at the top of your gamemode/filterscript/script:
pawn Код:
#include <CountDown>
Advice how to use them in a command:
At the top of your script type:
pawn Код:
#include <sscanf2>
(Make sure you download SSCANF2 first, at this link: https://sampforum.blast.hk/showthread.php?tid=120356)

The two CMDS:

pawn Код:
dcmd_cd(playerid, params[])
{
    new color[2], time, message[30];
    if(sscanf(params, "s[2]is[30]", color, time, message)) return SendClientMessage(playerid, -1, "Usage: /cd [color] [time in seconds] [message]");
    CountDownForAll(color, message, time);
    return 1;
}

dcmd_cdp(playerid, params[])
{
    new color[2], time, message[30], giveplayerid;
    if(sscanf(params, "us[2]is[30]", giveplayerid, color, time, message)) return SendClientMessage(playerid, -1, "Usage: /cdp [playerid/PartOfName] [color] [time in seconds] [message]");
    CountDownForPlayer(giveplayerid, color, message, time);
    return 1;
}
Download
Mediafire Version: 1.0
Pastebin Version: 1.0
(Pastebin:- Make sure you've got the Foreach include by ******. (That include is included at the Mediafire mirror))
No mirrors allowed

Known bugs
-

Credits
  • Biesmen
  • ****** - Foreach include
Feedback and critism allowed. This will only make the script function and look better.
Enjoy
Reply


Messages In This Thread
CountDownForPlayer, CountDownForAll - by Biesmen - 10.05.2011, 14:57
Re: CountDownForPlayer, CountDownForAll - by gamer931215 - 10.05.2011, 15:01
Re: CountDownForPlayer, CountDownForAll - by TheGarfield - 10.05.2011, 15:09
Re: CountDownForPlayer, CountDownForAll - by Markx - 10.05.2011, 15:25
Re: CountDownForPlayer, CountDownForAll - by Biesmen - 17.05.2011, 17:52
Re: CountDownForPlayer, CountDownForAll - by Hiddos - 17.05.2011, 18:14
Re: CountDownForPlayer, CountDownForAll - by Biesmen - 17.05.2011, 18:28
Re: CountDownForPlayer, CountDownForAll - by Michael@Belgium - 17.05.2011, 18:36
Respuesta: CountDownForPlayer, CountDownForAll - by Lunnatiicz - 17.05.2011, 19:10
Re: CountDownForPlayer, CountDownForAll - by Sasino97 - 18.05.2011, 11:47

Forum Jump:


Users browsing this thread: 1 Guest(s)