27.02.2015, 12:55
hello there i have a problem in my login system i dont know why? for the first i started the server then join to server ,the login showed but when i relog/rejoin to the server i cant login cuzz the login box didnt show
here is the script (onplayerconnect and onplayerrequestclass)
sry for my bad english and plzz help me!
+rep
here is the script (onplayerconnect and onplayerrequestclass)
Код:
public OnPlayerConnect(playerid) { test[playerid] = 1; if (udb_Exists(PlayerName2(playerid))) { if(PlayerInfo[playerid][LoggedIn] == 0) { ShowPlayerDialog(playerid, 125, DIALOG_STYLE_PASSWORD, "Login","This account is registered! Login please","Login","Kick"); notreg[playerid] = 0; test[playerid] = 1; } } if (!udb_Exists(PlayerName2(playerid))) { if(PlayerInfo[playerid][Registered] == 0) { notreg[playerid] = 1; test[playerid] = 1; new string[200]; format(string, sizeof(string),"Welcome to COD - Reformation %s\n ", PlayerName2(playerid)); ShowPlayerDialog(playerid, 126, DIALOG_STYLE_PASSWORD, "Register",string,"Register","Kick"); } } if(PlayerInfo[playerid][LoggedIn] == 1) { notreg[playerid] = 0; new pname[128]; new file[128]; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), savefolder,pname); if(!dini_Exists(file)) { dini_Create(file); dini_IntSet(file, "Score", 0); dini_IntSet(file, "Money", 0); SetPlayerScore(playerid, dini_Int(file, "Score")); SetPlayerMoney(playerid, dini_Int(file, "Money")); } else { SetPlayerScore(playerid, dini_Int(file, "Score")); SetPlayerMoney(playerid, dini_Int(file, "Money")); } } //----- SetPlayerColor(playerid, grey); IsPlayerUsingAnims[playerid] = 0; Synching[playerid] = false; IsPlayerAnimsPreloaded[playerid] = 0; for(new i; i<PING_MAX_EXCEEDS; i++) PlayerInfo[playerid][pPing][i] = 0; PlayerInfo[playerid][PingCount] = 0; PlayerInfo[playerid][PingTime] = 0; new name[MAX_PLAYER_NAME], string1[40+MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string1, sizeof(string1), "~w~%s has ~g~joined ~w~the server.", name); SendBoxMessage(string1); VBanCheck(playerid); SetPlayerWorldBounds(playerid, 9999.9, -9999.9, 9999.9, -9999.9 ); //-----Music //----- SendClientMessage(playerid,COLOR_PINK,"Welcome To COD : Reformation"); SendClientMessage(playerid,green,"Use /Rules for server rules."); ShowPlayerBox(playerid); //----- //------ //------- GameTextForPlayer(playerid, "* Happy Chinese New Year *", 4000, 2); lolok(playerid,0xFF0000FF,"Happy Chinese New Year"); lolok(playerid,0xFF0000FF,"Free Score For All Logged in player"); SetPlayerScore(playerid, GetPlayerScore(playerid) + 50); lolok(playerid,0xFF0000FF,"Free Money For All Logged in player"); GivePlayerMoney(playerid, 10000); lolok(playerid,0xFF0000FF,"Free RPG With 1 Ammo"); GivePlayerWeapon(playerid, 35, 1); lolok(playerid,0xFF0000FF,"Bonus Score For Kill And Capture Area"); lolok(playerid,0xFF0000FF,"Change Time For Capture Area, Now Only 20 Second"); Anti_Gas[playerid] = 0; flashbang[playerid]=0; urticante[playerid]=0; fishing[playerid] = 0; wormsbought[playerid] = 0; fish[playerid] = 0; GGameLvl[playerid] = -1; PlayerDualWatching[playerid] = 0; InventationSent[playerid] = -1; Inventation[playerid] = -1; InDual[playerid] = 0; Inventationprice[playerid] = 0; announcedteam[playerid] = 0; LastPm[playerid] = -1; Spectating[playerid] = 0; FirstSpawn[playerid] = 0; rconAttempts[playerid] = 0; IsPlayerCapturing[playerid][SNAKE] = 0; IsPlayerCapturing[playerid][BAY] = 0; IsPlayerCapturing[playerid][BIG] = 0; IsPlayerCapturing[playerid][ARMY] = 0; IsPlayerCapturing[playerid][PETROL] = 0; IsPlayerCapturing[playerid][OIL] = 0; IsPlayerCapturing[playerid][DESERT] = 0; IsPlayerCapturing[playerid][QUARRY] = 0; IsPlayerCapturing[playerid][GUEST] = 0; IsPlayerCapturing[playerid][EAR] = 0; IsPlayerCapturing[playerid][CITY] = 0; IsPlayerCapturing[playerid][BRIDGE] = 0; IsPlayerCapturing[playerid][CLUCKIN] = 0; CountVar[playerid][SNAKE] = 25; CountVar[playerid][BAY] = 25; CountVar[playerid][BIG] = 25; CountVar[playerid][PETROL] = 25; CountVar[playerid][ARMY] = 25; CountVar[playerid][DESERT] = 25; CountVar[playerid][OIL] = 25; CountVar[playerid][QUARRY] = 25; CountVar[playerid][GUEST] = 25; CountVar[playerid][EAR] = 25; CountVar[playerid][CITY] = 25; CountVar[playerid][BRIDGE] = 25; CountVar[playerid][CLUCKIN] = 25; DND[playerid] = 0; //------------- //---- PlayerInfo[playerid][dRank] = 0; PlayerInfo[playerid][Deaths] = 0; PlayerInfo[playerid][Kills] = 0; PlayerInfo[playerid][Jailed] = 0; PlayerInfo[playerid][Frozen] = 0; PlayerInfo[playerid][Level] = 0; PlayerInfo[playerid][Helper] = 0; PlayerInfo[playerid][OnDuty] = 0; PlayerInfo[playerid][LoggedIn] = 0; PlayerInfo[playerid][Registered] = 0; PlayerInfo[playerid][God] = 0; PlayerInfo[playerid][GodCar] = 0; PlayerInfo[playerid][TimesSpawned] = 0; PlayerInfo[playerid][Muted] = 0; PlayerInfo[playerid][MuteWarnings] = 0; PlayerInfo[playerid][Warnings] = 0; PlayerInfo[playerid][Caps] = 0; PlayerInfo[playerid][DoorsLocked] = 0; PlayerInfo[playerid][pCar] = -1; PlayerInfo[playerid][SpamCount] = 0; PlayerInfo[playerid][SpamTime] = 0; PlayerInfo[playerid][PingCount] = 0; PlayerInfo[playerid][PingTime] = 0; PlayerInfo[playerid][FailLogin] = 0; PlayerInfo[playerid][blip] = 0; PlayerInfo[playerid][ConnectTime] = gettime(); AntiSK[playerid] = 0; //------------------------------------------------------ Attach3DTextLabelToPlayer(RankLabel[playerid], playerid, 0.0, 0.0, 0.5); //------------------------------------------------------ new PlayerName[MAX_PLAYER_NAME], string[128]; //file[256]; GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME); new tmp3[50]; GetPlayerIp(playerid,tmp3,50); //----------------------------------------------------- //----------------------------------------------------- //----------------------------------------------------- if(ServerInfo[NameKick] == 1) { for(new s = 0; s < BadNameCount; s++) { if(!strcmp(BadNames[s],PlayerName,true)) { SendClientMessage(playerid,red, "Your name is on our black list, you have been kicked."); format(string,sizeof(string),"%s ID:%d was auto kicked. (Reason: Forbidden name)",PlayerName,playerid); SendClientMessageToAll(grey, string); print(string); SaveToFile("KickLog",string); Kick(playerid); return 1; } } } //----------------------------------------------------- if(ServerInfo[PartNameKick] == 1) { for(new s = 0; s < BadPartNameCount; s++) { new pos; while((pos = strfind(PlayerName,BadPartNames[s],true)) != -1) for(new i = pos, j = pos + strlen(BadPartNames[s]); i < j; i++) { SendClientMessage(playerid,red, "Your name is not allowed on this server, you have been kicked."); format(string,sizeof(string),"%s ID:%d was auto kicked. (Reason: Forbidden name)",PlayerName,playerid); SendClientMessageToAll(grey, string); print(string); SaveToFile("KickLog",string); Kick(playerid); return 1; } } } //----------------------------------------------------- if(ServerInfo[Locked] == 1) { PlayerInfo[playerid][AllowedIn] = false; SendClientMessage(playerid,red,"Server is Locked! You have 20 seconds to enter the server password before you are kicked!"); SendClientMessage(playerid,red," Type /password [password]"); LockKickTimer[playerid] = SetTimerEx("AutoKick", 20000, 0, "i", playerid); } //----------------------------------------------------- if(strlen(dini_Get("ladmin/config/aka.txt", tmp3)) == 0) dini_Set("ladmin/config/aka.txt", tmp3, PlayerName); else { if( strfind( dini_Get("ladmin/config/aka.txt", tmp3), PlayerName, true) == -1 ) { format(string,sizeof(string),"%s,%s", dini_Get("ladmin/config/aka.txt",tmp3), PlayerName); dini_Set("ladmin/config/aka.txt", tmp3, string); } } //----------------------------------------------------- /*TextDrawShowForPlayer(playerid, tBox); for(new line; line<15; line++) { TextDrawShowForPlayer(playerid, Message[line]); } */ Streak[playerid] = 0; Skills[playerid] = 0; //------ if(tCP[SNAKE] == TEAM_NONE) GangZoneShowForAll(Zone[SNAKE], -66); else if(tCP[SNAKE] == TEAM_EURASIA) GangZoneShowForAll(Zone[SNAKE], TEAM_ZONE_EURASIA_COLOR); else if(tCP[SNAKE] == TEAM_ARAB) GangZoneShowForAll(Zone[SNAKE], TEAM_ZONE_ARAB_COLOR); else if(tCP[SNAKE] == TEAM_USA) GangZoneShowForAll(Zone[SNAKE], TEAM_ZONE_USA_COLOR); else if(tCP[SNAKE] == TEAM_AUS) GangZoneShowForAll(Zone[SNAKE], TEAM_ZONE_AUS_COLOR); else if(tCP[SNAKE] == TEAM_SOVIET) GangZoneShowForAll(Zone[SNAKE], TEAM_ZONE_SOVIET_COLOR); //------ if(tCP[BAY] == TEAM_NONE) GangZoneShowForAll(Zone[BAY], -66); else if(tCP[BAY] == TEAM_EURASIA) GangZoneShowForAll(Zone[BAY], TEAM_ZONE_EURASIA_COLOR); else if(tCP[BAY] == TEAM_ARAB) GangZoneShowForAll(Zone[BAY], TEAM_ZONE_ARAB_COLOR); else if(tCP[BAY] == TEAM_USA) GangZoneShowForAll(Zone[BAY], TEAM_ZONE_USA_COLOR); else if(tCP[BAY] == TEAM_AUS) GangZoneShowForAll(Zone[BAY], TEAM_ZONE_AUS_COLOR); else if(tCP[BAY] == TEAM_SOVIET) GangZoneShowForAll(Zone[BAY], TEAM_ZONE_SOVIET_COLOR); //------ if(tCP[BIG] == TEAM_NONE) GangZoneShowForAll(Zone[BIG], -66); else if(tCP[BIG] == TEAM_EURASIA) GangZoneShowForAll(Zone[BIG], TEAM_ZONE_EURASIA_COLOR); else if(tCP[BIG] == TEAM_ARAB) GangZoneShowForAll(Zone[BIG], TEAM_ZONE_ARAB_COLOR); else if(tCP[BIG] == TEAM_USA) GangZoneShowForAll(Zone[BIG], TEAM_ZONE_USA_COLOR); else if(tCP[BIG] == TEAM_AUS) GangZoneShowForAll(Zone[BIG], TEAM_ZONE_AUS_COLOR); else if(tCP[BIG] == TEAM_SOVIET) GangZoneShowForAll(Zone[BIG], TEAM_ZONE_SOVIET_COLOR); //------ if(tCP[ARMY] == TEAM_NONE) GangZoneShowForAll(Zone[ARMY], -66); else if(tCP[ARMY] == TEAM_EURASIA) GangZoneShowForAll(Zone[ARMY], TEAM_ZONE_EURASIA_COLOR); else if(tCP[ARMY] == TEAM_ARAB) GangZoneShowForAll(Zone[ARMY], TEAM_ZONE_ARAB_COLOR); else if(tCP[ARMY] == TEAM_USA) GangZoneShowForAll(Zone[ARMY], TEAM_ZONE_USA_COLOR); else if(tCP[ARMY] == TEAM_AUS) GangZoneShowForAll(Zone[ARMY], TEAM_ZONE_AUS_COLOR); else if(tCP[ARMY] == TEAM_SOVIET) GangZoneShowForAll(Zone[ARMY], TEAM_ZONE_SOVIET_COLOR); //------ if(tCP[PETROL] == TEAM_NONE) GangZoneShowForAll(Zone[PETROL], -66); else if(tCP[PETROL] == TEAM_EURASIA) GangZoneShowForAll(Zone[PETROL], TEAM_ZONE_EURASIA_COLOR); else if(tCP[PETROL] == TEAM_ARAB) GangZoneShowForAll(Zone[PETROL], TEAM_ZONE_ARAB_COLOR); else if(tCP[PETROL] == TEAM_USA) GangZoneShowForAll(Zone[PETROL], TEAM_ZONE_USA_COLOR); else if(tCP[PETROL] == TEAM_AUS) GangZoneShowForAll(Zone[PETROL], TEAM_ZONE_AUS_COLOR); else if(tCP[PETROL] == TEAM_SOVIET) GangZoneShowForAll(Zone[PETROL], TEAM_ZONE_SOVIET_COLOR); //------ if(tCP[OIL] == TEAM_NONE) GangZoneShowForAll(Zone[OIL], -66); else if(tCP[OIL] == TEAM_EURASIA) GangZoneShowForAll(Zone[OIL], TEAM_ZONE_EURASIA_COLOR); else if(tCP[OIL] == TEAM_ARAB) GangZoneShowForAll(Zone[OIL], TEAM_ZONE_ARAB_COLOR); else if(tCP[OIL] == TEAM_USA) GangZoneShowForAll(Zone[OIL], TEAM_ZONE_USA_COLOR); else if(tCP[OIL] == TEAM_AUS) GangZoneShowForAll(Zone[OIL], TEAM_ZONE_AUS_COLOR); else if(tCP[OIL] == TEAM_SOVIET) GangZoneShowForAll(Zone[OIL], TEAM_ZONE_SOVIET_COLOR); //------ if(tCP[DESERT] == TEAM_NONE) GangZoneShowForAll(Zone[DESERT], -66); else if(tCP[DESERT] == TEAM_EURASIA) GangZoneShowForAll(Zone[DESERT], TEAM_ZONE_EURASIA_COLOR); else if(tCP[DESERT] == TEAM_ARAB) GangZoneShowForAll(Zone[DESERT], TEAM_ZONE_ARAB_COLOR); else if(tCP[DESERT] == TEAM_USA) GangZoneShowForAll(Zone[DESERT], TEAM_ZONE_USA_COLOR); else if(tCP[DESERT] == TEAM_AUS) GangZoneShowForAll(Zone[DESERT], TEAM_ZONE_AUS_COLOR); else if(tCP[DESERT] == TEAM_SOVIET) GangZoneShowForAll(Zone[DESERT], TEAM_ZONE_SOVIET_COLOR); //------ if(tCP[QUARRY] == TEAM_NONE) GangZoneShowForAll(Zone[QUARRY], -66); else if(tCP[QUARRY] == TEAM_EURASIA) GangZoneShowForAll(Zone[QUARRY], TEAM_ZONE_EURASIA_COLOR); else if(tCP[QUARRY] == TEAM_ARAB) GangZoneShowForAll(Zone[QUARRY], TEAM_ZONE_ARAB_COLOR); else if(tCP[QUARRY] == TEAM_USA) GangZoneShowForAll(Zone[QUARRY], TEAM_ZONE_USA_COLOR); else if(tCP[QUARRY] == TEAM_AUS) GangZoneShowForAll(Zone[QUARRY], TEAM_ZONE_AUS_COLOR); else if(tCP[QUARRY] == TEAM_SOVIET) GangZoneShowForAll(Zone[QUARRY], TEAM_ZONE_SOVIET_COLOR); //------ if(tCP[GUEST] == TEAM_NONE) GangZoneShowForAll(Zone[GUEST], -66); else if(tCP[GUEST] == TEAM_EURASIA) GangZoneShowForAll(Zone[GUEST], TEAM_ZONE_EURASIA_COLOR); else if(tCP[GUEST] == TEAM_ARAB) GangZoneShowForAll(Zone[GUEST], TEAM_ZONE_ARAB_COLOR); else if(tCP[GUEST] == TEAM_USA) GangZoneShowForAll(Zone[GUEST], TEAM_ZONE_USA_COLOR); else if(tCP[GUEST] == TEAM_AUS) GangZoneShowForAll(Zone[GUEST], TEAM_ZONE_AUS_COLOR); else if(tCP[GUEST] == TEAM_SOVIET) GangZoneShowForAll(Zone[GUEST], TEAM_ZONE_SOVIET_COLOR); //------ if(tCP[EAR] == TEAM_NONE) GangZoneShowForAll(Zone[EAR], -66); else if(tCP[EAR] == TEAM_EURASIA) GangZoneShowForAll(Zone[EAR], TEAM_ZONE_EURASIA_COLOR); else if(tCP[EAR] == TEAM_ARAB) GangZoneShowForAll(Zone[EAR], TEAM_ZONE_ARAB_COLOR); else if(tCP[EAR] == TEAM_USA) GangZoneShowForAll(Zone[EAR], TEAM_ZONE_USA_COLOR); else if(tCP[EAR] == TEAM_AUS) GangZoneShowForAll(Zone[EAR], TEAM_ZONE_AUS_COLOR); else if(tCP[EAR] == TEAM_SOVIET) GangZoneShowForAll(Zone[EAR], TEAM_ZONE_SOVIET_COLOR); //----- if(tCP[CITY] == TEAM_NONE) GangZoneShowForAll(Zone[CITY], -66); else if(tCP[CITY] == TEAM_EURASIA) GangZoneShowForAll(Zone[CITY], TEAM_ZONE_EURASIA_COLOR); else if(tCP[CITY] == TEAM_ARAB) GangZoneShowForAll(Zone[CITY], TEAM_ZONE_ARAB_COLOR); else if(tCP[CITY] == TEAM_USA) GangZoneShowForAll(Zone[CITY], TEAM_ZONE_USA_COLOR); else if(tCP[CITY] == TEAM_AUS) GangZoneShowForAll(Zone[CITY], TEAM_ZONE_AUS_COLOR); else if(tCP[CITY] == TEAM_SOVIET) GangZoneShowForAll(Zone[CITY], TEAM_ZONE_SOVIET_COLOR); //----- if(tCP[BRIDGE] == TEAM_NONE) GangZoneShowForAll(Zone[BRIDGE], -66); else if(tCP[BRIDGE] == TEAM_EURASIA) GangZoneShowForAll(Zone[BRIDGE], TEAM_ZONE_EURASIA_COLOR); else if(tCP[BRIDGE] == TEAM_ARAB) GangZoneShowForAll(Zone[BRIDGE], TEAM_ZONE_ARAB_COLOR); else if(tCP[BRIDGE] == TEAM_USA) GangZoneShowForAll(Zone[BRIDGE], TEAM_ZONE_USA_COLOR); else if(tCP[BRIDGE] == TEAM_AUS) GangZoneShowForAll(Zone[BRIDGE], TEAM_ZONE_AUS_COLOR); else if(tCP[BRIDGE] == TEAM_SOVIET) GangZoneShowForAll(Zone[BRIDGE], TEAM_ZONE_SOVIET_COLOR); //----- if(tCP[CLUCKIN] == TEAM_NONE) GangZoneShowForAll(Zone[CLUCKIN], -66); else if(tCP[CLUCKIN] == TEAM_EURASIA) GangZoneShowForAll(Zone[CLUCKIN], TEAM_ZONE_EURASIA_COLOR); else if(tCP[CLUCKIN] == TEAM_ARAB) GangZoneShowForAll(Zone[CLUCKIN], TEAM_ZONE_ARAB_COLOR); else if(tCP[CLUCKIN] == TEAM_USA) GangZoneShowForAll(Zone[CLUCKIN], TEAM_ZONE_USA_COLOR); else if(tCP[CLUCKIN] == TEAM_AUS) GangZoneShowForAll(Zone[CLUCKIN], TEAM_ZONE_AUS_COLOR); else if(tCP[CLUCKIN] == TEAM_SOVIET) GangZoneShowForAll(Zone[CLUCKIN], TEAM_ZONE_SOVIET_COLOR); //----- return 1; } forward UpdateTextdraw(playerid); public UpdateTextdraw(playerid) { if(gTeam[playerid] == TEAM_EURASIA) { new string[150]; format(string, sizeof(string),"~g~%s - ~y~%s",GetTeamName(playerid),GetClass(playerid)); TextDrawSetString(TeamText[playerid], string); } if(gTeam[playerid] == TEAM_SOVIET) { new string[150]; format(string, sizeof(string),"~r~%s - ~y~%s",GetTeamName(playerid),GetClass(playerid)); TextDrawSetString(TeamText[playerid], string); } if(gTeam[playerid] == TEAM_ARAB) { new string[150]; format(string, sizeof(string),"~y~~h~%s - ~y~%s", GetTeamName(playerid),GetClass(playerid)); TextDrawSetString(TeamText[playerid], string); } if(gTeam[playerid] == TEAM_AUS) { new string[150]; format(string, sizeof(string),"~p~%s - ~y~%s",GetTeamName(playerid),GetClass(playerid)); TextDrawSetString(TeamText[playerid], string); } if(gTeam[playerid] == TEAM_USA) { new string[150]; format(string, sizeof(string),"~b~%s - ~y~%s", GetTeamName(playerid),GetClass(playerid)); TextDrawSetString(TeamText[playerid], string); } if(gTeam[playerid] == TEAM_NONE) { TextDrawSetString(TeamText[playerid], "~p~~h~Admin"); } if(gTeam[playerid] == TEAM_MERC) { TextDrawSetString(TeamText[playerid], "~w~Mercenary"); } else if(gTeam[playerid] == TEAM_TALIB) { new string[150]; format(string, sizeof(string),"~y~~h~%s - ~y~%s", GetTeamName(playerid),GetClass(playerid)); TextDrawSetString(TeamText[playerid], string); } } public UpdateLabelText(playerid) { new string[120]; format(string, sizeof(string),"%s\n%s",GetRankName(playerid), GetClass(playerid)); if(gTeam[playerid] == TEAM_EURASIA) { Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(RankLabel[playerid], TEAM_EURASIA_COLOR, string); } if(gTeam[playerid] == TEAM_SOVIET) { Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(RankLabel[playerid], TEAM_SOVIET_COLOR, string); } if(gTeam[playerid] == TEAM_MERC) { Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(RankLabel[playerid], COLOR_WHITE, string); } if(gTeam[playerid] == TEAM_AUS) { Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(RankLabel[playerid], TEAM_AUS_COLOR, string); } if(gTeam[playerid] == TEAM_ARAB) { Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(RankLabel[playerid], TEAM_ARAB_COLOR, string); } if(gTeam[playerid] == TEAM_USA) { Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(RankLabel[playerid], TEAM_USA_COLOR, string); } if(gTeam[playerid] == TEAM_NONE) { Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(RankLabel[playerid],0x15FF00FF ,"On-Duty Admin\n!!Do Not Attack!!"); } if(gTeam[playerid] == TEAM_TALIB) { Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(RankLabel[playerid], TEAM_TALIB_COLOR, string); } return 1; } public OnPlayerRequestClass(playerid, classid) { TogglePlayerSpectating(playerid, 1);//start the spectating to hide the Spawn button if (notreg[playerid] == 1 && test[playerid] == 1) { InterpolateCameraPos(playerid, -1034.764526, 1566.679565, 78.175552, 363.575378, 1691.733032, 76.135620, 10000); InterpolateCameraLookAt(playerid, -1029.811645, 1567.347167, 78.021675, 359.672302, 1694.636840, 74.980529, 10000); Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(Duty[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(DM[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(GG[playerid], 0xFFFFFFFF, " "); {PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);} new String[200]; new team1count = GetTeamCount(TEAM_EURASIA); new team2count = GetTeamCount(TEAM_USA); new team3count = GetTeamCount(TEAM_ARAB); new team4count = GetTeamCount(TEAM_SOVIET); new team5count = GetTeamCount(TEAM_AUS); new team7count = GetTeamCount(TEAM_MERC); new team8count = GetTeamCount(TEAM_TALIB); format(String, sizeof(String),""cblue"Usa [P:%d]\n"cgreen"Asia [P:%d]\n"cyellow"Arabia [P:%d]\n"cred"Soviet [P:%d]\n"cpurple"Australia [P:%d]\nMercenary [P:%d]\n"cbrown"Taliban [P:%d]",team2count, team1count, team3count, team4count, team5count, team7count, team8count); ShowPlayerDialog(playerid, 1432, DIALOG_STYLE_LIST, "Select Team",String,"Select","Back"); CreateExplosion(-942.6174,1558.6283,94.0185, 1, 100); CreateExplosion(-932.6174,1540.6283,94.0185, 1, 100); return 1; } else if (PlayerInfo[playerid][LoggedIn] == 1 && test[playerid] == 1) { InterpolateCameraPos(playerid, -1034.764526, 1566.679565, 78.175552, 363.575378, 1691.733032, 76.135620, 10000); InterpolateCameraLookAt(playerid, -1029.811645, 1567.347167, 78.021675, 359.672302, 1694.636840, 74.980529, 10000); Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(Duty[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(DM[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(GG[playerid], 0xFFFFFFFF, " "); {PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);} new String[200]; new team1count = GetTeamCount(TEAM_EURASIA); new team2count = GetTeamCount(TEAM_USA); new team3count = GetTeamCount(TEAM_ARAB); new team4count = GetTeamCount(TEAM_SOVIET); new team5count = GetTeamCount(TEAM_AUS); new team7count = GetTeamCount(TEAM_MERC); new team8count = GetTeamCount(TEAM_TALIB); format(String, sizeof(String),""cblue"Usa [P:%d]\n"cgreen"Asia [P:%d]\n"cyellow"Arabia [P:%d]\n"cred"Soviet [P:%d]\n"cpurple"Australia [P:%d]\nMercenary [P:%d]\n"cbrown"Taliban [P:%d]",team2count, team1count, team3count, team4count, team5count, team7count, team8count); ShowPlayerDialog(playerid, 1432, DIALOG_STYLE_LIST, "Select Team",String,"Select","Back"); CreateExplosion(-922.6174,1598.6283,94.0185, 1, 100); CreateExplosion(-922.6174,1570.6283,94.0185, 1, 100); return 1; } else { if (PlayerInfo[playerid][LoggedIn] == 0 ) { notreg[playerid] = 1; if (notreg[playerid] == 0) { PlayerInfo[playerid][LoggedIn] = 0; PlayerInfo[playerid][FailLogin]++; new stringa[200]; format(stringa, sizeof(stringa),""cwhite"Welcome "cred"%s "cwhite"you are already registered\nKindly enter password to login to your account\n"cred"Incorrect password!", PlayerName2(playerid)); ShowPlayerDialog(playerid, 125, DIALOG_STYLE_INPUT, "Login",stringa,"Login","Kick"); } } } return 1; }
+rep