Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerLogin(playerid,password[])
- {
- new playername2[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername2, sizeof(playername2));
- GameTextForPlayer(playerid, "~w~LOADING...~n~~y~CHECKING THE PASSWORD", 700, 3);
- new playerip[16];
- GetPlayerIp(playerid,playerip,sizeof(playerip));
- if(NumIp(playerip, playerid) >= 3 && !IsBotOnIP(playerip))
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "There are already 2 players connected with same IP.");
- Kick(playerid);
- return 1;
- }
- new qstr[256];
- format(qstr,100,"SELECT * FROM users WHERE `name`='%s' AND `password`='%s'",playername2,password);
- new Cache: pass = mysql_query(SQL,qstr);
- if(cache_get_row_count() > 0)
- {
- cache_get_field_content(0, "password", PlayerInfo[playerid][pKey], SQL, 130);
- cache_get_field_content(0, "name", PlayerInfo[playerid][pNormalName], SQL, 130);
- PlayerInfo[playerid][pLevel] = cache_get_field_content_int(0, "Level");
- PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(0, "Admin");
- PlayerInfo[playerid][pHelper] = cache_get_field_content_int(0, "Helper");
- PlayerInfo[playerid][pPremiumAccount] = cache_get_field_content_int(0, "Premium");
- PlayerInfo[playerid][pPremiumPoints] = cache_get_field_content_int(0, "PremiumPoints");
- PlayerInfo[playerid][pConnectTime] = cache_get_field_content_int(0, "ConnectedTime");
- PlayerInfo[playerid][pReg] = cache_get_field_content_int(0, "Registered");
- PlayerInfo[playerid][pSex] = cache_get_field_content_int(0, "Sex");
- PlayerInfo[playerid][pAge] = cache_get_field_content_int(0, "Age");
- PlayerInfo[playerid][pGasCan] = cache_get_field_content_int(0, "GasCan");
- PlayerInfo[playerid][pOrigin] = cache_get_field_content_int(0, "Origin");
- PlayerInfo[playerid][pMuted] = cache_get_field_content_int(0, "Muted");
- PlayerInfo[playerid][pMuteTime] = cache_get_field_content_int(0, "MuteTime");
- PlayerInfo[playerid][pExp] = cache_get_field_content_int(0, "Respect");
- PlayerInfo[playerid][pCash] = cache_get_field_content_int(0, "Money");
- PlayerInfo[playerid][pAccount] = cache_get_field_content_int(0, "Bank");
- PlayerInfo[playerid][pCrimes] = cache_get_field_content_int(0, "Crimes");
- PlayerInfo[playerid][pKills] = cache_get_field_content_int(0, "Kills");
- PlayerInfo[playerid][pDeaths] = cache_get_field_content_int(0, "Deaths");
- PlayerInfo[playerid][pArrested] = cache_get_field_content_int(0, "Arrested");
- PlayerInfo[playerid][pWantedDeaths] = cache_get_field_content_int(0, "WantedDeaths");
- PlayerInfo[playerid][pPhoneBook] = cache_get_field_content_int(0, "Phonebook");
- PlayerInfo[playerid][pWantedLevel] = cache_get_field_content_int(0, "WantedLevel");
- PlayerInfo[playerid][pFishes] = cache_get_field_content_int(0, "Fishes");
- PlayerInfo[playerid][pJob] = cache_get_field_content_int(0, "Job");
- PlayerInfo[playerid][pPayCheck] = cache_get_field_content_int(0, "Paycheck");
- PlayerInfo[playerid][pHeadValue] = cache_get_field_content_int(0, "HeadValue");
- PlayerInfo[playerid][pJailed] = cache_get_field_content_int(0, "Jailed");
- PlayerInfo[playerid][pJailTime] = cache_get_field_content_int(0, "JailTime");
- PlayerInfo[playerid][pMats] = cache_get_field_content_int(0, "Materials");
- PlayerInfo[playerid][pDrugs] = cache_get_field_content_int(0, "Drugs");
- PlayerInfo[playerid][pLeader] = cache_get_field_content_int(0, "Leader");
- PlayerInfo[playerid][pMember] = cache_get_field_content_int(0, "Member");
- PlayerInfo[playerid][pRank] = cache_get_field_content_int(0, "Rank");
- PlayerInfo[playerid][pFACWarns] = cache_get_field_content_int(0, "FWarn");
- PlayerInfo[playerid][pFpunish] = cache_get_field_content_int(0, "FPunish");
- PlayerInfo[playerid][pLawyer] = cache_get_field_content_int(0, "Acceptpoints");
- PlayerInfo[playerid][pFishSkill] = cache_get_field_content_int(0, "FishSkill");
- PlayerInfo[playerid][pSpawnChange] = cache_get_field_content_int(0, "SpawnChange");
- PlayerInfo[playerid][pRobSkill] = cache_get_field_content_int(0, "RobSkill");
- PlayerInfo[playerid][pTruckSkill] = cache_get_field_content_int(0, "TruckSkill");
- PlayerInfo[playerid][pTruckTimes] = cache_get_field_content_int(0, "TruckTimes");
- PlayerInfo[playerid][pTruckRem] = cache_get_field_content_int(0, "TruckRem");
- PlayerInfo[playerid][pFarmSkill] = cache_get_field_content_int(0, "FarmSkill");
- PlayerInfo[playerid][pFarmTimes] = cache_get_field_content_int(0, "FarmTimes");
- PlayerInfo[playerid][pFarmRem] = cache_get_field_content_int(0, "FarmRem");
- PlayerInfo[playerid][pPizzaSkill] = cache_get_field_content_int(0, "PizzaSkill");
- PlayerInfo[playerid][pPizzaTimes] = cache_get_field_content_int(0, "PizzaTimes");
- PlayerInfo[playerid][pPizzaRem] = cache_get_field_content_int(0, "PizzaRem");
- PlayerInfo[playerid][pArmsSkill] = cache_get_field_content_int(0, "ArmsSkill");
- PlayerInfo[playerid][pArmsTimes] = cache_get_field_content_int(0, "ArmsTimes");
- PlayerInfo[playerid][pArmsRem] = cache_get_field_content_int(0, "ArmsRem");
- PlayerInfo[playerid][pBusSkill] = cache_get_field_content_int(0, "BusSkill");
- PlayerInfo[playerid][pBusTimes] = cache_get_field_content_int(0, "BusTimes");
- PlayerInfo[playerid][pBusRem] = cache_get_field_content_int(0, "BusRem");
- PlayerInfo[playerid][pFishTimes] = cache_get_field_content_int(0, "FishTimes");
- PlayerInfo[playerid][pFishRem] = cache_get_field_content_int(0, "FishRem");
- PlayerInfo[playerid][pRobRem] = cache_get_field_content_int(0, "RobRem");
- PlayerInfo[playerid][pRobTimes] = cache_get_field_content_int(0, "RobTimes");
- PlayerInfo[playerid][pHealth] = cache_get_field_content_float(0, "pHealth");
- PlayerInfo[playerid][pInt] = cache_get_field_content_int(0, "Inter");
- PlayerInfo[playerid][pLocal] = cache_get_field_content_int(0, "Local");
- PlayerInfo[playerid][pTeam] = cache_get_field_content_int(0, "Team");
- PlayerInfo[playerid][pModel] = cache_get_field_content_int(0, "Model");
- PlayerInfo[playerid][pPnumber] = cache_get_field_content_int(0, "PhoneNr");
- PlayerInfo[playerid][pPhousekey] = cache_get_field_content_int(0, "House");
- PlayerInfo[playerid][pPbiskey] = cache_get_field_content_int(0, "Bizz");
- PlayerInfo[playerid][pPos_x] = cache_get_field_content_float(0, "Pos_x");
- PlayerInfo[playerid][pPos_y] = cache_get_field_content_float(0, "Pos_y");
- PlayerInfo[playerid][pPos_z] = cache_get_field_content_float(0, "Pos_z");
- PlayerInfo[playerid][pRob] = cache_get_field_content_int(0, "Rob");
- PlayerInfo[playerid][pCarLicT] = cache_get_field_content_int(0, "CarLicT");
- PlayerInfo[playerid][pCarLic] = cache_get_field_content_int(0, "CarLic");
- PlayerInfo[playerid][pCarLicSuspend] = cache_get_field_content_int(0, "CarLicSuspend");
- PlayerInfo[playerid][pGunLicSuspend] = cache_get_field_content_int(0, "GunLicSuspend");
- PlayerInfo[playerid][pFlyLicT] = cache_get_field_content_int(0, "FlyLicT");
- PlayerInfo[playerid][pFlyLic] = cache_get_field_content_int(0, "FlyLic");
- PlayerInfo[playerid][pBoatLicT] = cache_get_field_content_int(0, "BoatLicT");
- PlayerInfo[playerid][pBoatLic] = cache_get_field_content_int(0, "BoatLic");
- PlayerInfo[playerid][pGunLicT] = cache_get_field_content_int(0, "GunLicT");
- PlayerInfo[playerid][pGunLic] = cache_get_field_content_int(0, "GunLic");
- PlayerInfo[playerid][pPayDay] = cache_get_field_content_int(0, "PayDay");
- PlayerInfo[playerid][pTut] = cache_get_field_content_int(0, "Tutorial");
- PlayerInfo[playerid][pWarns] = cache_get_field_content_int(0, "Warnings");
- PlayerInfo[playerid][pRented] = cache_get_field_content_int(0, "Rented");
- PlayerInfo[playerid][pFuel] = cache_get_field_content_int(0, "Fuel");
- PlayerInfo[playerid][pWTalkie] = cache_get_field_content_int(0, "WTalkie");
- cache_get_field_content(0, "Email", PlayerInfo[playerid][pEmail], SQL, 255);
- cache_get_field_content(0, "RegisterDate", PlayerInfo[playerid][pRegistredDate], SQL, 255);
- PlayerInfo[playerid][pClan] = cache_get_field_content_int(0, "Clan");
- PlayerInfo[playerid][pHitT] = cache_get_field_content_int(0, "HitT");
- PlayerInfo[playerid][pCRank] = cache_get_field_content_int(0, "CRank");
- PlayerInfo[playerid][pCWarns] = cache_get_field_content_int(0, "ClanWarns");
- PlayerInfo[playerid][pPhone] = cache_get_field_content_int(0, "Phone");
- PlayerInfo[playerid][pSQLID] = cache_get_field_content_int(0, "id");
- PlayerInfo[playerid][pPcarkey] = cache_get_field_content_int(0, "Carkey");
- PlayerInfo[playerid][pmotokey] = cache_get_field_content_int(0, "motokey");
- PlayerInfo[playerid][pprcarkey2] = cache_get_field_content_int(0, "prcarkey2");
- PlayerInfo[playerid][pPPluscarkey] = cache_get_field_content_int(0, "pluscarkey");
- PlayerInfo[playerid][pPPluscarkey2] = cache_get_field_content_int(0, "pluscarkey2");
- PlayerInfo[playerid][pPlusSlot1] = cache_get_field_content_int(0, "PlusSlot1");
- PlayerInfo[playerid][pPlusSlot2] = cache_get_field_content_int(0, "PlusSlot2");
- PlayerInfo[playerid][phelikey] = cache_get_field_content_int(0, "helikey");
- PlayerInfo[playerid][pprcarkey] = cache_get_field_content_int(0, "prcarkey");
- cache_get_field_content(0, "Victim", PlayerInfo[playerid][pVictim], SQL, 255);
- cache_get_field_content(0, "Accused", PlayerInfo[playerid][pAccused], SQL, 255);
- cache_get_field_content(0, "Crime1", PlayerInfo[playerid][pCrime1], SQL, 255);
- cache_get_field_content(0, "Crime2", PlayerInfo[playerid][pCrime2], SQL, 255);
- cache_get_field_content(0, "Crime3", PlayerInfo[playerid][pCrime3], SQL, 255);
- PlayerInfo[playerid][pStatus] = cache_get_field_content_int(0, "Status");
- PlayerInfo[playerid][pALeader] = cache_get_field_content_int(0, "ALeader");
- PlayerInfo[playerid][pLanguage] = cache_get_field_content_int(0, "Language");
- PlayerInfo[playerid][pClanTag] = cache_get_field_content_int(0, "ClanTag");
- PlayerInfo[playerid][pFWorks] = cache_get_field_content_int(0, "FWorks");
- PlayerInfo[playerid][pVirtualPD] = cache_get_field_content_int(0, "VirtualPD");
- PlayerInfo[playerid][pGlasses] = cache_get_field_content_int(0, "Glasses");
- PlayerInfo[playerid][pFactionTime] = cache_get_field_content_int(0, "FactionTime");
- PlayerInfo[playerid][pCredits] = cache_get_field_content_int(0, "CreditsF");
- PlayerInfo[playerid][pNMuted] = cache_get_field_content_int(0, "NMuted");
- PlayerInfo[playerid][pHelpedPlayers] = cache_get_field_content_int(0, "HelpedPlayers");
- PlayerInfo[playerid][pHost] = cache_get_field_content_int(0, "Host");
- PlayerInfo[playerid][pPhoneBlock] = cache_get_field_content_int(0, "PhoneBlock");
- PlayerInfo[playerid][pHiddenColor] = cache_get_field_content_int(0, "HiddenColor");
- PlayerInfo[playerid][pGiftTime] = cache_get_field_content_int(0, "GiftTime");
- PlayerInfo[playerid][pQuestMap] = cache_get_field_content_int(0, "QuestMap");
- PlayerInfo[playerid][pMP3] = cache_get_field_content_int(0, "MP3");
- PlayerInfo[playerid][pHats] = cache_get_field_content_int(0, "Hats");
- PlayerInfo[playerid][pFightStyle] = cache_get_field_content_int(0, "FightStyle");
- PlayerInfo[playerid][pHUD1] = cache_get_field_content_int(0, "HUD1");
- PlayerInfo[playerid][pHUD2] = cache_get_field_content_int(0, "HUD2");
- PlayerInfo[playerid][pHUD3] = cache_get_field_content_int(0, "HUD3");
- PlayerInfo[playerid][pValoare] = cache_get_field_content_float(0, "Valoare");
- PlayerInfo[playerid][pPin] = cache_get_field_content_int(0, "Pin");
- PlayerInfo[playerid][pBonus] = cache_get_field_content_int(0, "Bonus");
- PlayerInfo[playerid][p1RaportR1] = cache_get_field_content_int(0, "1RaportR1");
- PlayerInfo[playerid][p1RaportR2] = cache_get_field_content_int(0, "1RaportR2");
- PlayerInfo[playerid][p1RaportR3] = cache_get_field_content_int(0, "1RaportR3");
- PlayerInfo[playerid][p1RaportR4] = cache_get_field_content_int(0, "1RaportR4");
- PlayerInfo[playerid][p1RaportR5] = cache_get_field_content_int(0, "1RaportR5");
- PlayerInfo[playerid][p2RaportR1] = cache_get_field_content_int(0, "2RaportR1");
- PlayerInfo[playerid][p2RaportR2] = cache_get_field_content_int(0, "2RaportR2");
- PlayerInfo[playerid][p2RaportR3] = cache_get_field_content_int(0, "2RaportR3");
- PlayerInfo[playerid][p2RaportR4] = cache_get_field_content_int(0, "2RaportR4");
- PlayerInfo[playerid][p2RaportR5] = cache_get_field_content_int(0, "2RaportR5");
- PlayerInfo[playerid][pRunners] = cache_get_field_content_int(0, "Runners");
- PlayerInfo[playerid][pArrestss] = cache_get_field_content_int(0, "Arrests");
- PlayerInfo[playerid][pTickets] = cache_get_field_content_int(0, "Tickets");
- PlayerInfo[playerid][pDConfiscate] = cache_get_field_content_int(0, "DConfiscate");
- PlayerInfo[playerid][pLConfiscate] = cache_get_field_content_int(0, "DLonfiscate");
- PlayerInfo[playerid][pContracts] = cache_get_field_content_int(0, "Contracts");
- PlayerInfo[playerid][pNews] = cache_get_field_content_int(0, "News");
- PlayerInfo[playerid][pLives] = cache_get_field_content_int(0, "Live");
- PlayerInfo[playerid][pOrders] = cache_get_field_content_int(0, "Orders");
- PlayerInfo[playerid][pDDeposit] = cache_get_field_content_int(0, "DDeposit");
- PlayerInfo[playerid][pMDeposit] = cache_get_field_content_int(0, "MDeposit");
- PlayerInfo[playerid][pMUsed] = cache_get_field_content_int(0, "MUsed");
- PlayerInfo[playerid][pWKills] = cache_get_field_content_int(0, "WKills");
- PlayerInfo[playerid][pWDeaths] = cache_get_field_content_int(0, "WDeaths");
- PlayerInfo[playerid][pLGiven] = cache_get_field_content_int(0, "LGiven");
- PlayerInfo[playerid][pPHeals] = cache_get_field_content_int(0, "PHeals");
- PlayerInfo[playerid][pMoneyD] = cache_get_field_content_int(0, "MoneyD");
- cache_get_field_content(0, "lastOn", PlayerInfo[playerid][pLastLogin], SQL, 255);
- for(new ev=0; ev<50; ev++)
- {
- new strb[30];
- format(strb, sizeof(strb),"Quest%d",ev);
- QEvent[playerid][ev] = cache_get_field_content_int(0, strb);
- }
- CancelSelectTextDraw(playerid);
- PlayerTextDrawHide(playerid, LoginBox0[playerid]);
- PlayerTextDrawHide(playerid, LoginBox1[playerid]);
- PlayerTextDrawHide(playerid, LoginBox2[playerid]);
- PlayerTextDrawHide(playerid, LoginBox3[playerid]);
- PlayerTextDrawHide(playerid, LoginBox4[playerid]);
- PlayerTextDrawHide(playerid, LoginBox5[playerid]);
- PlayerTextDrawHide(playerid, LoginBox6[playerid]);
- PlayerTextDrawHide(playerid, LoginName[playerid]);
- PlayerTextDrawHide(playerid, LoginMessage[playerid]);
- PlayerTextDrawHide(playerid, LoginClick[playerid]);
- PlayerTextDrawHide(playerid, LoginEnter[playerid]);
- for(new td = 0; td < 17; td++)
- {
- PlayerTextDrawHide(playerid, LoginShow[playerid][td]);
- }
- }
- else
- {
- new stringyy[320];
- gPlayerLogTries[playerid] -= 1;
- if(gPlayerLogTries[playerid] == 1 || gPlayerLogTries[playerid] == 0)
- {
- format(stringyy,sizeof(stringyy),"Parola incorecta. Incercari ramase: ~r~%d", gPlayerLogTries[playerid]);
- PlayerTextDrawSetString(playerid, LoginMessage[playerid], stringyy);
- PlayerTextDrawShow(playerid, LoginMessage[playerid]);
- }
- if(gPlayerLogTries[playerid] == -1)
- {
- new stringkick[256],loginname[30];
- GetPlayerName(playerid, loginname, sizeof(loginname));
- format(stringkick, sizeof(stringkick), "AdmWarn: {FFFFFF}%s has been kicked for entering the wrong password 2 times.",loginname);
- ABroadCast(COLOR_RED2,stringkick,1);
- Kick(playerid);
- }
- return 1;
- }
- cache_delete(pass);
- ResetPlayerCash(playerid);
- GivePlayerCash(playerid,PlayerInfo[playerid][pCash]);
- CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
- KillTimer(login[playerid]);
- new name2[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name2,sizeof(name2));
- /*if(PlayerInfo[playerid][pOneHost] == 0)
- {
- PlayerInfo[playerid][pOneHost] = 1;
- new var[256];
- mysql_format(SQL, var, sizeof(var), "UPDATE `users` SET `Host`='%s' WHERE `name`='%s'",GetPlayerHost(playerid),name2);
- mysql_tquery(SQL, var,"","");
- }
- if(PlayerInfo[playerid][pHost] != GetPlayerHost(playerid)) {
- SCM(playerid, COLOR_RED, "TEST: asdasd!");
- // Kick(playerid);
- }*/
- if(PlayerInfo[playerid][pReg] == 0)
- {
- PlayerInfo[playerid][pLevel] = 1;
- PlayerInfo[playerid][pHealth] = 100.0;
- PlayerInfo[playerid][pValoare] = 1.0;
- PlayerInfo[playerid][pPin] = 0;
- PlayerInfo[playerid][pBonus] = 0;
- PlayerInfo[playerid][pPos_x] = 2246.6;
- PlayerInfo[playerid][pPos_y] = -1161.9;
- PlayerInfo[playerid][pPos_z] = 1029.7;
- PlayerInfo[playerid][pInt] = 0;
- PlayerInfo[playerid][pLocal] = 255;
- PlayerInfo[playerid][pTeam] = 3;
- PlayerInfo[playerid][pModel] = 250;
- PlayerInfo[playerid][pPnumber] = 0;
- PlayerInfo[playerid][pPhousekey] = 999;
- PlayerInfo[playerid][pPbiskey] = 255;
- PlayerInfo[playerid][pAccount] = 1000;
- PlayerInfo[playerid][pPcarkey] = 0;
- PlayerInfo[playerid][pmotokey] = 0;
- PlayerInfo[playerid][pprcarkey2] = 0;
- PlayerInfo[playerid][pPPluscarkey] = 0;
- PlayerInfo[playerid][pPPluscarkey2] = 0;
- PlayerInfo[playerid][phelikey] = 0;
- PlayerInfo[playerid][pprcarkey] = 0;
- PlayerInfo[playerid][pReg] = 1;
- PlayerInfo[playerid][pBoatLic] = 1;
- PlayerInfo[playerid][pBoatLicT] = 10;
- PlayerInfo[playerid][pFlyLic] = 1;
- PlayerInfo[playerid][pFlyLicT] = 10;
- PlayerInfo[playerid][pCarLic] = 0;
- PlayerInfo[playerid][pCarLicT] = 0;
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pCarLicSuspend] = 0;
- Update(playerid, pCarLicSuspendx);
- PlayerInfo[playerid][pGunLic] = 1;
- PlayerInfo[playerid][pGunLicT] = 10;
- PlayerInfo[playerid][pGunLicSuspend] = 0;
- Update(playerid, pGunLicSuspendx);
- new string[300],
- str[256],
- d,
- m,
- y,
- h,
- mine,
- s;
- getdate(y,m,d);
- gettime(h,mine,s);
- format(string,sizeof(string), "%d-%02d-%02d %02d:%02d:%02d",y,m,d,h,mine,s);
- strmid(PlayerInfo[playerid][pRegistredDate], string, 0, strlen(string), 255);
- mysql_format(SQL,str,sizeof(str),"UPDATE users SET `pHealth`='100.0',`Team`='3',`Valoare`='1.0',`Model`='250', `IP`='%s' WHERE `name`='%s'",playerip,PlayerInfo[playerid][pNormalName]);
- mysql_tquery(SQL,str,"","");
- Update(playerid,pCashx);
- Update(playerid,pLevelx);
- Update(playerid,pPhousekeyx);
- Update(playerid,pPbiskeyx);
- Update(playerid,pPnumberx);
- Update(playerid,pRegx);
- Update(playerid,pRegistredDatex);
- Update(playerid,pPcarkeyx);
- Update(playerid,pmotokeyx);
- Update(playerid,pprcarkey2x);
- Update(playerid,pPPluscarkeyx);
- Update(playerid,pPPluscarkey2x);
- Update(playerid,phelikeyx);
- Update(playerid,pprcarkeyx);
- }
- if(PlayerInfo[playerid][pFightStyle] > 0)
- {
- if(PlayerInfo[playerid][pFightStyle] == 1)
- {
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
- }
- else if(PlayerInfo[playerid][pFightStyle] == 2)
- {
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
- }
- else if(PlayerInfo[playerid][pFightStyle] == 3)
- {
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
- }
- else if(PlayerInfo[playerid][pFightStyle] == 4)
- {
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
- }
- else if(PlayerInfo[playerid][pFightStyle] == 5)
- {
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
- }
- }
- else if(PlayerInfo[playerid][pFightStyle] == 0)
- {
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
- }
- StopAudioStreamForPlayer(playerid);
- new string2[128];
- if(PlayerInfo[playerid][pTut] == 1)
- {
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- SendClientMessage(playerid,COLOR_WHITE,"");
- }
- SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
- new adminss=0, adminsafk=0, helperss=0, helpersafk=0;
- foreach(Player, ids2)
- {
- if(PlayerInfo[ids2][pAdmin] > 0)
- {
- adminss++;
- if(IsPlayerAFK[ids2] > 0)
- {
- adminsafk++;
- }
- }
- if(PlayerInfo[ids2][pHelper] > 0)
- {
- helperss++;
- if(IsPlayerAFK[ids2] > 0)
- {
- helpersafk++;
- }
- }
- }
- new playerss=0, playerssafk=0;
- foreach(Player, ids23)
- {
- playerss++;
- if(IsPlayerAFK[ids23] > 0)
- {
- playerssafk++;
- }
- }
- new query[256],playeriddd,strings[128],namee[30];
- GetPlayerName(playerid, namee, sizeof(namee));
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- SCM(playerid, -1, " ");
- if (PlayerInfo[playerid][pPremiumAccount] == 1)
- {
- SendClientMessage(playerid, COLOR_WHITE,"{00FFFF}Login Info: {ffffff}You are a Premium Account user!");
- }
- if (PlayerInfo[playerid][pAdmin] > 0)
- {
- format(string2, sizeof(string2), "{00FFFF}Login Info: {ffffff}You are a level {00FFFF}%d{ffffff} admin",PlayerInfo[playerid][pAdmin],adminss,(adminss-adminsafk));
- SendClientMessage(playerid, COLOR_WHITE,string2);
- format(string2, sizeof(string2), "{00FFFF}Login Info: {ffffff}There are {00FFFF}%d{ffffff} admins online.",adminss);
- SendClientMessage(playerid, COLOR_WHITE,string2);
- format(string2, sizeof(string2), "{00FFFF}Login Info: {ffffff}%d admins not afk and {00FFFF}%d{ffffff} afk.",(adminss-adminsafk),adminsafk);
- SendClientMessage(playerid, COLOR_WHITE,string2);
- format(string2, sizeof(string2), "{00FFFF}Server Info: {ffffff}There are %d players online, {00FFFF}%d{ffffff} not afk and {00FFFF}%d{ffffff} afk.",playerss,(playerss-playerssafk),adminsafk);
- SendClientMessage(playerid, COLOR_WHITE,string2);
- }
- if (PlayerInfo[playerid][pHelper] > 0)
- {
- format(string2,sizeof(string2), "{00FFFF}Login Info: {ffffff}You are a level {00FFFF}%d{ffffff} helper", PlayerInfo[playerid][pHelper],helperss,(helperss-helpersafk));
- SendClientMessage(playerid, COLOR_WHITE,string2);
- format(string2,sizeof(string2), "{00FFFF}Login Info: {ffffff}There are {00FFFF}%d{ffffff} helpers online", helperss);
- SendClientMessage(playerid, COLOR_WHITE,string2);
- format(string2,sizeof(string2), "{00FFFF}Login Info: {ffffff}%d helpers not afk and {00FFFF}%d{ffffff} afk.",(helperss-helpersafk),helpersafk);
- SendClientMessage(playerid, COLOR_WHITE,string2);
- format(string2,sizeof(string2), "{00FFFF}Server Info: {ffffff}There are %d players online, {00FFFF}%d{ffffff} not afk and {00FFFF}%d{ffffff} afk.",playerss,(playerss-playerssafk),adminsafk);
- SendClientMessage(playerid, COLOR_WHITE,string2);
- }
- format(query,sizeof(query),"SELECT PlayerID FROM `friends` WHERE `FriendID`='%d'", PlayerInfo[playerid][pSQLID]);
- new Cache: resultt = mysql_query(SQL,query);
- if(cache_get_row_count() > 0)
- {
- for(new iddd, jddd = cache_get_row_count (); iddd != jddd; ++iddd)
- {
- playeriddd = cache_get_field_content_int(iddd, "PlayerID");
- foreach(Player, ids)
- {
- if(PlayerInfo[ids][pSQLID] == playeriddd)
- {
- format(strings,sizeof(strings),"{FFC266}** {FFFF00}Prietenul tau, %s s-a logat pe server. {FFC266}**", namee);
- SendClientMessage(ids, COLOR_YELLOW, strings);
- }
- }
- }
- }
- cache_delete(resultt);
- if (PlayerInfo[playerid][pWantedLevel] > 0)
- {
- SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
- PlayerTextDrawShow(playerid, WantedText[playerid]);
- new str1[256];
- format(str1,sizeof(str1),"WANTED SCADE IN: ~r~%d MINUTE",wantedlost[playerid]/60+1);
- PlayerTextDrawSetString(playerid, WantedText[playerid], str1);
- SendClientMessage(playerid, COLOR_RED2, "Esti inca urmarit de politie. Nivelul de wanted ti-a fost restaurat.");
- wantedlost[playerid] = 1800;
- WantedPoints[playerid] = PlayerInfo[playerid][pWantedLevel]*2;
- DestroyDynamic3DTextLabel(WantedScris[playerid]);
- Tigaanel[playerid] = 1;
- new str2[256];
- format(str2,sizeof(str2),"{FF00FF}Wanted Level: %d", PlayerInfo[playerid][pWantedLevel]);
- WantedScris[playerid] = CreateDynamic3DTextLabel(str2, COLOR_WHITE, 0, 0, -20, 20, playerid);
- Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, WantedScris[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.48);
- }
- SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], 533.5229,-1813.2379,6.5781, 1.0, -1, -1, -1, -1, -1, -1);
- if(PlayerInfo[playerid][pClan] > 0)
- {
- new szName[25];
- if(PlayerInfo[playerid][pClanTag] == 1)
- {
- format(szName, sizeof(szName), "%s%s", ClanInfo[PlayerInfo[playerid][pClan]][cClanTag], PlayerInfo[playerid][pNormalName]);
- SetPlayerName(playerid, szName);
- }
- else if(PlayerInfo[playerid][pClanTag] == 2)
- {
- format(szName, sizeof(szName), "%s%s", PlayerInfo[playerid][pNormalName], ClanInfo[PlayerInfo[playerid][pClan]][cClanTag]);
- SetPlayerName(playerid, szName);
- }
- }
- if(gTeam[playerid] == 0)
- {
- gTeam[playerid] = 3;
- }
- else
- {
- gTeam[playerid] = PlayerInfo[playerid][pTeam];
- }
- if(PlayerInfo[playerid][pMember] != 0)
- {
- new namex[25],disc[84];
- GetPlayerName(playerid,namex,sizeof(namex));
- format(disc,sizeof(disc),"(Group) {FFFFFF}%s from your group has just logged in.",namex);
- SendFamilyMessage(PlayerInfo[playerid][pMember], COLOR_GENANNOUNCE, disc);
- SCM(playerid,COLOR_GENANNOUNCE,disc);
- }
- if(PlayerInfo[playerid][pMember] != 0)
- {
- if(strlen(DynamicFactions[PlayerInfo[playerid][pMember]][fAnn]) > 0)
- {
- new factioninfo[128];
- format(factioninfo,sizeof(factioninfo), "(Group) MOTD: {FFFFFF}%s.",DynamicFactions[PlayerInfo[playerid][pMember]][fAnn]);
- SCM(playerid,COLOR_GENANNOUNCE,factioninfo);
- }
- }
- if(PlayerInfo[playerid][pReg] != 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "{00FFFF}Quest Info: {ffffff}Pe server se afla un quest, pentru detalii folositi {00FFFF}/quest{ffffff}.");
- SendClientMessage(playerid, COLOR_YELLOW, "{FF0000}Server Info: {00FF00}La fiecare Level up ve-ti primi +10 Puncte Premium {00FFFF}/buylevel{ffffff}.");
- SendClientMessage(playerid, COLOR_YELLOW, "{00FFFF}Server Info: {ffffff}Foloseste comanda {00FFFF}/premiums{ffffff} pentru a vedea jucatorii cu cont ({FFFF00} PREMIUM {ffffff}).");
- }
- new sendername[30],
- playersip[64],
- iplog[256],
- qqerry[500],
- stringname[128];
- GetPlayerName(playerid,sendername,sizeof(sendername));
- GetPlayerIp(playerid,playersip,sizeof(playersip));
- LogIP(playersip,PlayerInfo[playerid][pSQLID]);
- format(iplog,sizeof(iplog),"%s (%d) has been connected to the server (IP: %s).",sendername,playerid,playersip);
- SendIP(COLOR_WHITE,iplog);
- gPlayerLogged[playerid] = 1;
- SpawnPlayer(playerid);
- mysql_format(SQL,qqerry, sizeof(qqerry), "UPDATE `users` SET `Status` = '1', `OnlineToday` = '1', `OnlineThisWeek` = '1', `LastIP` = '%s' WHERE `id` = '%d'", playersip, PlayerInfo[playerid][pSQLID]);
- mysql_tquery(SQL,qqerry,"","");
- mysql_format(SQL,qqerry, sizeof(qqerry), "UPDATE `friends` SET `Status` = '1' WHERE `FriendID` = '%d'", PlayerInfo[playerid][pSQLID]);
- mysql_tquery(SQL,qqerry,"","");
- printf("%s has been connected to the server (IP: %s).",sendername,playersip);
- format(stringname,sizeof(stringname),"%s / www.XtremePlay.ro",sendername);
- PlayerTextDrawSetString(playerid, Logo[playerid], stringname);
- PlayerTextDrawShow(playerid, Logo[playerid]);
- if(PlayerInfo[playerid][pPin] == 0) return SCM(playerid, -1, "Nu ai un {00FFFF}pin{ffffff} setat pe cont, foloseste {00FFFF}/addpin{ffffff} pentru a-ti seta unul.");
- if(PlayerInfo[playerid][pPin] > 0) return SCM(playerid, -1, "Foloseste {00FFFF}/pin{ffffff} pentru a-ti debloca contul si pentru a avea acces la comenzile {00FFFF}serverului{ffffff}.");
- if(PlayerInfo[playerid][pMP3] <= 0)
- {
- PlayerInfo[playerid][pMP3] = 1;
- Update(playerid, pMP3x);
- SCM(playerid, -1, "Ai primit cadou un {00FFFF}MP3{ffffff}, foloseste {00FFFF}/mp3{ffffff} pentru a-l folosii.");
- }
- Logare[playerid] = 0;
- LoginRegister[playerid] = 0;
- return 1;
- }
Add Comment
Please, Sign In to add comment