PDA

View Full Version : Textdraw


Micko123
02/05/2016, 07:14 PM
Can anyone detect problem??

public OnGameModeInit
{
Textdraw0 = TextDrawCreate(510.399902, 1.493330, "N");
TextDrawLetterSize(Textdraw0, 0.542800, 1.973333);
TextDrawAlignment(Textdraw0, 1);
TextDrawColor(Textdraw0, -5963521);
TextDrawSetShadow(Textdraw0, 1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawBackgroundColor(Textdraw0, 51);
TextDrawFont(Textdraw0, 2);
TextDrawSetProportional(Textdraw0, 1);

Textdraw1 = TextDrawCreate(524.799865, 5.226661, "ew");
TextDrawLetterSize(Textdraw1, 0.523600, 1.405866);
TextDrawTextSize(Textdraw1, -5.599999, -20.160001);
TextDrawAlignment(Textdraw1, 1);
TextDrawColor(Textdraw1, -1);
TextDrawSetShadow(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawBackgroundColor(Textdraw1, 51);
TextDrawFont(Textdraw1, 3);
TextDrawSetProportional(Textdraw1, 1);

Textdraw2 = TextDrawCreate(557.600158, 0.746648, "A");
TextDrawLetterSize(Textdraw2, 0.517199, 2.130133);
TextDrawAlignment(Textdraw2, 1);
TextDrawColor(Textdraw2, -5963521);
TextDrawSetShadow(Textdraw2, -5);
TextDrawSetOutline(Textdraw2, 0);
TextDrawBackgroundColor(Textdraw2, 51);
TextDrawFont(Textdraw2, 2);
TextDrawSetProportional(Textdraw2, 1);

Textdraw3 = TextDrawCreate(571.200073, 4.479971, "ge");
TextDrawLetterSize(Textdraw3, 0.489200, 1.413333);
TextDrawAlignment(Textdraw3, 1);
TextDrawColor(Textdraw3, -1);
TextDrawSetShadow(Textdraw3, 0);
TextDrawSetOutline(Textdraw3, 0);
TextDrawBackgroundColor(Textdraw3, 51);
TextDrawFont(Textdraw3, 3);
TextDrawSetProportional(Textdraw3, 1);

Textdraw4 = TextDrawCreate(540.799865, 17.173320, "D");
TextDrawLetterSize(Textdraw4, 0.498000, 1.958400);
TextDrawAlignment(Textdraw4, 1);
TextDrawColor(Textdraw4, -5963521);
TextDrawSetShadow(Textdraw4, 1);
TextDrawSetOutline(Textdraw4, 0);
TextDrawBackgroundColor(Textdraw4, 51);
TextDrawFont(Textdraw4, 2);
TextDrawSetProportional(Textdraw4, 1);

Textdraw5 = TextDrawCreate(553.599914, 20.906646, "eatcmatch");
TextDrawLetterSize(Textdraw5, 0.423599, 1.361066);
TextDrawAlignment(Textdraw5, 1);
TextDrawColor(Textdraw5, -1);
TextDrawSetShadow(Textdraw5, 1);
TextDrawSetOutline(Textdraw5, 0);
TextDrawBackgroundColor(Textdraw5, 51);
TextDrawFont(Textdraw5, 3);
TextDrawSetProportional(Textdraw5, 1);

Textdraw6 = TextDrawCreate(559.200256, 33.600059, "by: M1ck0");
TextDrawLetterSize(Textdraw6, 0.307599, 0.815999);
TextDrawAlignment(Textdraw6, 1);
TextDrawColor(Textdraw6, -5963521);
TextDrawSetShadow(Textdraw6, 0);
TextDrawSetOutline(Textdraw6, 0);
TextDrawBackgroundColor(Textdraw6, 51);
TextDrawFont(Textdraw6, 3);
TextDrawSetProportional(Textdraw6, 1);
return 1;
}

On top i got this

new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
new Text:Textdraw6;

This only load first 3 textdraws.

thaKing
02/05/2016, 07:16 PM
did you tried TextDrawShowForPlayer on connect?

Also, this could be more easier for use:
new Text: txtN, Text: txtEW, Text: txtA, Text: txtGE;
new Text: txtD, Text: txtEATCMATCH, Text: txtCredits;

LoadGlobalTextDraws()
{
txtN = TextDrawCreate(510.399902, 1.493330, "N");
TextDrawLetterSize(txtN, 0.542800, 1.973333);
TextDrawAlignment(txtN, 1);
TextDrawColor(txtN, -5963521);
TextDrawSetShadow(txtN, 1);
TextDrawSetOutline(txtN, 0);
TextDrawBackgroundColor(txtN, 51);
TextDrawFont(txtN, 2);
TextDrawSetProportional(txtN, 1);

txtEW = TextDrawCreate(524.799865, 5.226661, "ew");
TextDrawLetterSize(txtEW, 0.523600, 1.405866);
TextDrawTextSize(txtEW, -5.599999, -20.160001);
TextDrawAlignment(txtEW, 1);
TextDrawColor(txtEW, -1);
TextDrawSetShadow(txtEW, -1);
TextDrawSetOutline(txtEW, 0);
TextDrawBackgroundColor(txtEW, 51);
TextDrawFont(txtEW, 3);
TextDrawSetProportional(txtEW, 1);

txtA = TextDrawCreate(557.600158, 0.746648, "A");
TextDrawLetterSize(txtA, 0.517199, 2.130133);
TextDrawAlignment(txtA, 1);
TextDrawColor(txtA, -5963521);
TextDrawSetShadow(txtA, -5);
TextDrawSetOutline(txtA, 0);
TextDrawBackgroundColor(txtA, 51);
TextDrawFont(txtA, 2);
TextDrawSetProportional(txtA, 1);

txtGE = TextDrawCreate(571.200073, 4.479971, "ge");
TextDrawLetterSize(txtGE, 0.489200, 1.413333);
TextDrawAlignment(txtGE, 1);
TextDrawColor(txtGE, -1);
TextDrawSetShadow(txtGE, 0);
TextDrawSetOutline(txtGE, 0);
TextDrawBackgroundColor(txtGE, 51);
TextDrawFont(txtGE, 3);
TextDrawSetProportional(txtGE, 1);

txtD = TextDrawCreate(540.799865, 17.173320, "D");
TextDrawLetterSize(txtD, 0.498000, 1.958400);
TextDrawAlignment(txtD, 1);
TextDrawColor(txtD, -5963521);
TextDrawSetShadow(txtD, 1);
TextDrawSetOutline(txtD, 0);
TextDrawBackgroundColor(txtD, 51);
TextDrawFont(txtD, 2);
TextDrawSetProportional(txtD, 1);

txtEATCMATCH = TextDrawCreate(553.599914, 20.906646, "eatcmatch");
TextDrawLetterSize(txtEATCMATCH, 0.423599, 1.361066);
TextDrawAlignment(txtEATCMATCH, 1);
TextDrawColor(txtEATCMATCH, -1);
TextDrawSetShadow(txtEATCMATCH, 1);
TextDrawSetOutline(txtEATCMATCH, 0);
TextDrawBackgroundColor(txtEATCMATCH, 51);
TextDrawFont(txtEATCMATCH, 3);
TextDrawSetProportional(txtEATCMATCH, 1);

txtCredits = TextDrawCreate(559.200256, 33.600059, "by: M1ck0");
TextDrawLetterSize(txtCredits, 0.307599, 0.815999);
TextDrawAlignment(txtCredits, 1);
TextDrawColor(txtCredits, -5963521);
TextDrawSetShadow(txtCredits, 0);
TextDrawSetOutline(txtCredits, 0);
TextDrawBackgroundColor(txtCredits, 51);
TextDrawFont(txtCredits, 3);
TextDrawSetProportional(txtCredits, 1);
}

public OnGameModeInit
{
LoadGlobalTextDraws();
return 1;
}

Micko123
02/05/2016, 07:19 PM
Nopw but i will now

Micko123
02/05/2016, 07:23 PM
Wokred thanks :)

F1N4L
02/05/2016, 07:24 PM
new Text:Textdraw[7];

public OnGameModeInit()
{
Textdraw[0] = TextDrawCreate(510.399902, 1.493330, "N");
TextDrawLetterSize(Textdraw[0], 0.542800, 1.973333);
TextDrawAlignment(Textdraw[0], 1);
TextDrawColor(Textdraw[0], -5963521);
TextDrawSetShadow(Textdraw[0], 1);
TextDrawSetOutline(Textdraw[0], 0);
TextDrawBackgroundColor(Textdraw[0], 51);
TextDrawFont(Textdraw[0], 2);
TextDrawSetProportional(Textdraw[0], 1);

Textdraw[1] = TextDrawCreate(524.799865, 5.226661, "ew");
TextDrawLetterSize(Textdraw[1], 0.523600, 1.405866);
TextDrawTextSize(Textdraw[1], -5.599999, -20.160001);
TextDrawAlignment(Textdraw[1], 1);
TextDrawColor(Textdraw[1], -1);
TextDrawSetShadow(Textdraw[1], -1);
TextDrawSetOutline(Textdraw[1], 0);
TextDrawBackgroundColor(Textdraw[1], 51);
TextDrawFont(Textdraw[1], 3);
TextDrawSetProportional(Textdraw[1], 1);

Textdraw[2] = TextDrawCreate(557.600158, 0.746648, "A");
TextDrawLetterSize(Textdraw[2], 0.517199, 2.130133);
TextDrawAlignment(Textdraw[2], 1);
TextDrawColor(Textdraw[2], -5963521);
TextDrawSetShadow(Textdraw[2], -5);
TextDrawSetOutline(Textdraw[2], 0);
TextDrawBackgroundColor(Textdraw[2], 51);
TextDrawFont(Textdraw[2], 2);
TextDrawSetProportional(Textdraw[2], 1);

Textdraw[3] = TextDrawCreate(571.200073, 4.479971, "ge");
TextDrawLetterSize(Textdraw[3], 0.489200, 1.413333);
TextDrawAlignment(Textdraw[3], 1);
TextDrawColor(Textdraw[3], -1);
TextDrawSetShadow(Textdraw[3], 0);
TextDrawSetOutline(Textdraw[3], 0);
TextDrawBackgroundColor(Textdraw[3], 51);
TextDrawFont(Textdraw[3], 3);
TextDrawSetProportional(Textdraw[3], 1);

Textdraw[4] = TextDrawCreate(540.799865, 17.173320, "D");
TextDrawLetterSize(Textdraw[4], 0.498000, 1.958400);
TextDrawAlignment(Textdraw[4], 1);
TextDrawColor(Textdraw[4], -5963521);
TextDrawSetShadow(Textdraw[4], 1);
TextDrawSetOutline(Textdraw[4], 0);
TextDrawBackgroundColor(Textdraw[4], 51);
TextDrawFont(Textdraw[4], 2);
TextDrawSetProportional(Textdraw[4], 1);

Textdraw[5] = TextDrawCreate(553.599914, 20.906646, "eatcmatch");
TextDrawLetterSize(Textdraw[5], 0.423599, 1.361066);
TextDrawAlignment(Textdraw[5], 1);
TextDrawColor(Textdraw[5], -1);
TextDrawSetShadow(Textdraw[5], 1);
TextDrawSetOutline(Textdraw[5], 0);
TextDrawBackgroundColor(Textdraw[5], 51);
TextDrawFont(Textdraw[5], 3);
TextDrawSetProportional(Textdraw[5], 1);

Textdraw[6] = TextDrawCreate(559.200256, 33.600059, "by: M1ck0");
TextDrawLetterSize(Textdraw[6], 0.307599, 0.815999);
TextDrawAlignment(Textdraw[6], 1);
TextDrawColor(Textdraw[6], -5963521);
TextDrawSetShadow(Textdraw[6], 0);
TextDrawSetOutline(Textdraw[6], 0);
TextDrawBackgroundColor(Textdraw[6], 51);
TextDrawFont(Textdraw[6], 3);
TextDrawSetProportional(Textdraw[6], 1);

return 1;
}

public OnPlayerConnect(playerid)
{

for(new i = 0; i < sizeof(Textdraw); i ++) TextDrawShowForPlayer(playerid, Textdraw[i]);

return 1;
}

thaKing
02/05/2016, 07:26 PM
blah .. blah .. blah..

Read the first one http://forum.sa-mp.com/showthread.php?t=580289

F1N4L
02/05/2016, 07:30 PM
Read the first one http://forum.sa-mp.com/showthread.php?t=580289

Thanks, did not know that!