TextDraw Related Help
#1

Hi,

I wanted to make a text draw box which can show player connects and leaves only,

I created the textdraws but I am having trouble in compiling them into a box to use :/
Any kind of help would be appreciated i searched around but couldnt find any answers....
If there's any link to any article that could help me understand it would also be considered as great help !
A wiki link wouldn't be appreciated since i read some articles there but they arent of my use...
Reply
#2

You said you read the wiki but you haven't looked enough, because otherwise you would have seen this example there:

https://sampwiki.blast.hk/wiki/TextDrawSetString

Код:
new Text:himessage;
 
public OnGameModeInit()
{
    himessage = TextDrawCreate(1.0, 5.6, "Hi, how are you?"); 
    return 1;
}
 
public OnPlayerConnect(playerid)
{
    new newtext[41], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(newtext, sizeof(newtext), "Hi %s, how are you?", name);
    TextDrawSetString(himessage, newtext);   
    TextDrawShowForPlayer(playerid, himessage);
    return 1;
}
You just have to adjust the example above for leaving and joining messages. You'll have to make use of the callbacks OnPlayerConnect and OnPlayerDisconect to detect joining and leaving, then you will need to create your desired textdraws with the textdraw functions (you can make it look however you want). The TextDrawSetString function can be used to edit the text in your textdraw.
Reply
#3

Seriously?

I said I read all articles at wiki....

I am having trouble with TextDrawUseBox...
That TextDrawSetString thingy didnt help me Since I know about it already and am using in the stock I made for the box to edit things in it...
And I know what callbacks to use where I am not a newbie just had trouble so came here for help!

Anyone Else?
Zhao if you see this again I would surely like you to comment again and help in any way you can

P.S I am working on it at the moment realized that I made a mistake in my code at a point gonna fix it...If it gets fixed I'll edit this post and tell and if i do not tell then any one who helps would be considered a greatly nice person and his help would be appreciated !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)