Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 0: {
- if(gPlayerLogTries[playerid] == 0)
- return KickEx(playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN3,DIALOG_STYLE_PASSWORD,"Logare", "Welcome to the "SERVER_NAME" RPG Server.\n\nPlease enter you password below!","Login","Quit");
- gPlayerLogTries[playerid] --;
- format(gString, sizeof(gString), "Incorrect password. You have %d remaining login attemps left.", gPlayerLogTries[playerid]);
- SCM(playerid, COLOR_WARNING, gString);
- return true;
- }
- }
- if(Iter_Contains(LoginQueue[0], playerid)) {
- Iter_Remove(LoginQueue[0], playerid);
- if(Iter_Count(LoginQueue[1]) > 0 && Iter_Count(LoginQueue[0]) <= MAX_LOGIN) {
- new last = Iter_First(LoginQueue[1]);
- Iter_Remove(LoginQueue[1], last);
- Iter_Add(LoginQueue[0], last);
- GameTextForPlayer(last," ", 100, 3);
- gQuery[0] = EOS;
- mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `users` WHERE `name`='%s' LIMIT 1", GetName(last));
- mysql_tquery(SQL, gQuery, "CheckClassIP", "i", last);
- }
- }
- new clanid = PlayerInfo[playerid][pClan];
- if(PlayerInfo[playerid][pClan] != 0 && PlayerInfo[playerid][pTag] == 0) {
- format(gString, sizeof(gString), "%s%s", ClanInfo[clanid][clTag], PlayerInfo[playerid][pUsername]);
- SetPlayerName(playerid, gString);
- }
- else if(PlayerInfo[playerid][pClan] != 0 && PlayerInfo[playerid][pTag] == 1) {
- format(gString, sizeof(gString), "%s%s", PlayerInfo[playerid][pUsername], ClanInfo[clanid][clTag]);
- SetPlayerName(playerid, gString);
- }
- format(gString, sizeof(gString), "~g~~h~+%d%09d", StoreMoney[playerid], MoneyMoney[playerid]);
- switch(PlayerInfo[playerid][pShowBanca]) {
- case 0: {
- PlayerTextDrawSetString(playerid, MoneyTD0, gString);
- PlayerTextDrawShow(playerid, MoneyTD0);
- }
- case 1: {
- PlayerTextDrawSetString(playerid, MoneyTD1, gString);
- PlayerTextDrawShow(playerid, MoneyTD1);
- }
- }
- if(PlayerInfo[playerid][pShowCeas] != 0) PlayerTextDrawShow(playerid, CeasPTD), TextDrawShowForPlayer(playerid, CeasTD);
- TimerMoney[playerid] = gettime()+5;
- SetPlayerToTeamColor(playerid);
- ADeathMessage(playerid, INVALID_PLAYER_ID, 200);
- new ip[16];
- GetPlayerIp(playerid, ip, sizeof(ip));
- gQuery[0] = EOS;
- mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `users` SET `Status` = '1', `IP`='%s' WHERE `ID`='%d'", ip, PlayerInfo[playerid][pSQLID]);
- mysql_tquery(SQL, gQuery, "", "");
- UpdateVar(playerid, "DayLogin", 1);
- IsPlayerLogged[playerid] = 1;
- SpawnPlayer(playerid);
- StopAudioStreamForPlayer(playerid);
- GameTextForPlayer(playerid,"",100,3);
- for(new j = 0; j <= 100; j++) SCM(playerid, COLOR_WHITE, "");
- if(PlayerInfo[playerid][pBTemp] == 1) { TempBanCheck(playerid); return true; }
- if(PlayerInfo[playerid][pBanned] == 1) {
- SCM(playerid, COLOR_WARNING, "Acest cont este banat permanent!");
- format(gString, sizeof(gString), "Ai fost banat de adminul %s.",PlayerInfo[playerid][pBBy]);
- SCM(playerid, COLOR_CLIENT, gString);
- format(gString, sizeof(gString), "Motivul: %s",PlayerInfo[playerid][pBReason]);
- SCM(playerid, COLOR_CLIENT, gString);
- KickEx(playerid);
- SetPlayerCameraPos(playerid, 1183.0143, -965.7394, 129.6071);
- SetPlayerCameraLookAt(playerid, 1183.7214, -965.0270, 129.2470);
- TogglePlayerSpectating(playerid, 0);
- return true;
- }
- SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
- SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pChar], 2269.6230,-74.9329,26.7724, 1.0, -1, -1, -1, -1, -1, -1);
- if(gTeam[playerid] == 0) gTeam[playerid] = 3;
- else gTeam[playerid] = PlayerInfo[playerid][pTeam];
- if(PlayerInfo[playerid][pAdmin] > 0) Iter_Add(PlayerAdmins, playerid);
- if(PlayerInfo[playerid][pHelper] > 0) Iter_Add(PlayerHelpers, playerid);
- if(PlayerInfo[playerid][pVip] != 0 || PlayerInfo[playerid][pAdmin] != 0) Iter_Add(PlayerVips, playerid);
- if(PlayerInfo[playerid][pPremiumAccount] != 0 || PlayerInfo[playerid][pAdmin] != 0) Iter_Add(PlayerPremiums, playerid);
- if(PlayerInfo[playerid][pDailyMission][0] == -1 || PlayerInfo[playerid][pDailyMission][1] == -1) GiveQuest(playerid);
- if(PlayerInfo[playerid][pTutorial] >= 10) {
- if(PlayerInfo[playerid][pBizz] != 255) finishAchievement(playerid, 2);
- if(PlayerInfo[playerid][pHouse] != 999 && strcmp(GetName(playerid), HouseInfo[PlayerInfo[playerid][pHouse]][hOwner], true) == 0) finishAchievement(playerid, 3);
- new years, mounth, days;
- getdate(years,mounth,days);
- CalculateEmails(playerid);
- check_save(playerid);
- }
- TogglePlayerSpectating(playerid, false);
- TogglePlayerControllable(playerid, true);
- SetCameraBehindPlayer(playerid);
- HudProgress[playerid][0] = CreatePlayerProgressBar(playerid, 270.00, 430.00, 105.50, 18.20, 0x00000090, 100.0);
- UpdateProgress(playerid);
- new year, days, mounth, string2[128];
- format(string2, 256, "Welcome back, %s!", GetName(playerid));
- SCM(playerid, -1, string2);
- getdate(year, mounth, days);
- if(PlayerInfo[playerid][pMember] != 0) {
- if(PlayerInfo[playerid][pDays] == 30) {
- if(PlayerInfo[playerid][pMember] == 11) finishAchievement(playerid, 23);
- else if(IsACop(playerid)) finishAchievement(playerid, 24);
- else if(IsAMember(playerid)) finishAchievement(playerid, 25);
- else finishAchievement(playerid, 22);
- }
- }
- for(new x = 1; x < 15; x++) {
- switch(x) {
- case 1,2,3: SetPlayerMapIcon(playerid, 60+x, DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ], 30, -1, MAPICON_LOCAL);
- case 4: SetPlayerMapIcon(playerid, 60+x, DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ], 62, -1, MAPICON_LOCAL);
- case 5: SetPlayerMapIcon(playerid, 60+x, DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ], 58, -1, MAPICON_LOCAL);
- case 6: SetPlayerMapIcon(playerid, 60+x, DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ], 61, -1, MAPICON_LOCAL);
- case 10: SetPlayerMapIcon(playerid, 60+x, DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ], 59, -1, MAPICON_LOCAL);
- }
- }
- GivePlayerMoney(playerid, GetPlayerCash(playerid));
- if(PlayerInfo[playerid][pShowProgress][2] == 1) for(new i = 0; i < 2; i++) TextDrawShowForPlayer(playerid, GoalTD[i]);
- if(PlayerInfo[playerid][pDailyLogin] == 0) SCM(playerid, COLOR_NICEGREEN, "Daily Login: {FFFFFF}Vei primi de doua ori mai multi bani si puncte de respect la urmatorul payday.");
- if(PlayerInfo[playerid][pLevel] < 5) SCM(playerid, COLOR_NICEGREEN, "Daily Quests: {FFFFFF}Pentru a vedea ce misiuni ai in aceasta zi, foloseste /quests.");
- new string[180], premiums[40];
- if(strlen(PlayerInfo[playerid][pPin]) != 0 && PlayerInfo[playerid][pPinLogged] == 0) {
- IsPin[playerid] = 2;
- SCM(playerid, COLOR_LGREEN, "(PIN): {FFFFFF}Pentru a avea acces la cont trebuie sa introduci contul tau pin!");
- for(new i = 0; i < 7; i++) TextDrawShowForPlayer(playerid, PinTD[i]);
- for(new i = 0; i < 11; i++) PlayerTextDrawShow(playerid, PinPTD[i]);
- SelectTextDraw(playerid, 0xE52C2FFF);
- }
- else SCM(playerid, COLOR_LGREEN, "(PIN): {FFFFFF}Pentru o securitate in plus poti adauga (/addpin).");
- switch(ServerPremium) {
- case 0: { premiums = "30 Premium Points"; }
- case 1: { premiums = "200 RPoints"; }
- case 2: { premiums = "100 Gift Points"; }
- case 3: { premiums = "150 Roll Points"; }
- case 4: { premiums = "5 Respect Points"; }
- }
- format(string, sizeof(string), "{CEED5C}Server Bonus: {FFFFFF}Urmatorul bonus va fi la %d jucatori conectati si consta in %s.", ServerBonus, premiums);
- SCM(playerid, COLOR_WHITE, string);
- if(clanid != 0) {
- format(string, sizeof(string), "{%s}(CMOTD): %s.", ClanInfo[PlayerInfo[playerid][pClan]][clColor], ClanInfo[PlayerInfo[playerid][pClan]][clMotd]);
- MesajLung(playerid, -1, string);
- }
- if(PlayerInfo[playerid][pMember] != 0) {
- if(strlen(DynamicFactions[PlayerInfo[playerid][pMember]][fAnn]) > 0)
- {
- new factioninfo[128];
- format(factioninfo,sizeof(factioninfo), "(FMOTD): %s",DynamicFactions[PlayerInfo[playerid][pMember]][fAnn]);
- MesajLung(playerid,COLOR_YELLOW,factioninfo);
- }
- }
- if(PlayerInfo[playerid][pDailyBonus] != days) {
- new
- rp = PlayerInfo[playerid][pLevel] * 1,
- money = PlayerInfo[playerid][pLevel] * 70000 + random(1000);
- GivePlayerCash(playerid, 1, money);
- PlayerInfo[playerid][pExp] += rp;
- Update(playerid, pRP);
- SCM(playerid, COLOR_WHITE, "{CEED5C}Daily Bonus: {FFFFFF}Felicitari! Ai primit un bonus pentru ca te-ai connectat pe server.");
- format(string, sizeof(string), "{CEED5C}Daily Bonus: {FFFFFF}Bonusul consta in %d Respect points si $%s.", rp, FormatNumber(money));
- SCM(playerid, -1, string);
- PlayerInfo[playerid][pDailyBonus] = days;
- mysql_format(SQL, string, sizeof(string), "UPDATE users SET `DailyBonus`='%d' WHERE `id`='%d'", PlayerInfo[playerid][pDailyBonus], PlayerInfo[playerid][pSQLID]);
- mysql_tquery(SQL,string,"","");
- }
- if(PlayerInfo[playerid][pWantedLevel] > 0 && PlayerInfo[playerid][pTutorial] >= 10) {
- format(string2, sizeof(string2), "Aveai wanted %d inainte sa iesi de pe server.",PlayerInfo[playerid][pWantedLevel]);
- SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
- SCM(playerid, COLOR_LIGHTRED, string2);
- }
- if(PlayerInfo[playerid][pMember] != 0 && PlayerInfo[playerid][pTutorial] >= 10) {
- new disc[84];
- format(disc,sizeof(disc),"(Factiune) %s s-a conectat pe server.",GetName(playerid));
- SendFactionMessage(PlayerInfo[playerid][pMember], COLOR_CLIENT, disc);
- }
- if(PlayerInfo[playerid][pAdmin] > 0) {
- format(gString, sizeof(gString), "HelloBot: Admin %s has just logged in.", GetName(playerid));
- SendAdminMessage(COLOR_LOGS, gString, 1);
- }
- switch(PlayerInfo[playerid][pTutorial]) {
- case 1..2: {
- SCM(playerid, COLOR_LIGHTGOLD, "Mergi la checkpoint-ul marcat pe minimap si tasteaza </exam> pentru a obtine permisul de conducere auto.");
- if(InExamen[playerid] < 1) {
- CP[playerid] = 53;
- SetPlayerCheckpointEx(playerid, 2333.3345,-17.7633,26.4844, 2.0);
- }
- }
- case 3..4: {
- SCM(playerid, COLOR_LIGHTGOLD, "Mergi si achizitioneaza-ti un telefon din magazinul marcat pe minimap.");
- CP[playerid] = 53;
- SetPlayerCheckpointEx(playerid, 2242.7649,52.7174,26.6671, 2.0);
- }
- case 5..6: {
- SCM(playerid, COLOR_LIGHTGOLD, "Mergi si schimba-ti look-ul la afacerea de tip 'Clothing store' marcata pe minimap.");
- SCM(playerid, COLOR_LIGHTGOLD, "Pentru a schimba skin-ul tasteaza comanda </clothes> in business. Un meniu iti va aparea pe ecran. Alege un skin.");
- CP[playerid] = 53;
- SetPlayerCheckpointEx(playerid, 2277.7778,51.3101,26.4844, 2.0);
- }
- }
- PlayerInfo[playerid][pTutorial] = 10;
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement