PHP код:
forward lapartime(playerid);
forward laparupdate(playerid);
public lapartime(playerid)
{
tai[playerid] -=2;
SendClientMessage(playerid, -1, "{00FF00}Average {FFFFFF}kurang 2");
}
public laparupdate(playerid)
{
SendClientMessage(playerid, -1, "{00FF00}Average {FFFFFF}Biji besi, bawa ini kepengolahan.");
if (tai[playerid] >=100)
{
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][11], "IIIIIIIIII");
}
else if (tai[playerid] <=90)
{
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][11], "IIIIIIIII");
}
else if (tai[playerid] <=80)
{
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][11], "IIIIIIII");
}
else if (tai[playerid] <=70)
{
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][11], "IIIIIII");
}
else if (tai[playerid] <=60)
{
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][11], "IIIIII");
}
else if (tai[playerid] <=50)
{
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][11], "IIIII");
}
else if (tai[playerid] <=40)
{
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][11], "IIII");
}
else if (tai[playerid] <=30)
{
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][11], "III");
}
else if (tai[playerid] <=20)
{
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][11], "II");
}
else if (tai[playerid] <=10)
{
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][11], "I");
}
else if (tai[playerid] <=0)
{
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][11], " ");
}
}
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" hunger, blader, drink");
print("---by ratxrat-----\n");
return 1;
}
public OnPlayerConnect(playerid)
{
TDEditor_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 499.200012, 149.967208, "box");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][0], 0.000000, 14.799995);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][0], 621.200683, 0.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][0], 1473249279);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][0], 4798030);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][0], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][0], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0);
TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 498.899871, 149.873199, "box");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][1], 0.000000, 14.959995);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][1], 498.329010, 0.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][1], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][1], 92);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][1], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0);
TDEditor_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 623.700561, 149.873199, "box");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][2], 0.000000, 14.959995);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][2], 623.000000, 0.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][2], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][2], 92);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][2], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][2], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][2], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][2], 0);
TDEditor_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 498.602111, 149.713180, "box");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][3], 0.000000, -0.000003);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][3], 621.099975, 0.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][3], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][3], 92);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][3], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][3], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][3], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][3], 0);
TDEditor_PTD[playerid][4] = CreatePlayerTextDraw(playerid, 500.701934, 284.873626, "box");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][4], 0.000000, -0.000003);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][4], 623.200439, 0.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][4], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][4], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][4], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][4], 92);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][4], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][4], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][4], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][4], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][4], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][4], 0);
TDEditor_PTD[playerid][5] = CreatePlayerTextDraw(playerid, 560.749572, 126.433273, "Rodolfo_Cadena");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][5], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][5], 2);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][5], 255);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][5], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][5], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][5], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][5], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][5], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][5], 0);
TDEditor_PTD[playerid][6] = CreatePlayerTextDraw(playerid, 463.399993, 101.763221, "");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][6], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][6], 123.000000, 138.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][6], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][6], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][6], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][6], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][6], 0);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][6], 5);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][6], 0);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][6], 0);
PlayerTextDrawSetPreviewModel(playerid, TDEditor_PTD[playerid][6], 2860);
PlayerTextDrawSetPreviewRot(playerid, TDEditor_PTD[playerid][6], 79.000000, 0.000000, 341.000000, 2.042606);
TDEditor_PTD[playerid][7] = CreatePlayerTextDraw(playerid, 472.224639, 158.396652, "");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][7], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][7], 94.000000, 84.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][7], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][7], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][7], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][7], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][7], 0);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][7], 5);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][7], 0);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][7], 0);
PlayerTextDrawSetPreviewModel(playerid, TDEditor_PTD[playerid][7], 1546);
PlayerTextDrawSetPreviewRot(playerid, TDEditor_PTD[playerid][7], 20.000000, 0.000000, 43.000000, 2.205513);
TDEditor_PTD[playerid][8] = CreatePlayerTextDraw(playerid, 488.199859, 215.480026, "");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][8], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][8], 47.000000, 33.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][8], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][8], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][8], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][8], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][8], 0);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][8], 5);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][8], 0);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][8], 0);
PlayerTextDrawSetPreviewModel(playerid, TDEditor_PTD[playerid][8], 2514);
PlayerTextDrawSetPreviewRot(playerid, TDEditor_PTD[playerid][8], 0.000000, 0.000000, 64.000000, 1.000000);
TDEditor_PTD[playerid][9] = CreatePlayerTextDraw(playerid, 498.399719, 251.373428, "");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][9], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][9], 45.000000, 32.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][9], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][9], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][9], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][9], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][9], 0);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][9], 5);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][9], 0);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][9], 0);
PlayerTextDrawSetPreviewModel(playerid, TDEditor_PTD[playerid][9], 1274);
PlayerTextDrawSetPreviewRot(playerid, TDEditor_PTD[playerid][9], 0.000000, 0.000000, 178.000000, 1.000000);
TDEditor_PTD[playerid][10] = CreatePlayerTextDraw(playerid, 552.398864, 186.599685, "HAUS");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][10], 0.354399, 2.996263);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][10], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][10], 16764155);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][10], 56);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][10], -2);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][10], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][10], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][10], 0);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][10], 56);
TDEditor_PTD[playerid][11] = CreatePlayerTextDraw(playerid, 552.300170, 157.179595, " ");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][11], 0.354399, 2.996263);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][11], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][11], 16764155);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][11], 56);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][11], -2);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][11], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][11], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][11], 0);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][11], 56);
TDEditor_PTD[playerid][12] = CreatePlayerTextDraw(playerid, 539.800842, 260.579864, "$20000000");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][12], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][12], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][12], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][12], 1);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][12], 1);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][12], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][12], 3);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][12], 0);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][12], 1);
TDEditor_PTD[playerid][13] = CreatePlayerTextDraw(playerid, 499.800079, 129.519973, "box");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][13], 0.000000, 1.195994);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][13], 622.350219, 0.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][13], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][13], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][13], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][13], 2092025726);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][13], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][13], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][13], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][13], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][13], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][13], 0);
TDEditor_PTD[playerid][14] = CreatePlayerTextDraw(playerid, 552.499023, 216.913146, "PIPIS");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][14], 0.354399, 2.996263);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][14], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][14], 16764155);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][14], 56);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][14], -2);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][14], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][14], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][14], 0);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][14], 56);
tai[playerid]=100;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SetTimerEx("lapartime", 10000, 1, "i", playerid);
SetTimerEx("laparupdate", 5000, 1, "i", playerid);
for (new x=0 ; x<20 ; x++)
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][x]);
return 1;
}