Автор: Zero_Cool
- Код
Code: Select all
/*
Digital Clock
BY
Translate by Vlad_Chepurnoi
Требуется инклюд gl_common.inc
|||||| |||||||| |||||||| |||||||||| |||||||||| |||||||||| |||||||||| ||
| || || || || || || || || || || ||
| || || || || || || || || || || ||
| |||||||| |||||||| || || || || || || || ||
| || ||| || || || || || || || ||
| || || | || || || || || || || ||
|||||| |||||||| || | |||||||||| |||||||| |||||||||| |||||||||| |||||||||| ||||||||||
*/
#include <a_samp>
#include "../include/gl_common.inc"
new Text:DigitalTd[35];
new IsPlayerSpawned[MAX_PLAYERS];
forward Time();
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Digital Clock by Zero_Cool translate Vlad_Chepurnoi ");
print("--------------------------------------\n");
LoadTextDraws();
SetTimer("Time",1000,1);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerSpawn(playerid)
{
IsPlayerSpawned[playerid] = 1;
ShowDigitalClock(playerid);
return 1;
}
stock LoadTextDraws()
{
DigitalTd[0] = TextDrawCreate(535.000000, 139.000000, "~n~");
TextDrawAlignment(DigitalTd[0], 2);
TextDrawBackgroundColor(DigitalTd[0], 255);
TextDrawFont(DigitalTd[0], 1);
TextDrawLetterSize(DigitalTd[0], 0.500000, 2.100000);
TextDrawColor(DigitalTd[0], -1);
TextDrawSetOutline(DigitalTd[0], 0);
TextDrawSetProportional(DigitalTd[0], 1);
TextDrawSetShadow(DigitalTd[0], 1);
TextDrawUseBox(DigitalTd[0], 1);
TextDrawBoxColor(DigitalTd[0], 118);
TextDrawTextSize(DigitalTd[0], 0.000000, 60.000000);
TextDrawSetSelectable(DigitalTd[0], 0);
DigitalTd[1] = TextDrawCreate(510.000000, 140.000000, "I");
TextDrawBackgroundColor(DigitalTd[1], 255);
TextDrawFont(DigitalTd[1], 2);
TextDrawLetterSize(DigitalTd[1], 0.190000, 1.000000);
TextDrawColor(DigitalTd[1], -1);
TextDrawSetOutline(DigitalTd[1], 0);
TextDrawSetProportional(DigitalTd[1], 1);
TextDrawSetShadow(DigitalTd[1], 0);
TextDrawSetSelectable(DigitalTd[1], 0);
DigitalTd[2] = TextDrawCreate(510.000000, 147.000000, "I");
TextDrawBackgroundColor(DigitalTd[2], 255);
TextDrawFont(DigitalTd[2], 2);
TextDrawLetterSize(DigitalTd[2], 0.190000, 1.000000);
TextDrawColor(DigitalTd[2], -1);
TextDrawSetOutline(DigitalTd[2], 0);
TextDrawSetProportional(DigitalTd[2], 1);
TextDrawSetShadow(DigitalTd[2], 0);
TextDrawSetSelectable(DigitalTd[2], 0);
DigitalTd[3] = TextDrawCreate(511.000000, 150.000000, "-");
TextDrawBackgroundColor(DigitalTd[3], 255);
TextDrawFont(DigitalTd[3], 2);
TextDrawLetterSize(DigitalTd[3], 0.609999, 1.000000);
TextDrawColor(DigitalTd[3], -1);
TextDrawSetOutline(DigitalTd[3], 0);
TextDrawSetProportional(DigitalTd[3], 1);
TextDrawSetShadow(DigitalTd[3], 0);
TextDrawSetSelectable(DigitalTd[3], 0);
DigitalTd[4] = TextDrawCreate(511.000000, 143.000000, "-");
TextDrawBackgroundColor(DigitalTd[4], 255);
TextDrawFont(DigitalTd[4], 2);
TextDrawLetterSize(DigitalTd[4], 0.609999, 1.000000);
TextDrawColor(DigitalTd[4], -1);
TextDrawSetOutline(DigitalTd[4], 0);
TextDrawSetProportional(DigitalTd[4], 1);
TextDrawSetShadow(DigitalTd[4], 0);
TextDrawSetSelectable(DigitalTd[4], 0);
DigitalTd[5] = TextDrawCreate(511.000000, 137.000000, "-");
TextDrawBackgroundColor(DigitalTd[5], 255);
TextDrawFont(DigitalTd[5], 2);
TextDrawLetterSize(DigitalTd[5], 0.609999, 1.000000);
TextDrawColor(DigitalTd[5], -1);
TextDrawSetOutline(DigitalTd[5], 0);
TextDrawSetProportional(DigitalTd[5], 1);
TextDrawSetShadow(DigitalTd[5], 0);
TextDrawSetSelectable(DigitalTd[5], 0);
DigitalTd[6] = TextDrawCreate(517.000000, 140.000000, "I");
TextDrawBackgroundColor(DigitalTd[6], 255);
TextDrawFont(DigitalTd[6], 2);
TextDrawLetterSize(DigitalTd[6], 0.190000, 1.000000);
TextDrawColor(DigitalTd[6], -1);
TextDrawSetOutline(DigitalTd[6], 0);
TextDrawSetProportional(DigitalTd[6], 1);
TextDrawSetShadow(DigitalTd[6], 0);
TextDrawSetSelectable(DigitalTd[6], 0);
DigitalTd[7] = TextDrawCreate(517.000000, 147.000000, "I");
TextDrawBackgroundColor(DigitalTd[7], 255);
TextDrawFont(DigitalTd[7], 2);
TextDrawLetterSize(DigitalTd[7], 0.190000, 1.000000);
TextDrawColor(DigitalTd[7], -1);
TextDrawSetOutline(DigitalTd[7], 0);
TextDrawSetProportional(DigitalTd[7], 1);
TextDrawSetShadow(DigitalTd[7], 0);
TextDrawSetSelectable(DigitalTd[7], 0);
DigitalTd[8] = TextDrawCreate(520.000000, 140.000000, "I");
TextDrawBackgroundColor(DigitalTd[8], 255);
TextDrawFont(DigitalTd[8], 2);
TextDrawLetterSize(DigitalTd[8], 0.190000, 1.000000);
TextDrawColor(DigitalTd[8], -1);
TextDrawSetOutline(DigitalTd[8], 0);
TextDrawSetProportional(DigitalTd[8], 1);
TextDrawSetShadow(DigitalTd[8], 0);
TextDrawSetSelectable(DigitalTd[8], 0);
DigitalTd[9] = TextDrawCreate(520.000000, 147.000000, "I");
TextDrawBackgroundColor(DigitalTd[9], 255);
TextDrawFont(DigitalTd[9], 2);
TextDrawLetterSize(DigitalTd[9], 0.190000, 1.000000);
TextDrawColor(DigitalTd[9], -1);
TextDrawSetOutline(DigitalTd[9], 0);
TextDrawSetProportional(DigitalTd[9], 1);
TextDrawSetShadow(DigitalTd[9], 0);
TextDrawSetSelectable(DigitalTd[9], 0);
DigitalTd[10] = TextDrawCreate(521.000000, 150.000000, "-");
TextDrawBackgroundColor(DigitalTd[10], 255);
TextDrawFont(DigitalTd[10], 2);
TextDrawLetterSize(DigitalTd[10], 0.609999, 1.000000);
TextDrawColor(DigitalTd[10], -1);
TextDrawSetOutline(DigitalTd[10], 0);
TextDrawSetProportional(DigitalTd[10], 1);
TextDrawSetShadow(DigitalTd[10], 0);
TextDrawSetSelectable(DigitalTd[10], 0);
DigitalTd[11] = TextDrawCreate(521.000000, 143.000000, "-");
TextDrawBackgroundColor(DigitalTd[11], 255);
TextDrawFont(DigitalTd[11], 2);
TextDrawLetterSize(DigitalTd[11], 0.609999, 1.000000);
TextDrawColor(DigitalTd[11], -1);
TextDrawSetOutline(DigitalTd[11], 0);
TextDrawSetProportional(DigitalTd[11], 1);
TextDrawSetShadow(DigitalTd[11], 0);
TextDrawSetSelectable(DigitalTd[11], 0);
DigitalTd[12] = TextDrawCreate(521.000000, 137.000000, "-");
TextDrawBackgroundColor(DigitalTd[12], 255);
TextDrawFont(DigitalTd[12], 2);
TextDrawLetterSize(DigitalTd[12], 0.609999, 1.000000);
TextDrawColor(DigitalTd[12], -1);
TextDrawSetOutline(DigitalTd[12], 0);
TextDrawSetProportional(DigitalTd[12], 1);
TextDrawSetShadow(DigitalTd[12], 0);
TextDrawSetSelectable(DigitalTd[12], 0);
DigitalTd[13] = TextDrawCreate(527.000000, 140.000000, "I");
TextDrawBackgroundColor(DigitalTd[13], 255);
TextDrawFont(DigitalTd[13], 2);
TextDrawLetterSize(DigitalTd[13], 0.190000, 1.000000);
TextDrawColor(DigitalTd[13], -1);
TextDrawSetOutline(DigitalTd[13], 0);
TextDrawSetProportional(DigitalTd[13], 1);
TextDrawSetShadow(DigitalTd[13], 0);
TextDrawSetSelectable(DigitalTd[13], 0);
DigitalTd[14] = TextDrawCreate(527.000000, 147.000000, "I");
TextDrawBackgroundColor(DigitalTd[14], 255);
TextDrawFont(DigitalTd[14], 2);
TextDrawLetterSize(DigitalTd[14], 0.190000, 1.000000);
TextDrawColor(DigitalTd[14], -1);
TextDrawSetOutline(DigitalTd[14], 0);
TextDrawSetProportional(DigitalTd[14], 1);
TextDrawSetShadow(DigitalTd[14], 0);
TextDrawSetSelectable(DigitalTd[14], 0);
DigitalTd[15] = TextDrawCreate(539.000000, 140.000000, "I");
TextDrawBackgroundColor(DigitalTd[15], 255);
TextDrawFont(DigitalTd[15], 2);
TextDrawLetterSize(DigitalTd[15], 0.190000, 1.000000);
TextDrawColor(DigitalTd[15], -1);
TextDrawSetOutline(DigitalTd[15], 0);
TextDrawSetProportional(DigitalTd[15], 1);
TextDrawSetShadow(DigitalTd[15], 0);
TextDrawSetSelectable(DigitalTd[15], 0);
DigitalTd[16] = TextDrawCreate(539.000000, 147.000000, "I");
TextDrawBackgroundColor(DigitalTd[16], 255);
TextDrawFont(DigitalTd[16], 2);
TextDrawLetterSize(DigitalTd[16], 0.190000, 1.000000);
TextDrawColor(DigitalTd[16], -1);
TextDrawSetOutline(DigitalTd[16], 0);
TextDrawSetProportional(DigitalTd[16], 1);
TextDrawSetShadow(DigitalTd[16], 0);
TextDrawSetSelectable(DigitalTd[16], 0);
DigitalTd[17] = TextDrawCreate(540.000000, 150.000000, "-");
TextDrawBackgroundColor(DigitalTd[17], 255);
TextDrawFont(DigitalTd[17], 2);
TextDrawLetterSize(DigitalTd[17], 0.609999, 1.000000);
TextDrawColor(DigitalTd[17], -1);
TextDrawSetOutline(DigitalTd[17], 0);
TextDrawSetProportional(DigitalTd[17], 1);
TextDrawSetShadow(DigitalTd[17], 0);
TextDrawSetSelectable(DigitalTd[17], 0);
DigitalTd[18] = TextDrawCreate(540.000000, 143.000000, "-");
TextDrawBackgroundColor(DigitalTd[18], 255);
TextDrawFont(DigitalTd[18], 2);
TextDrawLetterSize(DigitalTd[18], 0.609999, 1.000000);
TextDrawColor(DigitalTd[18], -1);
TextDrawSetOutline(DigitalTd[18], 0);
TextDrawSetProportional(DigitalTd[18], 1);
TextDrawSetShadow(DigitalTd[18], 0);
TextDrawSetSelectable(DigitalTd[18], 0);
DigitalTd[19] = TextDrawCreate(540.000000, 137.000000, "-");
TextDrawBackgroundColor(DigitalTd[19], 255);
TextDrawFont(DigitalTd[19], 2);
TextDrawLetterSize(DigitalTd[19], 0.609999, 1.000000);
TextDrawColor(DigitalTd[19], -1);
TextDrawSetOutline(DigitalTd[19], 0);
TextDrawSetProportional(DigitalTd[19], 1);
TextDrawSetShadow(DigitalTd[19], 0);
TextDrawSetSelectable(DigitalTd[19], 0);
DigitalTd[20] = TextDrawCreate(546.000000, 140.000000, "I");
TextDrawBackgroundColor(DigitalTd[20], 255);
TextDrawFont(DigitalTd[20], 2);
TextDrawLetterSize(DigitalTd[20], 0.190000, 1.000000);
TextDrawColor(DigitalTd[20], -1);
TextDrawSetOutline(DigitalTd[20], 0);
TextDrawSetProportional(DigitalTd[20], 1);
TextDrawSetShadow(DigitalTd[20], 0);
TextDrawSetSelectable(DigitalTd[20], 0);
DigitalTd[21] = TextDrawCreate(546.000000, 147.000000, "I");
TextDrawBackgroundColor(DigitalTd[21], 255);
TextDrawFont(DigitalTd[21], 2);
TextDrawLetterSize(DigitalTd[21], 0.190000, 1.000000);
TextDrawColor(DigitalTd[21], -1);
TextDrawSetOutline(DigitalTd[21], 0);
TextDrawSetProportional(DigitalTd[21], 1);
TextDrawSetShadow(DigitalTd[21], 0);
TextDrawSetSelectable(DigitalTd[21], 0);
DigitalTd[22] = TextDrawCreate(549.000000, 140.000000, "I");
TextDrawBackgroundColor(DigitalTd[22], 255);
TextDrawFont(DigitalTd[22], 2);
TextDrawLetterSize(DigitalTd[22], 0.190000, 1.000000);
TextDrawColor(DigitalTd[22], -1);
TextDrawSetOutline(DigitalTd[22], 0);
TextDrawSetProportional(DigitalTd[22], 1);
TextDrawSetShadow(DigitalTd[22], 0);
TextDrawSetSelectable(DigitalTd[22], 0);
DigitalTd[23] = TextDrawCreate(549.000000, 147.000000, "I");
TextDrawBackgroundColor(DigitalTd[23], 255);
TextDrawFont(DigitalTd[23], 2);
TextDrawLetterSize(DigitalTd[23], 0.190000, 1.000000);
TextDrawColor(DigitalTd[23], -1);
TextDrawSetOutline(DigitalTd[23], 0);
TextDrawSetProportional(DigitalTd[23], 1);
TextDrawSetShadow(DigitalTd[23], 0);
TextDrawSetSelectable(DigitalTd[23], 0);
DigitalTd[24] = TextDrawCreate(550.000000, 150.000000, "-");
TextDrawBackgroundColor(DigitalTd[24], 255);
TextDrawFont(DigitalTd[24], 2);
TextDrawLetterSize(DigitalTd[24], 0.609999, 1.000000);
TextDrawColor(DigitalTd[24], -1);
TextDrawSetOutline(DigitalTd[24], 0);
TextDrawSetProportional(DigitalTd[24], 1);
TextDrawSetShadow(DigitalTd[24], 0);
TextDrawSetSelectable(DigitalTd[24], 0);
DigitalTd[25] = TextDrawCreate(550.000000, 143.000000, "-");
TextDrawBackgroundColor(DigitalTd[25], 255);
TextDrawFont(DigitalTd[25], 2);
TextDrawLetterSize(DigitalTd[25], 0.609999, 1.000000);
TextDrawColor(DigitalTd[25], -1);
TextDrawSetOutline(DigitalTd[25], 0);
TextDrawSetProportional(DigitalTd[25], 1);
TextDrawSetShadow(DigitalTd[25], 0);
TextDrawSetSelectable(DigitalTd[25], 0);
DigitalTd[26] = TextDrawCreate(550.000000, 137.000000, "-");
TextDrawBackgroundColor(DigitalTd[26], 255);
TextDrawFont(DigitalTd[26], 2);
TextDrawLetterSize(DigitalTd[26], 0.609999, 1.000000);
TextDrawColor(DigitalTd[26], -1);
TextDrawSetOutline(DigitalTd[26], 0);
TextDrawSetProportional(DigitalTd[26], 1);
TextDrawSetShadow(DigitalTd[26], 0);
TextDrawSetSelectable(DigitalTd[26], 0);
DigitalTd[27] = TextDrawCreate(556.000000, 140.000000, "I");
TextDrawBackgroundColor(DigitalTd[27], 255);
TextDrawFont(DigitalTd[27], 2);
TextDrawLetterSize(DigitalTd[27], 0.190000, 1.000000);
TextDrawColor(DigitalTd[27], -1);
TextDrawSetOutline(DigitalTd[27], 0);
TextDrawSetProportional(DigitalTd[27], 1);
TextDrawSetShadow(DigitalTd[27], 0);
TextDrawSetSelectable(DigitalTd[27], 0);
DigitalTd[28] = TextDrawCreate(556.000000, 147.000000, "I");
TextDrawBackgroundColor(DigitalTd[28], 255);
TextDrawFont(DigitalTd[28], 2);
TextDrawLetterSize(DigitalTd[28], 0.190000, 1.000000);
TextDrawColor(DigitalTd[28], -1);
TextDrawSetOutline(DigitalTd[28], 0);
TextDrawSetProportional(DigitalTd[28], 1);
TextDrawSetShadow(DigitalTd[28], 0);
TextDrawSetSelectable(DigitalTd[28], 0);
DigitalTd[29] = TextDrawCreate(533.000000, 144.000000, "I");
TextDrawBackgroundColor(DigitalTd[29], 255);
TextDrawFont(DigitalTd[29], 2);
TextDrawLetterSize(DigitalTd[29], 0.190000, 0.499999);
TextDrawColor(DigitalTd[29], -1);
TextDrawSetOutline(DigitalTd[29], 0);
TextDrawSetProportional(DigitalTd[29], 1);
TextDrawSetShadow(DigitalTd[29], 0);
TextDrawSetSelectable(DigitalTd[29], 0);
DigitalTd[30] = TextDrawCreate(533.000000, 150.000000, "I");
TextDrawBackgroundColor(DigitalTd[30], 255);
TextDrawFont(DigitalTd[30], 2);
TextDrawLetterSize(DigitalTd[30], 0.190000, 0.499999);
TextDrawColor(DigitalTd[30], -1);
TextDrawSetOutline(DigitalTd[30], 0);
TextDrawSetProportional(DigitalTd[30], 1);
TextDrawSetShadow(DigitalTd[30], 0);
TextDrawSetSelectable(DigitalTd[30], 0);
DigitalTd[31] = TextDrawCreate(503.000000, 139.000000, "~n~");
TextDrawAlignment(DigitalTd[31], 2);
TextDrawBackgroundColor(DigitalTd[31], 255);
TextDrawFont(DigitalTd[31], 1);
TextDrawLetterSize(DigitalTd[31], 0.500000, 2.100000);
TextDrawColor(DigitalTd[31], -1);
TextDrawSetOutline(DigitalTd[31], 0);
TextDrawSetProportional(DigitalTd[31], 1);
TextDrawSetShadow(DigitalTd[31], 1);
TextDrawUseBox(DigitalTd[31], 1);
TextDrawBoxColor(DigitalTd[31], -16776961);
TextDrawTextSize(DigitalTd[31], 0.000000, -3.000000);
TextDrawSetSelectable(DigitalTd[31], 0);
DigitalTd[32] = TextDrawCreate(567.000000, 139.000000, "~n~");
TextDrawAlignment(DigitalTd[32], 2);
TextDrawBackgroundColor(DigitalTd[32], 255);
TextDrawFont(DigitalTd[32], 1);
TextDrawLetterSize(DigitalTd[32], 0.500000, 2.100000);
TextDrawColor(DigitalTd[32], -1);
TextDrawSetOutline(DigitalTd[32], 0);
TextDrawSetProportional(DigitalTd[32], 1);
TextDrawSetShadow(DigitalTd[32], 1);
TextDrawUseBox(DigitalTd[32], 1);
TextDrawBoxColor(DigitalTd[32], -16776961);
TextDrawTextSize(DigitalTd[32], 0.000000, -3.000000);
TextDrawSetSelectable(DigitalTd[32], 0);
DigitalTd[33] = TextDrawCreate(535.000000, 162.000000, "~n~");
TextDrawAlignment(DigitalTd[33], 2);
TextDrawBackgroundColor(DigitalTd[33], 255);
TextDrawFont(DigitalTd[33], 1);
TextDrawLetterSize(DigitalTd[33], 0.500000, -0.399999);
TextDrawColor(DigitalTd[33], -1);
TextDrawSetOutline(DigitalTd[33], 0);
TextDrawSetProportional(DigitalTd[33], 1);
TextDrawSetShadow(DigitalTd[33], 1);
TextDrawUseBox(DigitalTd[33], 1);
TextDrawBoxColor(DigitalTd[33], -16776961);
TextDrawTextSize(DigitalTd[33], 0.000000, 61.000000);
TextDrawSetSelectable(DigitalTd[33], 0);
DigitalTd[34] = TextDrawCreate(535.000000, 139.000000, "~n~");
TextDrawAlignment(DigitalTd[34], 2);
TextDrawBackgroundColor(DigitalTd[34], 255);
TextDrawFont(DigitalTd[34], 1);
TextDrawLetterSize(DigitalTd[34], 0.500000, -0.399999);
TextDrawColor(DigitalTd[34], -1);
TextDrawSetOutline(DigitalTd[34], 0);
TextDrawSetProportional(DigitalTd[34], 1);
TextDrawSetShadow(DigitalTd[34], 1);
TextDrawUseBox(DigitalTd[34], 1);
TextDrawBoxColor(DigitalTd[34], -16776961);
TextDrawTextSize(DigitalTd[34], 0.000000, 61.000000);
TextDrawSetSelectable(DigitalTd[34], 0);
}
stock ShowDigitalClock(playerid)
{
TextDrawShowForPlayer(playerid,DigitalTd[0]);
TextDrawShowForPlayer(playerid,DigitalTd[29]);
TextDrawShowForPlayer(playerid,DigitalTd[30]);
TextDrawShowForPlayer(playerid,DigitalTd[31]);
TextDrawShowForPlayer(playerid,DigitalTd[32]);
TextDrawShowForPlayer(playerid,DigitalTd[33]);
TextDrawShowForPlayer(playerid,DigitalTd[34]);
}
stock HideDigitalClock(playerid)
{
for(new t;t<31;t++)
{
TextDrawHideForPlayer(playerid,DigitalTd[t]);
}
}
stock SetStringForFrstNumber(playerid,number)
{
if(number == 0)
{
TextDrawShowForPlayer(playerid,DigitalTd[1]);
TextDrawShowForPlayer(playerid,DigitalTd[2]);
TextDrawShowForPlayer(playerid,DigitalTd[3]);
TextDrawHideForPlayer(playerid,DigitalTd[4]);
TextDrawShowForPlayer(playerid,DigitalTd[5]);
TextDrawShowForPlayer(playerid,DigitalTd[6]);
TextDrawShowForPlayer(playerid,DigitalTd[7]);
}
if(number == 1)
{
TextDrawHideForPlayer(playerid,DigitalTd[1]);
TextDrawHideForPlayer(playerid,DigitalTd[2]);
TextDrawHideForPlayer(playerid,DigitalTd[3]);
TextDrawHideForPlayer(playerid,DigitalTd[4]);
TextDrawHideForPlayer(playerid,DigitalTd[5]);
TextDrawShowForPlayer(playerid,DigitalTd[6]);
TextDrawShowForPlayer(playerid,DigitalTd[7]);
}
if(number == 2)
{
TextDrawHideForPlayer(playerid,DigitalTd[1]);
TextDrawShowForPlayer(playerid,DigitalTd[2]);
TextDrawShowForPlayer(playerid,DigitalTd[3]);
TextDrawShowForPlayer(playerid,DigitalTd[4]);
TextDrawShowForPlayer(playerid,DigitalTd[5]);
TextDrawShowForPlayer(playerid,DigitalTd[6]);
TextDrawHideForPlayer(playerid,DigitalTd[7]);
}
}
stock SetStringForSecondNumber(playerid,number)
{
if(number == 0 || number == 10 || number == 20 || number == 30 || number == 40 || number == 50)
{
TextDrawShowForPlayer(playerid,DigitalTd[8]);
TextDrawShowForPlayer(playerid,DigitalTd[9]);
TextDrawShowForPlayer(playerid,DigitalTd[10]);
TextDrawHideForPlayer(playerid,DigitalTd[11]);
TextDrawShowForPlayer(playerid,DigitalTd[12]);
TextDrawShowForPlayer(playerid,DigitalTd[13]);
TextDrawShowForPlayer(playerid,DigitalTd[14]);
}
if(number == 1 || number == 11 || number == 21 || number == 31 || number == 41 || number == 51)
{
TextDrawHideForPlayer(playerid,DigitalTd[8]);
TextDrawHideForPlayer(playerid,DigitalTd[9]);
TextDrawHideForPlayer(playerid,DigitalTd[10]);
TextDrawHideForPlayer(playerid,DigitalTd[11]);
TextDrawHideForPlayer(playerid,DigitalTd[12]);
TextDrawShowForPlayer(playerid,DigitalTd[13]);
TextDrawShowForPlayer(playerid,DigitalTd[14]);
}
if(number == 2 || number == 12 || number == 22 || number == 32 || number == 42 || number == 52)
{
TextDrawHideForPlayer(playerid,DigitalTd[8]);
TextDrawShowForPlayer(playerid,DigitalTd[9]);
TextDrawShowForPlayer(playerid,DigitalTd[10]);
TextDrawShowForPlayer(playerid,DigitalTd[11]);
TextDrawShowForPlayer(playerid,DigitalTd[12]);
TextDrawShowForPlayer(playerid,DigitalTd[13]);
TextDrawHideForPlayer(playerid,DigitalTd[14]);
}
if(number == 3 || number == 13 || number == 23 || number == 33 || number == 43 || number == 53)
{
TextDrawHideForPlayer(playerid,DigitalTd[8]);
TextDrawHideForPlayer(playerid,DigitalTd[9]);
TextDrawShowForPlayer(playerid,DigitalTd[10]);
TextDrawShowForPlayer(playerid,DigitalTd[11]);
TextDrawShowForPlayer(playerid,DigitalTd[12]);
TextDrawShowForPlayer(playerid,DigitalTd[13]);
TextDrawShowForPlayer(playerid,DigitalTd[14]);
}
if(number == 4 || number == 14 || number == 24 || number == 34 || number == 44 || number == 54)
{
TextDrawShowForPlayer(playerid,DigitalTd[8]);
TextDrawHideForPlayer(playerid,DigitalTd[9]);
TextDrawHideForPlayer(playerid,DigitalTd[10]);
TextDrawShowForPlayer(playerid,DigitalTd[11]);
TextDrawHideForPlayer(playerid,DigitalTd[12]);
TextDrawShowForPlayer(playerid,DigitalTd[13]);
TextDrawShowForPlayer(playerid,DigitalTd[14]);
}
if(number == 5 || number == 15 || number == 25 || number == 35 || number == 45 || number == 55)
{
TextDrawShowForPlayer(playerid,DigitalTd[8]);
TextDrawHideForPlayer(playerid,DigitalTd[9]);
TextDrawShowForPlayer(playerid,DigitalTd[10]);
TextDrawShowForPlayer(playerid,DigitalTd[11]);
TextDrawShowForPlayer(playerid,DigitalTd[12]);
TextDrawHideForPlayer(playerid,DigitalTd[13]);
TextDrawShowForPlayer(playerid,DigitalTd[14]);
}
if(number == 6 || number == 16 || number == 26 || number == 36 || number == 46 || number == 56)
{
TextDrawShowForPlayer(playerid,DigitalTd[8]);
TextDrawShowForPlayer(playerid,DigitalTd[9]);
TextDrawShowForPlayer(playerid,DigitalTd[10]);
TextDrawShowForPlayer(playerid,DigitalTd[11]);
TextDrawShowForPlayer(playerid,DigitalTd[12]);
TextDrawHideForPlayer(playerid,DigitalTd[13]);
TextDrawShowForPlayer(playerid,DigitalTd[14]);
}
if(number == 7 || number == 17 || number == 27 || number == 37 || number == 47 || number == 57)
{
TextDrawShowForPlayer(playerid,DigitalTd[8]);
TextDrawHideForPlayer(playerid,DigitalTd[9]);
TextDrawHideForPlayer(playerid,DigitalTd[10]);
TextDrawHideForPlayer(playerid,DigitalTd[11]);
TextDrawShowForPlayer(playerid,DigitalTd[12]);
TextDrawShowForPlayer(playerid,DigitalTd[13]);
TextDrawShowForPlayer(playerid,DigitalTd[14]);
}
if(number == 8 || number == 18 || number == 28 || number == 38 || number == 48 || number == 58)
{
TextDrawShowForPlayer(playerid,DigitalTd[8]);
TextDrawShowForPlayer(playerid,DigitalTd[9]);
TextDrawShowForPlayer(playerid,DigitalTd[10]);
TextDrawShowForPlayer(playerid,DigitalTd[11]);
TextDrawShowForPlayer(playerid,DigitalTd[12]);
TextDrawShowForPlayer(playerid,DigitalTd[13]);
TextDrawShowForPlayer(playerid,DigitalTd[14]);
}
if(number == 9 || number == 19 || number == 29 || number == 39 || number == 49 || number == 59)
{
TextDrawShowForPlayer(playerid,DigitalTd[8]);
TextDrawHideForPlayer(playerid,DigitalTd[9]);
TextDrawShowForPlayer(playerid,DigitalTd[10]);
TextDrawShowForPlayer(playerid,DigitalTd[11]);
TextDrawShowForPlayer(playerid,DigitalTd[12]);
TextDrawShowForPlayer(playerid,DigitalTd[13]);
TextDrawShowForPlayer(playerid,DigitalTd[14]);
}
}
stock SetStringForThirdNumber(playerid,number)
{
if(number == 0 || number == 10 || number == 20 || number == 30 || number == 40 || number == 50)
{
TextDrawShowForPlayer(playerid,DigitalTd[15]);
TextDrawShowForPlayer(playerid,DigitalTd[16]);
TextDrawShowForPlayer(playerid,DigitalTd[17]);
TextDrawHideForPlayer(playerid,DigitalTd[18]);
TextDrawShowForPlayer(playerid,DigitalTd[19]);
TextDrawShowForPlayer(playerid,DigitalTd[20]);
TextDrawShowForPlayer(playerid,DigitalTd[21]);
}
if(number == 1 || number == 11 || number == 21 || number == 31 || number == 41 || number == 51)
{
TextDrawShowForPlayer(playerid,DigitalTd[15]);
TextDrawShowForPlayer(playerid,DigitalTd[16]);
TextDrawHideForPlayer(playerid,DigitalTd[17]);
TextDrawHideForPlayer(playerid,DigitalTd[18]);
TextDrawHideForPlayer(playerid,DigitalTd[19]);
TextDrawHideForPlayer(playerid,DigitalTd[20]);
TextDrawHideForPlayer(playerid,DigitalTd[21]);
}
if(number == 2 || number == 12 || number == 22 || number == 32 || number == 42 || number == 52)
{
TextDrawHideForPlayer(playerid,DigitalTd[15]);
TextDrawShowForPlayer(playerid,DigitalTd[16]);
TextDrawShowForPlayer(playerid,DigitalTd[17]);
TextDrawShowForPlayer(playerid,DigitalTd[18]);
TextDrawShowForPlayer(playerid,DigitalTd[19]);
TextDrawShowForPlayer(playerid,DigitalTd[20]);
TextDrawHideForPlayer(playerid,DigitalTd[21]);
}
if(number == 3 || number == 13 || number == 23 || number == 33 || number == 43 || number == 53)
{
TextDrawHideForPlayer(playerid,DigitalTd[15]);
TextDrawHideForPlayer(playerid,DigitalTd[16]);
TextDrawShowForPlayer(playerid,DigitalTd[17]);
TextDrawShowForPlayer(playerid,DigitalTd[18]);
TextDrawShowForPlayer(playerid,DigitalTd[19]);
TextDrawShowForPlayer(playerid,DigitalTd[20]);
TextDrawShowForPlayer(playerid,DigitalTd[21]);
}
if(number == 4 || number == 14 || number == 24 || number == 34 || number == 44 || number == 54)
{
TextDrawShowForPlayer(playerid,DigitalTd[15]);
TextDrawHideForPlayer(playerid,DigitalTd[16]);
TextDrawHideForPlayer(playerid,DigitalTd[17]);
TextDrawShowForPlayer(playerid,DigitalTd[18]);
TextDrawHideForPlayer(playerid,DigitalTd[19]);
TextDrawShowForPlayer(playerid,DigitalTd[20]);
TextDrawShowForPlayer(playerid,DigitalTd[21]);
}
if(number == 5 || number == 15 || number == 25 || number == 35 || number == 45 || number == 55)
{
TextDrawShowForPlayer(playerid,DigitalTd[15]);
TextDrawHideForPlayer(playerid,DigitalTd[16]);
TextDrawShowForPlayer(playerid,DigitalTd[17]);
TextDrawShowForPlayer(playerid,DigitalTd[18]);
TextDrawShowForPlayer(playerid,DigitalTd[19]);
TextDrawHideForPlayer(playerid,DigitalTd[20]);
TextDrawShowForPlayer(playerid,DigitalTd[21]);
}
if(number == 6)
{
TextDrawShowForPlayer(playerid,DigitalTd[15]);
TextDrawShowForPlayer(playerid,DigitalTd[16]);
TextDrawShowForPlayer(playerid,DigitalTd[17]);
TextDrawShowForPlayer(playerid,DigitalTd[18]);
TextDrawShowForPlayer(playerid,DigitalTd[19]);
TextDrawHideForPlayer(playerid,DigitalTd[20]);
TextDrawShowForPlayer(playerid,DigitalTd[21]);
}
if(number == 7 || number == 17 || number == 27 || number == 37 || number == 47 || number == 57)
{
TextDrawShowForPlayer(playerid,DigitalTd[15]);
TextDrawHideForPlayer(playerid,DigitalTd[16]);
TextDrawHideForPlayer(playerid,DigitalTd[17]);
TextDrawHideForPlayer(playerid,DigitalTd[18]);
TextDrawShowForPlayer(playerid,DigitalTd[19]);
TextDrawShowForPlayer(playerid,DigitalTd[20]);
TextDrawShowForPlayer(playerid,DigitalTd[21]);
}
if(number == 8 || number == 18 || number == 28 || number == 38 || number == 48 || number == 58)
{
TextDrawShowForPlayer(playerid,DigitalTd[15]);
TextDrawShowForPlayer(playerid,DigitalTd[16]);
TextDrawShowForPlayer(playerid,DigitalTd[17]);
TextDrawShowForPlayer(playerid,DigitalTd[18]);
TextDrawShowForPlayer(playerid,DigitalTd[19]);
TextDrawShowForPlayer(playerid,DigitalTd[20]);
TextDrawShowForPlayer(playerid,DigitalTd[21]);
}
if(number == 9 || number == 19 || number == 29 || number == 39 || number == 49 || number == 59)
{
TextDrawShowForPlayer(playerid,DigitalTd[15]);
TextDrawHideForPlayer(playerid,DigitalTd[16]);
TextDrawShowForPlayer(playerid,DigitalTd[17]);
TextDrawShowForPlayer(playerid,DigitalTd[18]);
TextDrawShowForPlayer(playerid,DigitalTd[19]);
TextDrawShowForPlayer(playerid,DigitalTd[20]);
TextDrawShowForPlayer(playerid,DigitalTd[21]);
}
}
stock SetStringForFourthNumber(playerid,number)
{
if(number == 0 || number == 10 || number == 20 || number == 30 || number == 40 || number == 50)
{
TextDrawShowForPlayer(playerid,DigitalTd[22]);
TextDrawShowForPlayer(playerid,DigitalTd[23]);
TextDrawShowForPlayer(playerid,DigitalTd[24]);
TextDrawHideForPlayer(playerid,DigitalTd[25]);
TextDrawShowForPlayer(playerid,DigitalTd[26]);
TextDrawShowForPlayer(playerid,DigitalTd[27]);
TextDrawShowForPlayer(playerid,DigitalTd[28]);
}
if(number == 1 || number == 11 || number == 21 || number == 31 || number == 41 || number == 51)
{
TextDrawHideForPlayer(playerid,DigitalTd[22]);
TextDrawHideForPlayer(playerid,DigitalTd[23]);
TextDrawHideForPlayer(playerid,DigitalTd[24]);
TextDrawHideForPlayer(playerid,DigitalTd[25]);
TextDrawHideForPlayer(playerid,DigitalTd[26]);
TextDrawShowForPlayer(playerid,DigitalTd[27]);
TextDrawShowForPlayer(playerid,DigitalTd[28]);
}
if(number == 2 || number == 12 || number == 22 || number == 32 || number == 42 || number == 52)
{
TextDrawHideForPlayer(playerid,DigitalTd[22]);
TextDrawShowForPlayer(playerid,DigitalTd[23]);
TextDrawShowForPlayer(playerid,DigitalTd[24]);
TextDrawShowForPlayer(playerid,DigitalTd[25]);
TextDrawShowForPlayer(playerid,DigitalTd[26]);
TextDrawShowForPlayer(playerid,DigitalTd[27]);
TextDrawHideForPlayer(playerid,DigitalTd[28]);
}
if(number == 3 || number == 13 || number == 23 || number == 33 || number == 43 || number == 53)
{
TextDrawHideForPlayer(playerid,DigitalTd[22]);
TextDrawHideForPlayer(playerid,DigitalTd[23]);
TextDrawShowForPlayer(playerid,DigitalTd[24]);
TextDrawShowForPlayer(playerid,DigitalTd[25]);
TextDrawShowForPlayer(playerid,DigitalTd[26]);
TextDrawShowForPlayer(playerid,DigitalTd[27]);
TextDrawShowForPlayer(playerid,DigitalTd[28]);
}
if(number == 4 || number == 14 || number == 24 || number == 34 || number == 44 || number == 54)
{
TextDrawShowForPlayer(playerid,DigitalTd[22]);
TextDrawHideForPlayer(playerid,DigitalTd[23]);
TextDrawHideForPlayer(playerid,DigitalTd[24]);
TextDrawShowForPlayer(playerid,DigitalTd[25]);
TextDrawHideForPlayer(playerid,DigitalTd[26]);
TextDrawShowForPlayer(playerid,DigitalTd[27]);
TextDrawShowForPlayer(playerid,DigitalTd[28]);
}
if(number == 5 || number == 15 || number == 25 || number == 35 || number == 45 || number == 55)
{
TextDrawShowForPlayer(playerid,DigitalTd[22]);
TextDrawHideForPlayer(playerid,DigitalTd[23]);
TextDrawShowForPlayer(playerid,DigitalTd[24]);
TextDrawShowForPlayer(playerid,DigitalTd[25]);
TextDrawShowForPlayer(playerid,DigitalTd[26]);
TextDrawHideForPlayer(playerid,DigitalTd[27]);
TextDrawShowForPlayer(playerid,DigitalTd[28]);
}
if(number == 6 || number == 16 || number == 26 || number == 36 || number == 46 || number == 56)
{
TextDrawShowForPlayer(playerid,DigitalTd[22]);
TextDrawShowForPlayer(playerid,DigitalTd[23]);
TextDrawShowForPlayer(playerid,DigitalTd[24]);
TextDrawShowForPlayer(playerid,DigitalTd[25]);
TextDrawShowForPlayer(playerid,DigitalTd[26]);
TextDrawHideForPlayer(playerid,DigitalTd[27]);
TextDrawShowForPlayer(playerid,DigitalTd[28]);
}
if(number == 7 || number == 17 || number == 27 || number == 37 || number == 47 || number == 57)
{
TextDrawShowForPlayer(playerid,DigitalTd[22]);
TextDrawHideForPlayer(playerid,DigitalTd[23]);
TextDrawHideForPlayer(playerid,DigitalTd[24]);
TextDrawHideForPlayer(playerid,DigitalTd[25]);
TextDrawShowForPlayer(playerid,DigitalTd[26]);
TextDrawShowForPlayer(playerid,DigitalTd[27]);
TextDrawShowForPlayer(playerid,DigitalTd[28]);
}
if(number == 8 || number == 18 || number == 28 || number == 38 || number == 48 || number == 58)
{
TextDrawShowForPlayer(playerid,DigitalTd[22]);
TextDrawShowForPlayer(playerid,DigitalTd[23]);
TextDrawShowForPlayer(playerid,DigitalTd[24]);
TextDrawShowForPlayer(playerid,DigitalTd[25]);
TextDrawShowForPlayer(playerid,DigitalTd[26]);
TextDrawShowForPlayer(playerid,DigitalTd[27]);
TextDrawShowForPlayer(playerid,DigitalTd[28]);
}
if(number == 9 || number == 19 || number == 29 || number == 39 || number == 49 || number == 59)
{
TextDrawShowForPlayer(playerid,DigitalTd[22]);
TextDrawHideForPlayer(playerid,DigitalTd[23]);
TextDrawShowForPlayer(playerid,DigitalTd[24]);
TextDrawShowForPlayer(playerid,DigitalTd[25]);
TextDrawShowForPlayer(playerid,DigitalTd[26]);
TextDrawShowForPlayer(playerid,DigitalTd[27]);
TextDrawShowForPlayer(playerid,DigitalTd[28]);
}
}
public Time()
{
for(new playerid;playerid<MAX_PLAYERS;playerid++)
{
new h,m,s;
gettime(h,m,s);
if(IsPlayerSpawned[playerid] == 1)
{
SetHours(playerid,h);
SetMin(playerid,m);
}
}
return 1;
}
stock SetHours(playerid,hour)
{
if(hour == 0)
{
SetStringForFrstNumber(playerid,0);
SetStringForSecondNumber(playerid,0);
return 1;
}
if(hour <= 9)
{
SetStringForFrstNumber(playerid,0);
SetStringForSecondNumber(playerid,hour);
return 1;
}
if(hour <= 19)
{
SetStringForFrstNumber(playerid,1);
SetStringForSecondNumber(playerid,hour);
return 1;
}
if(hour <= 23)
{
SetStringForFrstNumber(playerid,2);
SetStringForSecondNumber(playerid,hour);
return 1;
}
return 1;
}
stock SetMin(playerid,min)
{
if(min == 0)
{
SetStringForThirdNumber(playerid,0);
SetStringForFourthNumber(playerid,0);
return 1;
}
if(min <= 9)
{
SetStringForThirdNumber(playerid,0);
SetStringForFourthNumber(playerid,min);
return 1;
}
if(min <= 19)
{
SetStringForThirdNumber(playerid,1);
SetStringForFourthNumber(playerid,min);
return 1;
}
if(min <= 29)
{
SetStringForThirdNumber(playerid,2);
SetStringForFourthNumber(playerid,min);
return 1;
}
if(min <= 39)
{
SetStringForThirdNumber(playerid,3);
SetStringForFourthNumber(playerid,min);
return 1;
}
if(min <= 49)
{
SetStringForThirdNumber(playerid,4);
SetStringForFourthNumber(playerid,min);
return 1;
}
if(min <= 59)
{
SetStringForThirdNumber(playerid,5);
SetStringForFourthNumber(playerid,min);
return 1;
}
return 1;
}