You must register on our Website Error!
#1

Hello,

I've gotten a Gamemode (County Roleplay) and i hosted it on localhost, and when i logged onto it, It says that I have to register on their website.. How do i remove this so people can go straight into the game, without having to register on forum.

Thanks in advance.
(( If you need any codes, comment below ))
Reply
#2

show the register code .
Reply
#3

Where do i find that? D:
Reply
#4

OnPlayerConnect
Reply
#5

Oh I think i've found it:

PHP код:
 {
    new 
Query128 ], NameMAX_PLAYER_NAME ], EscapedNameMAX_PLAYER_NAME ];
    
GetPlayerNameplayeridNamesizeofName ) );
    
mysql_real_escape_stringNameEscapedName );
    
#pragma unused Name
    
formatQuerysizeofQuery ), "SELECT `UserID` FROM `Accounts` WHERE `Username` = '%s'"EscapedName );
    
mysql_queryQuery );
    
printf(" SQL: %s",Query);
    
mysql_store_result();
    if( 
mysql_num_rows() >= )
    {
        if( 
mysql_num_rows() >= )
        {
            
mysql_free_result();
            
SendClientMessageplayeridCOLOR_WHITE"There seems to be duplicates of your account, please contact a high-level admin." );
            
SendClientMessageplayeridCOLOR_WHITE"Best to screenshot this and forum PM a scripter with your ingame name, then they will check it asap." );
            
Kickplayerid );
        }
        else
        {
            
PlayerInfo[playerid][pDatabaseID] = mysql_fetch_int();
            
// Start shit
            
new string[128];
            
formatstringsizeof( string ), "{FFFFFF}Welcome, {00C0FF}%s{FFFFFF} !\n\nEnter your password in the box below"GetPlayerNameEx(playerid) );
            
ShowPlayerDialogplayerid1DIALOG_STYLE_PASSWORD,"{FFFFFF}County RolePlay{FFFFFF}",string"Login""Exit" );
            
SetTimerEx("LogTimer"600000"d"playerid);
            
//TogglePlayerSpectating(playerid, 1);
            //InterpolateCameraPos(playerid, 838.256958, -2255.666015, 28.207962, 795.577819, -1796.068237, 58.673408, 1000);
            //InterpolateCameraLookAt(playerid, 838.473815, -2250.677001, 27.958066, 796.360046, -1791.334350, 57.266872, 1000);
            
gPlayerLogged[playerid] = 0;
            
mysql_free_result();
        }
    }
    else
    {
    
mysql_free_result();
    
gPlayerLogged[playerid] = 0;
    
SendClientMessage(playeridCOLOR_LIGHTRED"You don't have an account registered ! Please Create an account www.county-rp.com!");
    
SetTimerEx("LogTimer"60000"d"playerid);
    }
    return 
1;

Reply
#6

Or it may have "forward OnPlayerRegister". Today's server's use this only.

Try finding "forward OnPlayerRegister" if it's in the script.

Otherwise show us "OnPlayerConnect"
Reply
#7

OnPlayerConnect :

PHP код:
InitSlots(playerid);
    
OnlinePlayers++;
    if(
IsPlayerNPC(playerid)) return 1;
    
ResetPlayerVariablesplayerid );
    
SetPlayerColor(playerid,COLOR_WHITE);
       
Meter1[playerid] = TextDrawCreate(526.000000,408.000000,"I");
    
Meter2[playerid] = TextDrawCreate(622.000000,421.000000," ");
    
Meter3[playerid] = TextDrawCreate(529.000000,428.000000,"      Range");
    
TextDrawUseBox(Meter2[playerid],1);
    
TextDrawBoxColor(Meter2[playerid],0x000000ff);
    
TextDrawTextSize(Meter2[playerid],524.000000,171.000000);
    
TextDrawAlignment(Meter1[playerid],0);
    
TextDrawAlignment(Meter2[playerid],0);
    
TextDrawAlignment(Meter3[playerid],0);
    
TextDrawFont(Meter1[playerid],2);
    
TextDrawFont(Meter2[playerid],3);
    
TextDrawFont(Meter3[playerid],2);
    
TextDrawLetterSize(Meter1[playerid],0.199999,2.400000);
    
TextDrawLetterSize(Meter2[playerid],2.199999,0.000000);
    
TextDrawLetterSize(Meter3[playerid],0.300000,1.000000);
    
TextDrawSetOutline(Meter1[playerid],1);
    
TextDrawSetOutline(Meter2[playerid],1);
    
TextDrawSetOutline(Meter3[playerid],1);
    
TextDrawSetShadow(Meter1[playerid],0);
    
TextDrawSetShadow(Meter2[playerid],0);
    
TextDrawSetShadow(Meter3[playerid],0);
    
// Her er infobox
    
InfoBox[playerid] = TextDrawCreate(36.000000144.000000"_");
    
TextDrawUseBox(InfoBox[playerid],1);
    
TextDrawBoxColor(InfoBox[playerid],0x00000033);
    
TextDrawTextSize(InfoBox[playerid], 180.0000005.000000);
    
TextDrawAlignment(InfoBox[playerid],0);
    
TextDrawBackgroundColor(InfoBox[playerid],0x000000ff);
    
TextDrawFont(InfoBox[playerid],2);
    
TextDrawLetterSize(InfoBox[playerid], 0.2500001.099999);
    
TextDrawColor(InfoBox[playerid], -1);
    
TextDrawSetOutline(InfoBox[playerid],1);
    
TextDrawSetProportional(InfoBox[playerid],1);
    
TextDrawSetShadow(InfoBox[playerid],1);
    
// Achievement box
    
InfoBoxer[playerid] = TextDrawCreate(18.000000,428.000000,"test");
    
TextDrawUseBox(InfoBoxer[playerid],1);
    
TextDrawBoxColor(InfoBoxer[playerid],0x00000033);
    
TextDrawTextSize(InfoBoxer[playerid],217.000000,59.000000);
    
TextDrawAlignment(InfoBoxer[playerid],0);
    
TextDrawBackgroundColor(InfoBoxer[playerid],0x000000ff);
    
TextDrawFont(InfoBoxer[playerid],2);
    
TextDrawLetterSize(InfoBoxer[playerid],0.199999,0.899999);
    
TextDrawColor(InfoBoxer[playerid],0xffffffff);
    
TextDrawSetOutline(InfoBoxer[playerid],1);
    
TextDrawSetProportional(InfoBoxer[playerid],1);
    
TextDrawSetShadow(InfoBoxer[playerid],1);
    
RemovePlayerAttachedObject(playerid0);
    
RemovePlayerAttachedObject(playerid1);
    
RemovePlayerAttachedObject(playerid2);
    
RemovePlayerAttachedObject(playerid3);
    
RemovePlayerAttachedObject(playerid4);
    
// Speedometer
    
CarInfo[playerid] = TextDrawCreate(546.0000100.0000,"Viteza: 100~n~Combustibil: 100");
    
TextDrawAlignment(CarInfo[playerid],0);
    
TextDrawFont(CarInfo[playerid],1);
    
TextDrawLetterSize(CarInfo[playerid],0.420000,1.300000);
    
TextDrawColor(CarInfo[playerid],0xffffffff);
    
TextDrawSetOutline(CarInfo[playerid],1);
    
TextDrawSetShadow(CarInfo[playerid],1);
    
// Snow
    
if(SnowOn == 1) { SnowObject[playerid] = CreatePlayerObject(playerid18864000000); }
    
//==========================================================================
    
JoinCounter JoinCounter 1;
    
dini_IntSet("IBP/Other/JoinCounter.cfg""Connections"JoinCounter);
    
//==========================================================================
    
PlayerPressedJump[playerid] = 0;
    
Wounded[playerid] = 0;
    
PlayerInfo[playerid][pReport] = -1;
    
PlayerInfo[playerid][pQuestion] = -1;
    
PlayerInfo[playerid][pRadioHandle] = -1;
    
SetPlayerScore(playerid0);
    
UsingPayphone[playerid] = 0;
    
IsUsingAnim[playerid] = 0;
    
gPlayerAnimLibsPreloaded[playerid] = 0;
    if (!
IsValidName(playerid))
    {
        
SendClientMessage(playerid,COLOR_GRAD2,"Wrong name format. Please reconnect with a proper Role Play name.");
        
SendClientMessage(playerid,COLOR_GRAD2,"Example: John_Walker");
        
Kick(playerid);
        return 
0;
    }
     new 
first[MAX_PLAYER_NAME], last[MAX_PLAYER_NAME];
    if(
RPName(PlayerName(playerid),first,last))
    {
        
InitPlayerConnectionplayerid );
           
SetSpawnInfoplayerid0PlayerInfo[playerid][pSkin], 1958.331343.1215.36269.1500000);
        
SetPlayerSkillLevel(playeridWEAPONSKILL_PISTOL1);
        
SetPlayerSkillLevel(playeridWEAPONSKILL_MICRO_UZI1);
        
SetPlayerSkillLevel(playeridWEAPONSKILL_SAWNOFF_SHOTGUN1);
        foreach (
Playeri)
        {
            if(
BlockPMPerson[playerid][i] == 1)
            {
                
BlockPMPerson[playerid][i] = 0;
            }
        }
    }
    else
    {
        
SendClientMessage(playerid,0xA9C4E4AA,"Invalid Name, Correct Format: Firstname_Lastname (Kicked)");
        
Kick(playerid);
    }
    return 
1;

Reply
#8

Код:
{ 
    new Query[ 128 ], Name[ MAX_PLAYER_NAME ], EscapedName[ MAX_PLAYER_NAME ]; 
    GetPlayerName( playerid, Name, sizeof( Name ) ); 
    mysql_real_escape_string( Name, EscapedName ); 
    #pragma unused Name 
    format( Query, sizeof( Query ), "SELECT `UserID` FROM `Accounts` WHERE `Username` = '%s'", EscapedName ); 
    mysql_query( Query ); 
    printf(" SQL: %s",Query); 
    mysql_store_result(); 
    if( mysql_num_rows() >= 1 ) 
    { 
        if( mysql_num_rows() >= 2 ) 
        { 
            mysql_free_result(); 
            SendClientMessage( playerid, COLOR_WHITE, "There seems to be duplicates of your account, please contact a high-level admin." ); 
            SendClientMessage( playerid, COLOR_WHITE, "Best to screenshot this and forum PM a scripter with your ingame name, then they will check it asap." ); 
            Kick( playerid ); 
        } 
        else 
        { 
            PlayerInfo[playerid][pDatabaseID] = mysql_fetch_int(); 
            // Start shit 
            new string[128]; 
            format( string, sizeof( string ), "{FFFFFF}Welcome, {00C0FF}%s{FFFFFF} !\n\nEnter your password in the box below", GetPlayerNameEx(playerid) ); 
            ShowPlayerDialog( playerid, 1, DIALOG_STYLE_PASSWORD,"{FFFFFF}County RolePlay{FFFFFF}",string, "Login", "Exit" ); 
            SetTimerEx("LogTimer", 60000, 0, "d", playerid); 
            //TogglePlayerSpectating(playerid, 1); 
            //InterpolateCameraPos(playerid, 838.256958, -2255.666015, 28.207962, 795.577819, -1796.068237, 58.673408, 1000); 
            //InterpolateCameraLookAt(playerid, 838.473815, -2250.677001, 27.958066, 796.360046, -1791.334350, 57.266872, 1000); 
            gPlayerLogged[playerid] = 0; 
            mysql_free_result(); 
        } 
    } 
    
    return 1; 
}
Reply
#9

Now i log in nothing pops up
Reply
#10

Oh, i got it. I guess . Try this,
Код:
{ 
    new Query[ 128 ], Name[ MAX_PLAYER_NAME ], EscapedName[ MAX_PLAYER_NAME ]; 
    GetPlayerName( playerid, Name, sizeof( Name ) ); 
    mysql_real_escape_string( Name, EscapedName ); 
    #pragma unused Name 
    format( Query, sizeof( Query ), "SELECT `UserID` FROM `Accounts` WHERE `Username` = '%s'", EscapedName ); 
    mysql_query( Query ); 
    printf(" SQL: %s",Query); 
    mysql_store_result(); 
    if( mysql_num_rows() >= 1 ) 
    { 
        if( mysql_num_rows() >= 2 ) 
        { 
            mysql_free_result(); 
            SendClientMessage( playerid, COLOR_WHITE, "There seems to be duplicates of your account, please contact a high-level admin." ); 
            SendClientMessage( playerid, COLOR_WHITE, "Best to screenshot this and forum PM a scripter with your ingame name, then they will check it asap." ); 
            Kick( playerid ); 
        } 
        else 
        { 
            PlayerInfo[playerid][pDatabaseID] = mysql_fetch_int(); 
            // Start shit 
            new string[128]; 
            format( string, sizeof( string ), "{FFFFFF}Welcome, {00C0FF}%s{FFFFFF} !\n\nEnter your password in the box below", GetPlayerNameEx(playerid) ); 
            ShowPlayerDialog( playerid, 1, DIALOG_STYLE_PASSWORD,"{FFFFFF}County RolePlay{FFFFFF}",string, "Login", "Exit" ); 
            SetTimerEx("LogTimer", 60000, 0, "d", playerid); 
            //TogglePlayerSpectating(playerid, 1); 
            //InterpolateCameraPos(playerid, 838.256958, -2255.666015, 28.207962, 795.577819, -1796.068237, 58.673408, 1000); 
            //InterpolateCameraLookAt(playerid, 838.473815, -2250.677001, 27.958066, 796.360046, -1791.334350, 57.266872, 1000); 
            gPlayerLogged[playerid] = 0; 
            mysql_free_result(); 
        } 
    } 
    else 
    { 
    mysql_free_result(); 
    gPlayerLogged[playerid] = 0; 
    SendClientMessage(playerid, COLOR_LIGHTRED, "Welcome To Our Server."); 
    SetTimerEx("LogTimer", 6000, 0, "d", playerid); 
    } 
    return 1; 
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)