[Release][SA-MP][Include] CountDown Include

Results 1 to 1 of 1
  1. #1
    01010010 01011010 Biesmen is offline
    Super ModRank
    Apr 2007 Join Date
    2,517Posts

    [Release][SA-MP][Include] CountDown Include

    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:
    Code:
    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:
    Code:
    #include <CountDown>
    Advice how to use them in a command:
    At the top of your script type:
    Code:
    #include <sscanf2>
    (Make sure you download SSCANF2 first, at this link: [Plugin] sscanf 2.0 - Fixed for 0.3c R5 - SA-MP Forums)

    The two CMDS:

    Code:
    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 Y_less. (That include is included at the Mediafire mirror))
    No mirrors allowed

    Known bugs
    -

    Credits
    • Biesmen
    • Y_Less - Foreach include


    Feedback and critism allowed. This will only make the script function and look better.
    Enjoy




Advertisement