WelcomeTextMessage
#1

Hi how to make when someone connect to my server in the middle of the screen to see IvancheBG'Stunt World and underneath it to see the rules like:
No cheating
No Spaming
And others

How to do that?
Reply
#2

Err, GameTextForPlayer(playerid, message[]) ?

You can use TextDraw formatting techniques such as ~n~ (new line) and ~b~ (blue colour) for example.
Reply
#3

Use these:
https://sampwiki.blast.hk/wiki/OnPlayerConnect
https://sampwiki.blast.hk/wiki/GameTextForPlayer
Reply
#4

Can you tell me how because i will use texdraw for first time.
Reply
#5

pawn Код:
public OnPlayerConnect(playerid)
{
    new pName[24],
        string[128];

    GetPlayerName(playerid, pName, 24);
    format(string, sizeof(string), "~r~%s ~w~has connected to server!");
    foreach(Player, i)
    {
        GameTextForPlayer(i, string, 3000, 4);
    }
    return true;
}
*Note, if you dont have foreach you need to download it, because i used it in this script, so i can fast loop through players.

http://forum.sa-mp.com/showthread.ph...hlight=foreach - Foreach Download
Reply
#6

https://sampforum.blast.hk/showthread.php?tid=239014

You think that ?
Reply
#7

I know what you mean.

Is this what actually do you mean?

//On top of script:
pawn Код:
new Text:WelcomeText;
//Under OnGameModeInit:

pawn Код:
WelcomeText = TextDrawCreate(192.000000,112.000000,"~r~IvancheBG's ~b~Stunt World ~n~ ~n~~r~No Cheating or flaming ~n~ No absuing ~n~ Always Respect Admins And Players ~n~ No Spamming ~n~ If not doing so can lead you to kick or ban.");
TextDrawUseBox(WelcomeText,1);
TextDrawBoxColor(WelcomeText,0x00000099);
TextDrawTextSize(WelcomeText,527.000000,32.000000);
TextDrawAlignment(WelcomeText,0);
TextDrawBackgroundColor(WelcomeText0,0x000000ff);
TextDrawFont(WelcomeText,3);
TextDrawLetterSize(WelcomeText,0.499999,1.200000);
TextDrawColor(WelcomeText,0xffffffff);
TextDrawSetOutline(WelcomeText,1);
TextDrawSetProportional(WelcomeText,1);
TextDrawSetShadow(WelcomeText,1);
//This under OnPlayerConnect:

pawn Код:
TextDrawShowForPlayer(playerid, WelcomeText);
//This under OnPlayerRequestClass:

pawn Код:
TextDrawHideForPlayer(playerid, WelcomeText);

Also if you don't understand that on where to put this?

Here is it:

Must put this on Top

pawn Код:
new Text:WelcomeText;
pawn Код:
public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, WelcomeText);
    return 1;
}
pawn Код:
public OnPlayerRequestClass(playerid)
{
    TextDrawHideForPlayer(playerid, WelcomeText);
    return 1;
}
pawn Код:
public OnGameModeInit()
{
    WelcomeText = TextDrawCreate(192.000000,112.000000,"~r~IvancheBG's ~b~Stunt World ~n~ ~n~~r~No Cheating or flaming ~n~ No absuing ~n~ Always Respect Admins And Players ~n~ No Spamming ~n~ If not doing so can lead you to kick or ban.");
    TextDrawUseBox(WelcomeText,1);
    TextDrawBoxColor(WelcomeText,0x00000099);
    TextDrawTextSize(WelcomeText,527.000000,32.000000);
    TextDrawAlignment(WelcomeText,0);
    TextDrawBackgroundColor(WelcomeText0,0x000000ff);
    TextDrawFont(WelcomeText,3);
    TextDrawLetterSize(WelcomeText,0.499999,1.200000);
    TextDrawColor(WelcomeText,0xffffffff);
    TextDrawSetOutline(WelcomeText,1);
    TextDrawSetProportional(WelcomeText,1);
    TextDrawSetShadow(WelcomeText,1);
    return 1;
}
Thanks.
Reply
#8

One error

C:\Documents and Settings\user\Desktop\server samp\gamemodes\Stunt.pwn(11 : error 017: undefined symbol "WelcomeText0"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#9

Change:

pawn Код:
TextDrawBackgroundColor(WelcomeText0,0x000000ff);
To:

pawn Код:
TextDrawBackgroundColor(WelcomeText,0x000000ff);
Reply
#10

thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)