Szerző Téma: InfoBox funkció Tipussal, Szoveggel  (Megtekintve 826 alkalommal)

InfoBox funkció Tipussal, Szoveggel
« Dátum: 2014. Április 22. - 11:52:40 »
0 Show voters
Sziasztok! Egy olyan scriptet szeretnék tõletek kérni, amiben egy funckió van.
A funkció felépítése:
 
forward InfoBox(playerid, Tipus, Szoveg[]);

 
Tipusbol 3 fajta van, Információ(ennek az id-je 1), Hiba(ennek az id-je 2), Figyelmeztetés(Ennek az id-je 3)
A szöveg []egy string lenne, ami átírná az \"1. sor\" textdraw stringjét. De ha az 1. sor stringje elér egy bizonyos karakterhosszúságot(Ezt majd letesztelem, addig 15) akkor váltson át a szöveg a \"2. sor\"-ra, és szintén így a \"3. sor\"-ra. Ennyi lenne nagyon megköszönném ha valaki meg tudná csinálni, vagy legalább leírni az alapját.
Textdrawok:
 
public InfoBox(playerid, Tipus, Szoveg[])
{
InfoBoxTD1[playerid] = CreatePlayerTextDraw(playerid, 433.288848, 2.395998, \"usebox\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD1[playerid], 0.000000, 8.975185);
PlayerTextDrawTextSize(playerid, InfoBoxTD1[playerid], 201.288894, 0.000000);
PlayerTextDrawAlignment(playerid, InfoBoxTD1[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD1[playerid], 0);
PlayerTextDrawUseBox(playerid, InfoBoxTD1[playerid], true);
PlayerTextDrawBoxColor(playerid, InfoBoxTD1[playerid], 102);
PlayerTextDrawSetShadow(playerid, InfoBoxTD1[playerid], 0);
PlayerTextDrawSetOutline(playerid, InfoBoxTD1[playerid], 0);
PlayerTextDrawFont(playerid, InfoBoxTD1[playerid], 0);
InfoBoxTD2[playerid] = CreatePlayerTextDraw(playerid, 234.222274, 2.488879, \"Next Global RolePlay\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD2[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD2[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD2[playerid], -1);
PlayerTextDrawSetShadow(playerid, InfoBoxTD2[playerid], 0);
PlayerTextDrawSetOutline(playerid, InfoBoxTD2[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD2[playerid], 255);
PlayerTextDrawFont(playerid, InfoBoxTD2[playerid], 1);
PlayerTextDrawSetProportional(playerid, InfoBoxTD2[playerid], 1);
InfoBoxTD3[playerid] = CreatePlayerTextDraw(playerid, 231.555541, 21.404443, \"1. sor\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD3[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD3[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD3[playerid], -479717718);
PlayerTextDrawSetShadow(playerid, InfoBoxTD3[playerid], -256);
PlayerTextDrawSetOutline(playerid, InfoBoxTD3[playerid], 0);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD3[playerid], 51);
PlayerTextDrawFont(playerid, InfoBoxTD3[playerid], 0);
PlayerTextDrawSetProportional(playerid, InfoBoxTD3[playerid], 1);
InfoBoxTD4[playerid] = CreatePlayerTextDraw(playerid, 225.777832, 36.835563, \"2. sor\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD4[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD4[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD4[playerid], -1);
PlayerTextDrawSetShadow(playerid, InfoBoxTD4[playerid], 4);
PlayerTextDrawSetOutline(playerid, InfoBoxTD4[playerid], 0);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD4[playerid], 51);
PlayerTextDrawFont(playerid, InfoBoxTD4[playerid], 0);
PlayerTextDrawSetProportional(playerid, InfoBoxTD4[playerid], 1);
InfoBoxTD5[playerid] = CreatePlayerTextDraw(playerid, 225.777801, 52.266689, \"3. sor\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD5[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD5[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD5[playerid], -1);
PlayerTextDrawSetShadow(playerid, InfoBoxTD5[playerid], -1);
PlayerTextDrawSetOutline(playerid, InfoBoxTD5[playerid], 0);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD5[playerid], 51);
PlayerTextDrawFont(playerid, InfoBoxTD5[playerid], 0);
PlayerTextDrawSetProportional(playerid, InfoBoxTD5[playerid], 1);
InfoBoxTD6[playerid] = CreatePlayerTextDraw(playerid, 267.022125, 70.883483, \"Figyelmeztetes\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD6[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD6[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD6[playerid], -1);
PlayerTextDrawSetShadow(playerid, InfoBoxTD6[playerid], 0);
PlayerTextDrawSetOutline(playerid, InfoBoxTD6[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD6[playerid], 51);
PlayerTextDrawFont(playerid, InfoBoxTD6[playerid], 2);
PlayerTextDrawSetProportional(playerid, InfoBoxTD6[playerid], 1);
InfoBoxTD7[playerid] = CreatePlayerTextDraw(playerid, 317.333374, 70.684387, \"Informacio\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD7[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD7[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD7[playerid], -1);
PlayerTextDrawSetShadow(playerid, InfoBoxTD7[playerid], 0);
PlayerTextDrawSetOutline(playerid, InfoBoxTD7[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD7[playerid], 51);
PlayerTextDrawFont(playerid, InfoBoxTD7[playerid], 2);
PlayerTextDrawSetProportional(playerid, InfoBoxTD7[playerid], 1);
InfoBoxTD8[playerid] = CreatePlayerTextDraw(playerid, 384.889007, 70.684432, \"Hiba\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD8[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD8[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD8[playerid], -1);
PlayerTextDrawSetShadow(playerid, InfoBoxTD8[playerid], 0);
PlayerTextDrawSetOutline(playerid, InfoBoxTD8[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD8[playerid], 51);
PlayerTextDrawFont(playerid, InfoBoxTD8[playerid], 2);
PlayerTextDrawSetProportional(playerid, InfoBoxTD8[playerid], 1);
return 1;
}

Nem elérhető KovaNovik

  • 1121
  • KovaNovik
    • Profil megtekintése
InfoBox funkció Tipussal, Szoveggel
« Válasz #1 Dátum: 2014. Április 27. - 08:44:33 »
0 Show voters
Ha TD eleve megtöri a sort.

InfoBox funkció Tipussal, Szoveggel
« Válasz #2 Dátum: 2014. Április 22. - 11:52:40 »
0 Show voters
Sziasztok! Egy olyan scriptet szeretnék tõletek kérni, amiben egy funckió van.
A funkció felépítése:
 
forward InfoBox(playerid, Tipus, Szoveg[]);

 
Tipusbol 3 fajta van, Információ(ennek az id-je 1), Hiba(ennek az id-je 2), Figyelmeztetés(Ennek az id-je 3)
A szöveg []egy string lenne, ami átírná az \"1. sor\" textdraw stringjét. De ha az 1. sor stringje elér egy bizonyos karakterhosszúságot(Ezt majd letesztelem, addig 15) akkor váltson át a szöveg a \"2. sor\"-ra, és szintén így a \"3. sor\"-ra. Ennyi lenne nagyon megköszönném ha valaki meg tudná csinálni, vagy legalább leírni az alapját.
Textdrawok:
 
public InfoBox(playerid, Tipus, Szoveg[])
{
InfoBoxTD1[playerid] = CreatePlayerTextDraw(playerid, 433.288848, 2.395998, \"usebox\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD1[playerid], 0.000000, 8.975185);
PlayerTextDrawTextSize(playerid, InfoBoxTD1[playerid], 201.288894, 0.000000);
PlayerTextDrawAlignment(playerid, InfoBoxTD1[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD1[playerid], 0);
PlayerTextDrawUseBox(playerid, InfoBoxTD1[playerid], true);
PlayerTextDrawBoxColor(playerid, InfoBoxTD1[playerid], 102);
PlayerTextDrawSetShadow(playerid, InfoBoxTD1[playerid], 0);
PlayerTextDrawSetOutline(playerid, InfoBoxTD1[playerid], 0);
PlayerTextDrawFont(playerid, InfoBoxTD1[playerid], 0);
InfoBoxTD2[playerid] = CreatePlayerTextDraw(playerid, 234.222274, 2.488879, \"Next Global RolePlay\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD2[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD2[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD2[playerid], -1);
PlayerTextDrawSetShadow(playerid, InfoBoxTD2[playerid], 0);
PlayerTextDrawSetOutline(playerid, InfoBoxTD2[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD2[playerid], 255);
PlayerTextDrawFont(playerid, InfoBoxTD2[playerid], 1);
PlayerTextDrawSetProportional(playerid, InfoBoxTD2[playerid], 1);
InfoBoxTD3[playerid] = CreatePlayerTextDraw(playerid, 231.555541, 21.404443, \"1. sor\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD3[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD3[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD3[playerid], -479717718);
PlayerTextDrawSetShadow(playerid, InfoBoxTD3[playerid], -256);
PlayerTextDrawSetOutline(playerid, InfoBoxTD3[playerid], 0);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD3[playerid], 51);
PlayerTextDrawFont(playerid, InfoBoxTD3[playerid], 0);
PlayerTextDrawSetProportional(playerid, InfoBoxTD3[playerid], 1);
InfoBoxTD4[playerid] = CreatePlayerTextDraw(playerid, 225.777832, 36.835563, \"2. sor\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD4[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD4[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD4[playerid], -1);
PlayerTextDrawSetShadow(playerid, InfoBoxTD4[playerid], 4);
PlayerTextDrawSetOutline(playerid, InfoBoxTD4[playerid], 0);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD4[playerid], 51);
PlayerTextDrawFont(playerid, InfoBoxTD4[playerid], 0);
PlayerTextDrawSetProportional(playerid, InfoBoxTD4[playerid], 1);
InfoBoxTD5[playerid] = CreatePlayerTextDraw(playerid, 225.777801, 52.266689, \"3. sor\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD5[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD5[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD5[playerid], -1);
PlayerTextDrawSetShadow(playerid, InfoBoxTD5[playerid], -1);
PlayerTextDrawSetOutline(playerid, InfoBoxTD5[playerid], 0);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD5[playerid], 51);
PlayerTextDrawFont(playerid, InfoBoxTD5[playerid], 0);
PlayerTextDrawSetProportional(playerid, InfoBoxTD5[playerid], 1);
InfoBoxTD6[playerid] = CreatePlayerTextDraw(playerid, 267.022125, 70.883483, \"Figyelmeztetes\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD6[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD6[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD6[playerid], -1);
PlayerTextDrawSetShadow(playerid, InfoBoxTD6[playerid], 0);
PlayerTextDrawSetOutline(playerid, InfoBoxTD6[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD6[playerid], 51);
PlayerTextDrawFont(playerid, InfoBoxTD6[playerid], 2);
PlayerTextDrawSetProportional(playerid, InfoBoxTD6[playerid], 1);
InfoBoxTD7[playerid] = CreatePlayerTextDraw(playerid, 317.333374, 70.684387, \"Informacio\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD7[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD7[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD7[playerid], -1);
PlayerTextDrawSetShadow(playerid, InfoBoxTD7[playerid], 0);
PlayerTextDrawSetOutline(playerid, InfoBoxTD7[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD7[playerid], 51);
PlayerTextDrawFont(playerid, InfoBoxTD7[playerid], 2);
PlayerTextDrawSetProportional(playerid, InfoBoxTD7[playerid], 1);
InfoBoxTD8[playerid] = CreatePlayerTextDraw(playerid, 384.889007, 70.684432, \"Hiba\");
PlayerTextDrawLetterSize(playerid, InfoBoxTD8[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, InfoBoxTD8[playerid], 1);
PlayerTextDrawColor(playerid, InfoBoxTD8[playerid], -1);
PlayerTextDrawSetShadow(playerid, InfoBoxTD8[playerid], 0);
PlayerTextDrawSetOutline(playerid, InfoBoxTD8[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, InfoBoxTD8[playerid], 51);
PlayerTextDrawFont(playerid, InfoBoxTD8[playerid], 2);
PlayerTextDrawSetProportional(playerid, InfoBoxTD8[playerid], 1);
return 1;
}

Nem elérhető KovaNovik

  • 1121
  • KovaNovik
    • Profil megtekintése
InfoBox funkció Tipussal, Szoveggel
« Válasz #3 Dátum: 2014. Április 27. - 08:44:33 »
0 Show voters
Ha TD eleve megtöri a sort.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal