GameTextForPlayer
#1

Hello how can i make if i've send one gametext to player and if i send another again the first one should go down and new one should be on first line.
i mean to make 2 lines. old msg and new msg line any example?

example: first msg: "Hello World" if i send only one. it will be like this and if i send again an other gametextmsg
it should be

"Holla World"
"Hello World"
Reply
#2

Hmmm, see here: (You need just to change something (coordinates))
- https://sampforum.blast.hk/showthread.php?tid=425372 (Include)
- https://sampforum.blast.hk/showthread.php?tid=425372 (FS)
- https://sampforum.blast.hk/showthread.php?tid=425372 (FS)
Reply
#3

but i want to make it with GameTextForPlayer(playerid, "something", 5000, 3);
Reply
#4

Well you need to save the text into a variable and store the time of each line

And if you want to leave the natives as they are than you need to hook them
Reply
#5

please tell me how? im not much expert in pawn!
Reply
#6

please? anyone?
Reply
#7

I don't know if I have understand what you mean.. But I think that you wanna do something like this:

pawn Код:
//create a new variable such us:
new gamertexted[MAX_PLAYERS];

//then in the command
if(gamertexted[playerid] == 0) GameTextForPlayer(playerid,"Hello World",5000,3),gamertexted[playerid]++;
else GameTextForPlayer(playerid,"HollaWorld\nHello World",5000,3);

//then in connect or in disconnect or in both you should put:
gamertexted[playerid] = 0;
Reply
#8

Use ~n~ to make a new line:
Example:

pawn Код:
CMD:text(playerid, params[])
{
    GameTextForPlayer(playerid, "First Line~n~Second Line~n~Third Line~n~Fourth Line", 5000, 5);
    return 1;
}
Reply
#9

i dont want like this!
im asking about making new function or stock!
pawn Код:
stock GameTextForPlayerEx(playerid, msg[], time, type)
{
//code here!
}
but the code i want!
Reply
#10

yea, its my code! won't make new line if i send 2 messages!

command!
pawn Код:
COMMAND:test(playerid, params[])
{
    SendGameText(playerid, "~p~Pink", 3000, 3);
    SendGameText(playerid, "~b~Blue", 3000, 3);
    return 1;
}
pawn Код:
stock SendGameText(playerid, message[], time, type)
{
    new string[512];
    format(string, sizeof(string),"%s %s\n", string, message);
    GameTextForPlayer(playerid, string, time, type);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)