some help with the login system
#6

PHP код:
// above in defines
#define     ClearChat(%0)     for (new i = 0; i < 40; i++) SendClientMessage(%0, -1, " ")

public OnPlayerConnect(playerid)
{
    
ClearChat(playerid);
    new 
string[SOS];
    
GetPlayerName(playeridpInfo[playerid][Nick], 20);
    
GetPlayerIp(playeridpInfo[playerid][Ip], 16);
    
format(stringSOS"*** %s has joined the server."pInfo[playerid][Nick]);
    
SendClientMessageToAll(ORANGEstring);
    if(
fexist(UserPath(playerid)))
    {
        
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
        
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,"{FFFFFF}Login","{FFFFFF}Type your password to login.","Login","Quit");
    }
    else
    {
        
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT,"{FFFFFF}Registering...","{FFFFFF}Type your password  to register","Register","Quit");
    }
    return 
1;

This should work, and you don't have to type 'sendclientmessage' 20times to clear the chat, just use a macro.
Reply


Messages In This Thread
some help with the login system - by ahmedraed - 11.11.2015, 15:28
Re: some help with the login system - by ATGOggy - 11.11.2015, 15:41
Re: some help with the login system - by ahmedraed - 11.11.2015, 15:54
Re: some help with the login system - by jlalt - 11.11.2015, 16:53
Re: some help with the login system - by ahmedraed - 11.11.2015, 18:45
Re: some help with the login system - by iKarim - 11.11.2015, 18:59

Forum Jump:


Users browsing this thread: 3 Guest(s)