CountDownForAll(Color, EndMessage, Seconds);
CountDownForPlayer(playerid, Color, EndMessage, Seconds);
#include <CountDown>
#include <sscanf2>
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;
}
stock AvailableColors(TColor[])
{
if(strcmp(TColor,"r", true) == 0) return 1;
if(strcmp(TColor,"g", true) == 0) return 1;
if(strcmp(TColor,"b", true) == 0) return 1;
if(strcmp(TColor,"w", true) == 0) return 1;
if(strcmp(TColor,"y", true) == 0) return 1;
if(strcmp(TColor,"p", true) == 0) return 1;
if(strcmp(TColor,"l", true) == 0) return 1;
if(strcmp(TColor,"h", true) == 0) return 1;
else return 0;
}
stock CountDownForAll(Color[2], EndMessage[30], Seconds)
{
foreach(Player, i)
{
if(CD[i][CDUsed] == 1) return print("CountDown ERROR: There's a player still having the Countdown messages!");
if(strlen(Color) > 1 || !AvailableColors(Color)) return print("CountDown ERROR: Invalid color used!");
if(strlen(EndMessage) > 30) return print("CountDown ERROR: End Message is too long!");
if(Seconds < 0 ) return print("CountDown ERROR: Negative amount of seconds.");
CD[i][cdc] = Color;
CD[i][cdem] = EndMessage;
CD[i][cds] = Seconds;
CDTimerA = SetTimer("CountD", 1000, true);
CD[i][CDUsed] = 1;
}
return 1;
}
#define COLOR_CDI_RED 0
#define COLOR_CDI_GREEN 1
Well, its simple.
When i /ban someone, it should show up on my website.. How to do that? A pic in attachment. |
I'm sorry, I had to reply given your signature!
"it's" has an apostrophe when used as a contraction of "it is", it does not have a apostrophe when used for possession, contrary to the usual rule for possession. If for some reason you are talking about multiple "its" (such as in this sentence) then again there is no apostrophe. Never mind that this sentence has no context and thus "it's" is incorrect and that you started it with "Well". "I" is always capitalised. "/ban" is the name of a command, and as such is a noun, not a verb. You cannot "/ban" someone, you can ban someone using "/ban", you could use your "/ban" command on someone, but there needs to be an action in the sentence. Sentences should end with only one full stop, there is sometimes a use of three, but not two. The last sentence was just a mess and I have completely rewritten it. Firstly "pic" is an abbreviation so should be "pic.", or simply "picture". Secondly that sentence has an object (the picture in the attachment) but no subject (what about the picture in the attachment)? Even as an object it is wrong and should be something more along the lines of "the picture in the attachment", or "the attached picture". If you want to be a grammar Nazi, you had better make sure you are perfect, or at least very close! If you wish to rip apart this post feel free, but I am making no claims that it is correct, unlike you. As for your original problem, how are you banning people and how are you saving that data? Does your website have access to the location in which you are storing that ban data (SQL, Scriptfiles, samp.ban etc)? |