#1

Hello SA:MP Community.

In the picture below shows my basic Register & Login System (Dialogs) (Textdraws).

- I have hidden my textdraws.

What I want to do is change the back ground where the player is viewing?

Another problem I have is that "Connected to" keeps showing up although I have use this code to clear the chat "OnPlayerConnect"

pawn Код:
for(new chat = 0; chat <= 100; chat++)
    {
    SendClientMessage(playerid,COLOR_WHITE," ");
    }
Reply
#2

the connected to "sever" is sent by the client, so i don't think you can do much about it, or maybe i don't know much about it.

for the view try putting "SetPlayerCameraPos" or/and "SetPlayerCameraLookAt" on the OnPlayerConnect callback
maybe
Reply
#3

You CAN NOT do that, sorry.
Reply
#4

I think you can't evade this because when you enter the game it loads everything from OnPlayerConnect and when he almost hits the last line it will show that msg (i think).
Reply
#5

Okay, Thank you all for clearing that up, I just wanted to know if I could skip it or not.

I know about the....

pawn Код:
SetPlayerPos
SetPlayerCameraPos
SetPlayerCameraLookAt

Let me show my code:

pawn Код:
public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    TextDrawShowForPlayer(playerid, Textdraw3);
    TextDrawShowForPlayer(playerid, Textdraw4);
   
    SetPlayerPos(playerid, 637.6825,857.8131,-50.3321);
    SetPlayerCameraPos(playerid, 561.4714,932.8723,24.4060);
    SetPlayerCameraLookAt(playerid, 637.6825,857.8131,-40.3321);
    TogglePlayerControllable(playerid, false);

    new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    strreplace(pname, '_', ' ');
    format(string, sizeof(string), "%s has joined the server.", pname);
    SendClientMessageToAll(COLOR_GREY, string);
   
    PlayAudioStreamForPlayer( playerid, "-----" );

    for(new chat = 0; chat <= 100; chat++)
    {
    SendClientMessage(playerid,COLOR_WHITE," ");
    }
   
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"» Login",""COL_WHITE"-------------------------","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"» Registration",""COL_WHITE"----------------------","Register","Quit");
    }
Reply
#6

Still looking for some help on this.
Reply
#7

Try this.

Код:
public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    TextDrawShowForPlayer(playerid, Textdraw3);
    TextDrawShowForPlayer(playerid, Textdraw4);

    new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    strreplace(pname, '_', ' ');
    format(string, sizeof(string), "%s has joined the server.", pname);
    SendClientMessageToAll(COLOR_GREY, string);
    
    PlayAudioStreamForPlayer( playerid, "-----" );

    for(new chat = 0; chat <= 100; chat++)
    {
    SendClientMessage(playerid,COLOR_WHITE," ");
    }
    
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"» Login",""COL_WHITE"-------------------------","Login","Quit");
    
    SetPlayerPos(playerid, 637.6825,857.8131,-50.3321);
    SetPlayerCameraPos(playerid, 561.4714,932.8723,24.4060);
    SetPlayerCameraLookAt(playerid, 637.6825,857.8131,-40.3321);
    TogglePlayerControllable(playerid, false);
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"» Registration",""COL_WHITE"----------------------","Register","Quit");
    
    SetPlayerPos(playerid, 637.6825,857.8131,-50.3321);
    SetPlayerCameraPos(playerid, 561.4714,932.8723,24.4060);
    SetPlayerCameraLookAt(playerid, 637.6825,857.8131,-40.3321);
    TogglePlayerControllable(playerid, false);
    }
Reply
#8

Didn't work.
Reply
#9

It works now but only when I remove this code:

pawn Код:
for(new chat = 0; chat <= 100; chat++)
    {
    SendClientMessage(playerid,COLOR_WHITE," ");
    }
Is there any other way around this without removing this code?
Reply
#10

Hmm try now.
pawn Код:
for(new chat=0; chat < 100; chat++) SendClientMessage(playerid,COLOR_WHITE," ");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)