How do I show a text in the middle of the screen? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How do I show a text in the middle of the screen? (
/showthread.php?tid=237821)
How do I show a text in the middle of the screen? -
dahley5 - 10.03.2011
Hey all, i was wondering how i can show a text in the middle of my game. I saw it in another server and i would like to know how to do it
Dahley
Re: How do I show a text in the middle of the screen? -
Hashski - 10.03.2011
Make a text draw?
Re: How do I show a text in the middle of the screen? -
dahley5 - 10.03.2011
erm, how do i do that? :P im new to this
Re: How do I show a text in the middle of the screen? -
Mike Garber - 10.03.2011
Maybe
https://sampwiki.blast.hk/wiki/GameTextForPlayer ?
Re: How do I show a text in the middle of the screen? -
Mean - 10.03.2011
You can use ~n~ for new line. Or use textdraws.
Re: How do I show a text in the middle of the screen? -
dahley5 - 11.03.2011
sorry if i wasn't very clear but i mean't that if i type like /gametext [message] that it will appear on the screen for the players that are in my server.
Re: How do I show a text in the middle of the screen? -
xir - 11.03.2011
This in zcmd and sscanf.
pawn Код:
COMMAND:gametext(playerid, params[])
{
new msg[128];
if(sscanf(params, "s[128]", msg)) return SendClientMessage(playerid, YOUR_COLOR, "Usage: /gametext <message>");
new string[128];
format(string, sizeof(string), "%s",msg);
GameTextForAll(string, 5000, 0);
return 1;
}
Re: How do I show a text in the middle of the screen? -
HyperZ - 11.03.2011
Just use
ZCMD.
pawn Код:
command(announce, playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /announce [Text]");
GameTextForAll(params,4000,3);
return 1;
}
@xir
No need for "format" in GameTextForAll.
Re: How do I show a text in the middle of the screen? -
dahley5 - 11.03.2011
thanks xir! and how do i make it that it can only be used by rcon?
Re: How do I show a text in the middle of the screen? -
HyperZ - 11.03.2011
pawn Код:
command(announce, playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /announce [Text]");
GameTextForAll(params,4000,3);
return 1;
}