[Help Required]Name and another Textdraw[Used as FS] -
SrIzZaN - 08.05.2015
I have made a Filterscript, In which I have made some textdraws,
1.A name textdraw
2.a textdraw which shows over the box textdraw(the news textdraw, which you might be knowing)
These are the codes
Код:
new Text:Textdraw0;
new Text:XPRWW2;
public OnFilterScriptInit()
{
Textdraw0 = TextDrawCreate(214.000000,379.000000,"_");
TextDrawUseBox(Textdraw0,1);
TextDrawBoxColor(Textdraw0,0x00000099);
TextDrawTextSize(Textdraw0,456.000000,134.000000);
TextDrawAlignment(Textdraw0,1);
TextDrawBackgroundColor(Textdraw0,0x000000ff);
TextDrawFont(Textdraw0,2);
TextDrawLetterSize(Textdraw0,0.440000, 1.000000);
TextDrawColor(Textdraw0,0xff0000ff);
TextDrawSetOutline(Textdraw0,1);
TextDrawSetProportional(Textdraw0,1);
TextDrawSetShadow(Textdraw0,10);
XPRWW2 = TextDrawCreate(511, 360, "_____XP RWW2_____");
TextDrawFont(XPRWW2 , 2);
TextDrawLetterSize(XPRWW2 , 0.5, 3.5);
TextDrawColor(XPRWW2 , 0xFF0000FF);
TextDrawSetOutline(XPRWW2 , 1);
TextDrawSetProportional(XPRWW2 , 0);
TextDrawSetShadow(XPRWW2 , 1);
TextDrawUseBox(XPRWW2,1);
TextDrawBoxColor(XPRWW2, 0x00FFFFFF);
TextDrawTextSize(XPRWW2, 456.000000, 134.000000);
return 1;
}
It has this type of a feature, which is not working
Shows the name of the player
Код:
public OnPlayerConnect(playerid)
{
new Pname[MAX_PLAYER_NAME], string[30];
format(string, sizeof(string), "%s", Pname);
TextDrawSetString(Textdraw0, string);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, XPRWW2);
return 1;
}
The name textdraw dosent work at all, and the XPRWW2's box is not behind it, except its in the right side of it
Help is required here, appreciate it.
Re: [Help Required]Name and another Textdraw[Used as FS] -
andrew01000 - 08.05.2015
Код:
public OnPlayerConnect(playerid)
{
new Pname[MAX_PLAYER_NAME], string[30];
GetPlayerName(playerid, Pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s", Pname);
TextDrawSetString(Textdraw0, string);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, XPRWW2);
return 1;
}
Re: [Help Required]Name and another Textdraw[Used as FS] - justice96 - 08.05.2015
Код:
new Text:Textdraw0[MAX_PLAYERS];
public OnFilterScriptInit()
{
// use foreach here
Textdraw0[i] = bla bla bla
return 1;
}
public OnPlayerConnect(playerid)
{
new Pname[MAX_PLAYER_NAME], string[30];
GetPlayerName(playerid,Pname,sizeof(Pname));
format(string, sizeof(string), "%s", Pname);
TextDrawSetString(Textdraw0[playerid], string);
TextDrawShowForPlayer(playerid, Textdraw0[playerid]);
return 1;
}
Re: [Help Required]Name and another Textdraw[Used as FS] -
SrIzZaN - 08.05.2015
Thanks, that problem is now fixed.
But still I have the second problem though
http://img.prntscr.com/img?url=http:...om/VcOaY4b.png
or
http://prntscr.com/72z195
The should be showing above the box, rather than like that