How do I show a text in the middle of the screen?
#1

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
Reply
#2

Make a text draw?
Reply
#3

erm, how do i do that? :P im new to this
Reply
#4

Maybe https://sampwiki.blast.hk/wiki/GameTextForPlayer ?
Reply
#5

You can use ~n~ for new line. Or use textdraws.
Reply
#6

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.
Reply
#7

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;
}
Reply
#8

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.
Reply
#9

thanks xir! and how do i make it that it can only be used by rcon?
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)