pawn Code:
#include <a_samp>
#define COLOR_WHITE 0xFFFFFFAA
public OnFilterScriptInit()
{
print("\n---------------------------------------");
print("- Disaster's Super Simple Time System -");
print("--- Ask for more script's in skype! --- ");
print("------ Nickname: disaster.ernests ----- ");
print("---------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/time 0", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 0, 0);
return 1;
}
if (strcmp("/time 1", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 1, 0);
return 1;
}
if (strcmp("/time 2", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 2, 0);
return 1;
}
if (strcmp("/time 3", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 3, 0);
return 1;
}
if (strcmp("/time 4", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 4, 0);
return 1;
}
if (strcmp("/time 5", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 5, 0);
return 1;
}
if (strcmp("/time 6", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 6, 0);
return 1;
}
if (strcmp("/time 7", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 7, 0);
return 1;
}
if (strcmp("/time 8", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 8, 0);
return 1;
}
if (strcmp("/time 9", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 9, 0);
return 1;
}
if (strcmp("/time 10", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 10, 0);
return 1;
}
if (strcmp("/time 11", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 11, 0);
return 1;
}
if (strcmp("/time 12", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 12, 0);
return 1;
}
if (strcmp("/time 13", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 13, 0);
return 1;
}
if (strcmp("/time 14", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 14, 0);
return 1;
}
if (strcmp("/time 15", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 15, 0);
return 1;
}
if (strcmp("/time 16", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 16, 0);
return 1;
}
if (strcmp("/time 17", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 17, 0);
return 1;
}
if (strcmp("/time 18", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 18, 0);
return 1;
}
if (strcmp("/time 19", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 19, 0);
return 1;
}
if (strcmp("/time 20", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 20, 0);
return 1;
}
if (strcmp("/time 21", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 21, 0);
return 1;
}
if (strcmp("/time 22", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 22, 0);
return 1;
}
if (strcmp("/time 23", cmdtext, true, 10) == 0)
{
SetPlayerTime(playerid, 23, 0);
return 1;
}
if (strcmp("/time", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "* Usage: /time [0-23]");
return 1;
}
return 0;
}