Problem with TextDraws
#1

Why doesn't appear textdraw?

public OnPlayerConnect(playerid)
{
for(new i; i < 10; i++)
{
TextDrawShowForPlayer(playerid, TextDraws[San_mp][i]);
}
return 1;
}
Reply
#2

Try this:

pawn Код:
public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, TextDraws[San_mp][i]);
    return 1;
}

Or if that don't work put this under "OnGameModeInIt" or "OnFilterscriptInIt":

pawn Код:
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, TextDraws[San_mp][i]);
}
}
Hope I helped.
Reply
#3

Here so:
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, TextDraws[San_mp][i]);
return 1;
}
Gives an error:
error 017: undefined symbol "i"

In:
public OnFilterScriptInit()
{
for(new i; i < 10; i++)
{
TextDrawBackgroundColor(TextDraws[San_mp][i], 255);
TextDrawFont(TextDraws[San_mp][i], 0);
TextDrawLetterSize(TextDraws[San_mp][i], 0.639998, 2.699999);
TextDrawColor(TextDraws[San_mp][i], -1);
TextDrawSetOutline(TextDraws[San_mp][i], 1);
TextDrawSetProportional(TextDraws[San_mp][i], 0);
}
Reply
#4

[San_mp][i] it means that [i] you need delete that
Reply
#5

All the same doesn't appear
Here completely a code:
Код:
enum td
{
	Text:San_mp[12]
}
new TextDraws[td];

public OnFilterScriptInit()
{
	TextDraws[San_mp][0] = TextDrawCreate(35.000000, 190.000000, "1");
 	TextDraws[San_mp][1] = TextDrawCreate(50.000000, 184.000000, "2");
 	TextDraws[San_mp][2] = TextDrawCreate(58.000000, 180.000000, "3");
 	TextDraws[San_mp][3] = TextDrawCreate(66.000000, 178.000000, "4");
 	TextDraws[San_mp][4] = TextDrawCreate(82.000000, 179.000000, "5");
 	TextDraws[San_mp][5] = TextDrawCreate(90.000000, 179.000000, "6");
 	TextDraws[San_mp][6] = TextDrawCreate(98.000000, 181.000000, "7");
 	TextDraws[San_mp][7] = TextDrawCreate(104.000000, 183.000000, "8");
 	TextDraws[San_mp][8] = TextDrawCreate(111.000000, 185.000000, "9");
 	TextDraws[San_mp][9] = TextDrawCreate(119.000000, 189.000000, "10");
 	
 	for(new i; i < 10; i++)
 	{
    TextDrawBackgroundColor(TextDraws[San_mp], 255);
    TextDrawFont(TextDraws[San_mp], 0);
    TextDrawLetterSize(TextDraws[San_mp], 0.639998, 2.699999);
    TextDrawColor(TextDraws[San_mp], -1);
    TextDrawSetOutline(TextDraws[San_mp], 1);
    TextDrawSetProportional(TextDraws[San_mp], 0);
    }
    }
    return 1;
}

public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, TextDraws[San_mp]);
TextDrawShowForPlayer(playerid, TextDraw[San_mp1]);
return 1;
}
What is wrong?
Reply
#6

pawn Код:
public OnFilterScriptInit()
{
    TextDraws[San_mp][0] = TextDrawCreate(35.000000, 190.000000, "1");
     TextDraws[San_mp][1] = TextDrawCreate(50.000000, 184.000000, "2");
     TextDraws[San_mp][2] = TextDrawCreate(58.000000, 180.000000, "3");
     TextDraws[San_mp][3] = TextDrawCreate(66.000000, 178.000000, "4");
     TextDraws[San_mp][4] = TextDrawCreate(82.000000, 179.000000, "5");
     TextDraws[San_mp][5] = TextDrawCreate(90.000000, 179.000000, "6");
     TextDraws[San_mp][6] = TextDrawCreate(98.000000, 181.000000, "7");
     TextDraws[San_mp][7] = TextDrawCreate(104.000000, 183.000000, "8");
     TextDraws[San_mp][8] = TextDrawCreate(111.000000, 185.000000, "9");
     TextDraws[San_mp][9] = TextDrawCreate(119.000000, 189.000000, "10");

     for(new i; i < 10; i++)
     {
        TextDrawBackgroundColor(TextDraws[San_mp][i], 255);
        TextDrawFont(TextDraws[San_mp][i], 0);
        TextDrawLetterSize(TextDraws[San_mp][i], 0.639998, 2.699999);
        TextDrawColor(TextDraws[San_mp][i], -1);
        TextDrawSetOutline(TextDraws[San_mp][i], 1);
        TextDrawSetProportional(TextDraws[San_mp][i], 0);
    }
    return 1;
}

public OnPlayerConnect(playerid)
{
    for(new i; i < 10; i++)
        TextDrawShowForPlayer(playerid, TextDraws[San_mp][i]);
    return 1;
}
Reply
#7

Doesn't appear
Reply
#8

pawn Код:
public OnFilterScriptInit()
{
     TextDraws[San_mp][0] = TextDrawCreate(35.000000, 190.000000, "1");
     TextDraws[San_mp][1] = TextDrawCreate(50.000000, 184.000000, "2");
     TextDraws[San_mp][2] = TextDrawCreate(58.000000, 180.000000, "3");
     TextDraws[San_mp][3] = TextDrawCreate(66.000000, 178.000000, "4");
     TextDraws[San_mp][4] = TextDrawCreate(82.000000, 179.000000, "5");
     TextDraws[San_mp][5] = TextDrawCreate(90.000000, 179.000000, "6");
     TextDraws[San_mp][6] = TextDrawCreate(98.000000, 181.000000, "7");
     TextDraws[San_mp][7] = TextDrawCreate(104.000000, 183.000000, "8");
     TextDraws[San_mp][8] = TextDrawCreate(111.000000, 185.000000, "9");
     TextDraws[San_mp][9] = TextDrawCreate(119.000000, 189.000000, "10");

     for(new i; i < 10; i++)
     {
        TextDrawBackgroundColor(TextDraws[San_mp][i], 255);
        TextDrawFont(TextDraws[San_mp][i], 0);
        TextDrawLetterSize(TextDraws[San_mp][i], 0.639998, 2.699999);
        TextDrawColor(TextDraws[San_mp][i], -1);
        TextDrawSetOutline(TextDraws[San_mp][i], 1);
        TextDrawSetProportional(TextDraws[San_mp][i], 0);
    }
    return 1;
}

public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, TextDraws[San_mp][playerid]);
    return 1;
}
Reply
#9

Doesn't appear
Reply
#10

Quote:
Originally Posted by Roma555
Посмотреть сообщение
Doesn't appear
Jesus christ dude, are you fucking learning from this? Or are you fucking copy/pasting? I mean SHIT!

http://forum.sa-mp.com/showthread.ph...d=1#post855180

Are you going to be retarded like that guy that i posted about? Or can i actually save you from retardation?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)