Player text draw doesn't show!
#1

What's wrong with this textdraw? It doesnt show

pawn Код:
//this was cut from my GM

new PlayerText:BLOCKINFO[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
BLOCKINFO[playerid] = CreatePlayerTextDraw(playerid, 509.000000, 379.750091, "Selected block:~n~wait");
PlayerTextDrawLetterSize(playerid, BLOCKINFO[playerid], 0.449999, 1.600000);
PlayerTextDrawTextSize(playerid, BLOCKINFO[playerid], 634.599792, 701.399658);
PlayerTextDrawAlignment(playerid, BLOCKINFO[playerid], 1);
PlayerTextDrawColor(playerid, BLOCKINFO[playerid], -1);
PlayerTextDrawUseBox(playerid, BLOCKINFO[playerid], true);
PlayerTextDrawBoxColor(playerid, BLOCKINFO[playerid], -2147483393);
PlayerTextDrawSetShadow(playerid, BLOCKINFO[playerid], 0);
PlayerTextDrawSetOutline(playerid, BLOCKINFO[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, BLOCKINFO[playerid], -1523963137);
PlayerTextDrawFont(playerid, BLOCKINFO[playerid], 1);
PlayerTextDrawSetProportional(playerid, BLOCKINFO[playerid], 1);

timer[playerid]=SetPlayerTimer("UpdateCubes",7000,1);
}

forward UpdateCubes(i);
public UpdateCubes(i)
{
if(BlockID[i] != -1) format(stringu, sizeof(stringu), "~w~Selected block:~n~~p~~h~~h~~h~%s",CUBE_NAME[BlockID[i]-1]);
else format(stringu, sizeof(stringu), "~w~Selected block:~n~~p~~h~~h~~h~None");
PlayerTextDrawSetString(i,BLOCKINFO[i],stringu);
    return 1;
}
Reply
#2

pawn Код:
//@onPlayerSpawn
PlayerTextDrawShow(playerid, BLOCKINFO[playerid]);
?

Greetz,
LetsOWN
Reply
#3

pawn Код:
new PlayerText:BLOCKINFO[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
MakePlayerTextDraw(playerid);
PlayerTextDrawShow(playerid,BLOCKINFO[playerid]);
SetPlayerTimerEx("UpdateCubes",7000,false,"i",playerid);

}

forward UpdateCubes(i);
public UpdateCubes(i)
{
if(BlockID[i] != -1) format(stringu, sizeof(stringu), "~w~Selected block:~n~~p~~h~~h~~h~%s",CUBE_NAME[BlockID[i]-1]);
else format(stringu, sizeof(stringu), "~w~Selected block:~n~~p~~h~~h~~h~None");
PlayerTextDrawSetString(i,BLOCKINFO[i],stringu);
    return 1;
}
stock MakePlayerTextDraw(playerid)
{
BLOCKINFO[playerid] = CreatePlayerTextDraw(playerid, 509.000000, 379.750091, "Selected block:~n~wait");
PlayerTextDrawLetterSize(playerid, BLOCKINFO[playerid], 0.449999, 1.600000);
PlayerTextDrawTextSize(playerid, BLOCKINFO[playerid], 634.599792, 701.399658);
PlayerTextDrawAlignment(playerid, BLOCKINFO[playerid], 1);
PlayerTextDrawColor(playerid, BLOCKINFO[playerid], -1);
PlayerTextDrawUseBox(playerid, BLOCKINFO[playerid], true);
PlayerTextDrawBoxColor(playerid, BLOCKINFO[playerid], -2147483393);
PlayerTextDrawSetShadow(playerid, BLOCKINFO[playerid], 0);
PlayerTextDrawSetOutline(playerid, BLOCKINFO[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, BLOCKINFO[playerid], -1523963137);
PlayerTextDrawFont(playerid, BLOCKINFO[playerid], 1);
PlayerTextDrawSetProportional(playerid, BLOCKINFO[playerid], 1);
return 1;
}
Reply
#4

Quote:
Originally Posted by mineralo
Посмотреть сообщение
pawn Код:
new PlayerText:BLOCKINFO[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
MakePlayerTextDraw(playerid);
PlayerTextDrawShow(playerid,BLOCKINFO[playerid]);
SetPlayerTimerEx("UpdateCubes",7000,false,"i",playerid);

}

forward UpdateCubes(i);
public UpdateCubes(i)
{
if(BlockID[i] != -1) format(stringu, sizeof(stringu), "~w~Selected block:~n~~p~~h~~h~~h~%s",CUBE_NAME[BlockID[i]-1]);
else format(stringu, sizeof(stringu), "~w~Selected block:~n~~p~~h~~h~~h~None");
PlayerTextDrawSetString(i,BLOCKINFO[i],stringu);
    return 1;
}
stock MakePlayerTextDraw(playerid)
{
BLOCKINFO[playerid] = CreatePlayerTextDraw(playerid, 509.000000, 379.750091, "Selected block:~n~wait");
PlayerTextDrawLetterSize(playerid, BLOCKINFO[playerid], 0.449999, 1.600000);
PlayerTextDrawTextSize(playerid, BLOCKINFO[playerid], 634.599792, 701.399658);
PlayerTextDrawAlignment(playerid, BLOCKINFO[playerid], 1);
PlayerTextDrawColor(playerid, BLOCKINFO[playerid], -1);
PlayerTextDrawUseBox(playerid, BLOCKINFO[playerid], true);
PlayerTextDrawBoxColor(playerid, BLOCKINFO[playerid], -2147483393);
PlayerTextDrawSetShadow(playerid, BLOCKINFO[playerid], 0);
PlayerTextDrawSetOutline(playerid, BLOCKINFO[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, BLOCKINFO[playerid], -1523963137);
PlayerTextDrawFont(playerid, BLOCKINFO[playerid], 1);
PlayerTextDrawSetProportional(playerid, BLOCKINFO[playerid], 1);
return 1;
}
I doubt that it will make any sence, but I'll try
Reply
#5

Solved. There was some include which was working wrong . i fixed it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)