13.07.2014, 07:27
Hello guys, again i'm in a problem; when i join server (with my script) it asks for register and i input pass it dosent let me to spawn it dosent spawn it just stucked showing views that's all how could i fix it want my login code??
& this:
Quote:
stock ShowMainMenuDialog(playerid, frame) { new titlestring[64]; new string[512]; switch(frame) { case 1: { format(titlestring, sizeof(titlestring), "{3399FF}Login - %s", GetPlayerNameEx(playerid)); format(string, sizeof(string), "{FFFFFF}Welcome to Infinity Gaming Roleplay, {FF8000}%s{FFFFFF}.\n\nThe name that you are using is registered, please enter a password to login:", GetPlayerNameEx(playerid));//, GetPlayerIpEx(playerid)); ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PA SSWORD,titlestring,string,"Login","Exit"); } case 2: { format(titlestring, sizeof(titlestring), "{3399FF}Register - %s", GetPlayerNameEx(playerid)); format(string, sizeof(string), "{FFFFFF}Welcome to Infinity Gaming Roleplay, {FF8000}%s{FFFFFF}.\n\nYou may register an account by entering a desired password here:", GetPlayerNameEx(playerid));//, GetPlayerIpEx(playerid)); ShowPlayerDialog(playerid,MAINMENU2,DIALOG_STYLE_P ASSWORD,titlestring,string,"Register","Exit"); } case 3: { format(titlestring, sizeof(titlestring), "{3399FF}Login - %s", GetPlayerNameEx(playerid)); format(string, sizeof(string), "{FF0000}Invalid Password{FFFFFF}!\n\nWelcome to Infinity Gaming Roleplay, {FF8000}%s{FFFFFF}.\n\nThe name that you are using is registered, please enter a password to login:", GetPlayerNameEx(playerid));//, GetPlayerIpEx(playerid)); ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PA SSWORD,titlestring,string,"Login","Exit"); } case 4: { format(titlestring, sizeof(titlestring), "{3399FF}Account Locked - %s", GetPlayerNameEx(playerid)); format(string, sizeof(string), "{FFFFFF}Our database indicates that %s is currently {00FF00}logged in{FFFFFF}, if this is a mistake please contact a tech administrator.", GetPlayerNameEx(playerid)); ShowPlayerDialog(playerid,MAINMENU3,DIALOG_STYLE_M SGBOX,titlestring,string,"Exit",""); } } } stock SafeLogin(playerid, type) { switch(type) { case 1: // Account Exists { ShowMainMenuDialog(playerid, 1); } case 2: // No Account Exists { if(!IsValidName(playerid)) { SetPVarString(playerid, "KickNonRP", GetPlayerNameEx(playerid)); SetTimerEx("KickNonRP", 3000, false, "i", playerid); } else { ShowMainMenuDialog(playerid, 2); } } } return 1; } forward KickNonRP(playerid); public KickNonRP(playerid) { new name[MAX_PLAYER_NAME]; GetPVarString(playerid, "KickNonRP", name, sizeof(name)); if(strcmp(GetPlayerNameEx(playerid), name) == 0) { SendClientMessage(playerid, COLOR_WHITE, "You have been kicked for failing to connect with a role play name (i.e. John_Smith)."); KickWithMessage(playerid); } } IsValidName(iPlayer) { new iLength, szPlayerName[MAX_PLAYER_NAME], tmpName[MAX_PLAYER_NAME]; GetPlayerName(iPlayer, szPlayerName, sizeof(szPlayerName)); if(strcmp(szPlayerName, tmpName, false) != 0) { return 0; } iLength = strlen(szPlayerName); if(strfindex(szPlayerName, "_", false) == -1 || szPlayerName[iLength - 1] == '_' || szPlayerName[0] == '_') { return 0; } else for(new i; i < iLength; ++i) { if(!('a' <= szPlayerName[i] <= 'z' || 'A' <= szPlayerName[i] <= 'Z' || szPlayerName[i] == '_')) { return 0; } } return 1; } |
Quote:
SetPlayerColor(playerid,TEAM_HIT_COLOR); SendClientMessage( playerid, COLOR_WHITE, "Welcome to MMANS Gaming Roleplay." ); SendClientMessage( playerid, COLOR_WHITE, "** This server contains explicit content, and may be intended only for adults. **" ); SyncPlayerTime(playerid); ShowNoticeGUIFrame(playerid, 1); g_mysql_AccountAuthCheck(playerid); |