Huge Clucker
Join Date: Feb 2016
Location: Somewhere inside pawno
Posts: 495
Reputation: 18
|
Can someone help me??
I created these stocks
PHP Code:
stock Kreiraj_PTD(playerid, bool:kreiran)
{
if(kreiran == true)
{ //============================== Datum =========================================//
TDEditor_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 552.666870, 16.275588, "00/00/00");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][0], 0.300000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][0], 16777215);
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], 2);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0); //============================== Vrijeme =======================================//
TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 552.222290, 44.648906, "00:00:00");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][1], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][1], 16777215);
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], 2);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0);
}
if(kreiran == false)
{
PlayerTextDrawDestroy(playerid, TDEditor_PTD[playerid][0]);
PlayerTextDrawDestroy(playerid, TDEditor_PTD[playerid][1]);
}
return 1;
}
PHP Code:
stock Prikazi_PTD(playerid)
{
new datum[25], vrijeme[25], sat, minut, sekund, dan, mjesec, godina;
gettime(sat, minut, sekund);
getdate(godina, mjesec, dan);
format(datum, sizeof datum, "~w~%02d %02d %02d", dan, mjesec, godina);
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][0], datum);
format(vrijeme, sizeof vrijeme, "~w~%02d %02d %02d", sat, minut, sekund);
PlayerTextDrawSetString(playerid, TDEditor_PTD[playerid][1], vrijeme);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][0]);
PlayerTextDrawShow(playerid, TDEditor_PTD[playerid][1]);
return 1;
}
First one is for creating TexDraws and second one is for showing them. I also have this
PHP Code:
public OnPlayerConnect(playerid)
{
Kreiraj_PTD(playerid, true);
return 1;
}
public OnPlayerSpawn(playerid)
{
Prikazi_PTD(playerid);
return 1;
}
But it won't show TextDraws. What can i do??
|
Aucun commentaire:
Enregistrer un commentaire