Text draw
#1

I have a text draw code:
pawn Код:
// On top of script:
new Text:joinmsg;

// In OnGameModeInit
joinmsg = TextDrawCreate(506 ,330 , "Join:");
TextDrawFont(joinmsg , 3);
TextDrawLetterSize(joinmsg , .4, 2.8000000000000003);
TextDrawColor(joinmsg , 0x187836FF);
TextDrawSetOutline(joinmsg , false);
TextDrawSetProportional(joinmsg , true);
TextDrawSetShadow(joinmsg , 1);
And it is for when some one joins it say in the lower right JOIN:
But the problem is idk how i would make it so it says the JOIN: (name) ? Any help
Reply
#2

pawn Код:
public OnPlayerConnect(playerid)
{
    new rope[128];
    GetPlayerName(playerid,nAme,sizeof(nAme));
    format(rope,sizeof(rope),"Join: %s",nAme);
    TextDrawSetString(joinmsg,String);
    TextDrawShowForAll(joinmsg);
    return 1;
}
Reply
#3

Failed.

pawn Код:
public OnPlayerConnect(playerid)
{
new string[30],name[24];
GetPlayerName(playerid, name,sizeof(name));
format(string,sizeof(string),"Join: %s", name);
TextDrawSetString(joinmsg,string);
TextDrawShowForAll(joinmsg);
}
Reply
#4

Fail?

pawn Код:
public OnPlayerConnect(playerid)
{
    new rope[30],nAme[24];//There's a chance he already has "string" and or "name"; So he'll get errors...
    GetPlayerName(playerid,nAme,sizeof(nAme));
    format(rope,sizeof(rope),"Join: %s",nAme);
    TextDrawSetString(joinmsg,rope);
    TextDrawShowForAll(joinmsg);
    return 1;
}
Reply
#5

Quote:
Originally Posted by Tee
Посмотреть сообщение
Fail?
Yes, tried to compile your previous post?

Quote:
Originally Posted by Tee
Посмотреть сообщение
There's a chance he already has "string" and or "name"; So he'll get errors...
That's true, but I think he is able to fix those errors himself.
Reply
#6

No you're code is okay, except for the fact that he might have those variables already defined .
Reply
#7

Im getting errors; not with ur code but with the text draw
pawn Код:
(254) : error 001: expected token: "-identifier-", but found "-integer value-"
(254) : warning 215: expression has no effect
(254) : warning 215: expression has no effect
(254) : error 001: expected token: ";", but found ")"
(254) : error 029: invalid expression, assumed zero
(254) : fatal error 107: too many error messages on one line
254
pawn Код:
TextDrawLetterSize(joinmsg , .4, 2.8000000000000003);
Reply
#8

pawn Код:
TextDrawLetterSize(joinmsg , .4, 2.8000000000000003);
That's your code. There should be something infront of ".4". Maybe 4.0 or a float.

pawn Код:
TextDrawLetterSize(Text:text, Float: x, Float:y);
Reply
#9

my TD interferes with my Speedometer. Is there a way to make them not? The TD isnt showing because of it.
Reply
#10

Код:
TextDrawLetterSize(joinmsg , .4, 2.8000000000000003);
To

Код:
TextDrawLetterSize(joinmsg , 0.4, 2.8000000000000003);
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)