|
Hi I seen a few servers i was on and it showed the players name by the map and i searched wiki on how to show the text i cant find it could someone give me a example of one dont half to be by the map ill try adjust the position unless you want to please help thanks
|
|
STOP spamming the boards with the same topic. Gosh, just reply on your old topic and dont make new ones.
|
|
Oh, that's easy! make the text draw, then use a string from there. :P Make the textdraw and ill help you set it up!
![]() |
forward playertextdraw(playerid);
new Text:Textdraw0[MAX_PLAYERS];
public playertextdraw(playerid)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
Textdraw0[playerid] = TextDrawCreate(29.000000, 334.000000, name);
TextDrawBackgroundColor(Textdraw0[playerid], 255);
TextDrawFont(Textdraw0[playerid], 1);
TextDrawLetterSize(Textdraw0[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw0[playerid], 65535);
TextDrawSetOutline(Textdraw0[playerid], 1);
TextDrawSetProportional(Textdraw0[playerid], 1);
TextDrawSetString(Textdraw0[playerid], name);
return 1;
}
public OnPlayerSpawn(playerid)
{
TogglePlayerClock(playerid, 0);
SetPlayerColor( playerid, COLOR_WHITE );
//SetPlayerInterior(playerid,0);
SetPlayerInterior(playerid,1);
SetPlayerPos(playerid, 1.3173,29.7461,1199.6012);
SetPlayerSkin(playerid, 217);
TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
return 1;
}
TextDrawShowForPlayer(TextDraw0[playerid]);
hello DIDNT work.. DUH try it
|
Okay this what i've done so far but don't appear on the screen
Код:
forward playertextdraw(playerid); Код:
new Text:Textdraw0[MAX_PLAYERS]; Код:
public playertextdraw(playerid)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
Textdraw0[playerid] = TextDrawCreate(29.000000, 334.000000, name);
TextDrawBackgroundColor(Textdraw0[playerid], 255);
TextDrawFont(Textdraw0[playerid], 1);
TextDrawLetterSize(Textdraw0[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw0[playerid], 65535);
TextDrawSetOutline(Textdraw0[playerid], 1);
TextDrawSetProportional(Textdraw0[playerid], 1);
TextDrawSetString(Textdraw0[playerid], name);
return 1;
}
Код:
public OnPlayerSpawn(playerid)
{
TogglePlayerClock(playerid, 0);
SetPlayerColor( playerid, COLOR_WHITE );
//SetPlayerInterior(playerid,0);
SetPlayerInterior(playerid,1);
SetPlayerPos(playerid, 1.3173,29.7461,1199.6012);
SetPlayerSkin(playerid, 217);
TextDrawShowForPlayer(playerid,Textdraw0[playerid]);
return 1;
}
Код:
TextDrawShowForPlayer(TextDraw0[playerid]); and made a public playertextdraw But i have no clue why it did not show up unless i wrote it wrong or forgot something ![]() |







??BUMP
new Text:NameText[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
NameText[playerid] = TextDrawCreate(52.000000, 428.000000, " ");
TextDrawBackgroundColor(NameText[playerid], 255);
TextDrawFont(NameText[playerid], 1);
TextDrawLetterSize(NameText[playerid], 0.330000, 1.100000);
TextDrawColor(NameText[playerid], -1);
TextDrawSetOutline(NameText[playerid], 1);
TextDrawSetProportional(NameText[playerid], 1);
SetTimerEx("SetTextdraw", 2000, false, "i", playerid);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
TextDrawDestroy(NameText[playerid]);
return 1;
}
forward SetTextdraw(playerid);
public SetTextdraw(playerid)
{
new name[25], string[25];
GetPlayerName(playerid, name, 25);
format(string, 25, "%s", name);
TextDrawSetString(NameText[playerid], string);
TextDrawShowForPlayer(playerid, NameText[playerid]);
return 1;
}
|
pawn Код:
|