SA-MP Forums Archive
GameTextForPlayer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GameTextForPlayer (/showthread.php?tid=563058)



GameTextForPlayer - danish007 - 13.02.2015

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"


Re: GameTextForPlayer - ZaBraNjeNi - 13.02.2015

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)


Re: GameTextForPlayer - danish007 - 13.02.2015

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


AW: GameTextForPlayer - Nero_3D - 13.02.2015

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


Re: GameTextForPlayer - danish007 - 14.02.2015

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


Re: GameTextForPlayer - danish007 - 14.02.2015

please? anyone?


Re: GameTextForPlayer - ReshiramZekrom - 14.02.2015

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;



Re: GameTextForPlayer - HY - 14.02.2015

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;
}



Re: GameTextForPlayer - danish007 - 14.02.2015

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!


Re: GameTextForPlayer - danish007 - 14.02.2015

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);
}