Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function WhenBanCheck(playerid)
- {
- new rows, fields;
- cache_get_data(rows, fields, handle);
- if(rows)
- {
- new tmp[64], admin[25], reason[25], bany, banm, band, unbany, unbanm, unband, unbanh, days;
- cache_get_field_content(0, "Admin", tmp), format(admin, 64, tmp);
- cache_get_field_content(0, "Reason", tmp), format(reason, 64, tmp);
- cache_get_field_content(0, "BanY", tmp), bany = strval(tmp);
- cache_get_field_content(0, "BanM", tmp), banm = strval(tmp);
- cache_get_field_content(0, "BanD", tmp), band = strval(tmp);
- cache_get_field_content(0, "UnbanY", tmp), unbany = strval(tmp);
- cache_get_field_content(0, "UnbanM", tmp), unbanm = strval(tmp);
- cache_get_field_content(0, "UnbanD", tmp), unband = strval(tmp);
- cache_get_field_content(0, "UnbanH", tmp), unbanh = strval(tmp);
- cache_get_field_content(0, "Days", tmp), days = strval(tmp);
- if(days == 0)
- {
- format(gString,sizeof(gString), "Contul tau a fost blocat permanent de administratorul %s pe %02d/%02d/%d, motiv: %s.", admin, band, banm, bany, reason);
- SendClientMessage(playerid, COLOR_LIGHTRED, gString);
- SendClientMessage(playerid, COLOR_LIGHTRED, "Poti sa faci o cerere de unban pe forum-ul nostru: www.blazing.ro");
- }
- else
- {
- format(gString,sizeof(gString), "Contul tau a fost blocat %d zile de administratorul %s pe %02d/%02d/%d, motiv: %s.", days, admin, band, banm, bany, reason);
- SendClientMessage(playerid, COLOR_LIGHTRED, gString);
- format(gString,sizeof(gString), "Contul tau va fii deblocat pe data de %02d/%02d/%d la %02d:00.", unband, unbanm, unbany, unbanh);
- SendClientMessage(playerid, COLOR_LIGHTRED, gString);
- }
- Kick(playerid);
- }
- else
- {
- gQuery[0] = (EOS);
- mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `players` WHERE `Name` = '%e'", GetName(playerid));
- mysql_tquery(handle, gQuery, "WhenAccountCheck", "i", playerid);
- }
- return 1;
- }
- function WhenAccountCheck(playerid, password[])
- {
- new rows, fields;
- cache_get_data(rows, fields, handle);
- SetPlayerInterior(playerid,0);
- TogglePlayerControllableEx(playerid, 0);
- SetPlayerVirtualWorld(playerid, playerid+1);
- SetPlayerPos(playerid,1439.0607,-1106.1150,93.3587);
- InterpolateCameraPos(playerid, 1364.3937,-726.6948,126.0533, 1346.7803,-2148.2166,117.6013, 20000);
- InterpolateCameraLookAt(playerid, 1308.7045,-1702.2900,120.4304, 1586.9072,-2277.0942,13.6560, 20000);
- PlayAudioStreamForPlayer(playerid, "http://k003.kiwi6.com/hotlink/w8rggqpjem/Welcome.mp3");
- for(new s = 0; s < 19; s++) SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, ""MARO"LX: {FFFFFF}Bine ai venit pe "MARO""SERVER_NAME" RPG {FFFFFF}!");
- if(rows)
- {
- new tmp[64];
- gRegistred[playerid] = 1;
- cache_get_field_content(0, "LastLogin", tmp), format(PlayerInfo[playerid][pLastLogin], 128, tmp);
- format(gString,sizeof(gString),""MARO"Acest cont ( %s ) este inregistrat\n"ALB"Introdu parola contului pentru a te loga.\n\nUltima logare: "MARO"%s",GetName(playerid), PlayerInfo[playerid][pLastLogin]);
- ShowPlayerDialog(playerid, DIALOG_LOGIN ,DIALOG_STYLE_PASSWORD,"Logare",gString,"Logare","Exit");
- SendClientMessage(playerid,COLOR_LIGHTRED,"* Te rugam sa te loghezi in urmatoarele 30 secunde!");
- }
- else
- {
- gRegistred[playerid] = 0;
- format(gString,sizeof(gString),""MARO"Bun venit %s\n"ALB"Acest cont nu este inregistrat. Te rugam introduceti parola mai jos.",GetName(playerid));
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Inregistrare", gString, "Inregistrare", "Inchide");
- SendClientMessage(playerid,COLOR_LIGHTRED,"* Te rugam sa te inregistrezi in urmatoarele 30 secunde!");
- }
- return 1;
- }
- function OnPlayerRegister(playerid, password[])
- {
- if(IsPlayerConnected(playerid))
- {
- gQuery[0] = (EOS);
- mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO `players` (`Name`,`Password`) VALUES ('%e','%e')", GetName(playerid), password);
- mysql_tquery(handle, gQuery, "", "");
- strmid(PlayerInfo[playerid][pPassword], password, 0, strlen(password), 255);
- format(gString, sizeof(gString), ""ALB"Va rugam sa scrieti parola mai jos pentru a va conecta pe server", GetName(playerid));
- ShowPlayerDialog(playerid, DIALOG_LOGIN ,DIALOG_STYLE_PASSWORD, "Logare", gString, "Logare", "Exit");
- }
- return 1;
- }
- function OnPlayerLoginIn(playerid, password[])
- {
- if(IsPlayerConnected(playerid))
- {
- gQuery[0] = (EOS);
- mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `players` WHERE `Name`='%e' AND `Password`='%e'", GetName(playerid), password);
- mysql_tquery(handle, gQuery, "WhenPlayerLogin", "i", playerid);
- }
- return 1;
- }
- function WhenPlayerLogin(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- new rows, fields;
- new tmp[256];
- cache_get_data(rows, fields, handle);
- if(rows != 0)
- {
- cache_get_field_content(0, "ID", tmp), PlayerInfo[playerid][pSQLID] = strval(tmp);
- cache_get_field_content(0, "Password", tmp), format(PlayerInfo[playerid][pPassword], 64, tmp);
- cache_get_field_content(0, "Level", tmp), PlayerInfo[playerid][pLevel] = strval(tmp);
- cache_get_field_content(0, "AdminLevel", tmp), PlayerInfo[playerid][pAdmin] = strval(tmp);
- cache_get_field_content(0, "HelperLevel", tmp), PlayerInfo[playerid][pHelper] = strval(tmp);
- cache_get_field_content(0, "Cash", tmp), PlayerInfo[playerid][pCash] = strval(tmp);
- cache_get_field_content(0, "Account", tmp), PlayerInfo[playerid][pAccount] = strval(tmp);
- cache_get_field_content(0, "Email", tmp), format(PlayerInfo[playerid][pEmail], 128, tmp);
- cache_get_field_content(0, "Registred", tmp), PlayerInfo[playerid][pRegistred] = strval(tmp);
- cache_get_field_content(0, "Tutorial", tmp), PlayerInfo[playerid][pTutorial] = strval(tmp);
- cache_get_field_content(0, "Sex", tmp), PlayerInfo[playerid][pSex] = strval(tmp);
- cache_get_field_content(0, "Age", tmp), PlayerInfo[playerid][pAge] = strval(tmp);
- cache_get_field_content(0, "PhoneNumber", tmp), PlayerInfo[playerid][pPhoneNumber] = strval(tmp);
- cache_get_field_content(0, "PhoneBook", tmp), PlayerInfo[playerid][pPhoneBook] = strval(tmp);
- cache_get_field_content(0, "WalkieTalkie", tmp), PlayerInfo[playerid][pWalkieTalkie] = strval(tmp);
- cache_get_field_content(0, "PremiumAccount", tmp), PlayerInfo[playerid][pPremiumAccount] = strval(tmp);
- cache_get_field_content(0, "Respect", tmp), PlayerInfo[playerid][pRespect] = strval(tmp);
- cache_get_field_content(0, "PayCheck", tmp), PlayerInfo[playerid][pPayCheck] = strval(tmp);
- cache_get_field_content(0, "PayDay", tmp), PlayerInfo[playerid][pPayDay] = strval(tmp);
- cache_get_field_content(0, "PayDayHad", tmp), PlayerInfo[playerid][pPayDayHad] = strval(tmp);
- cache_get_field_content(0, "HoursPlayed", tmp), PlayerInfo[playerid][pHoursPlayed] = strval(tmp);
- cache_get_field_content(0, "PersonalKills", tmp), PlayerInfo[playerid][pPersonalKills] = strval(tmp);
- cache_get_field_content(0, "PersonalDeaths", tmp), PlayerInfo[playerid][pPersonalDeaths] = strval(tmp);
- cache_get_field_content(0, "Leader", tmp), PlayerInfo[playerid][pLeader] = strval(tmp);
- cache_get_field_content(0, "Member", tmp), PlayerInfo[playerid][pMember] = strval(tmp);
- cache_get_field_content(0, "Rank", tmp), PlayerInfo[playerid][pRank] = strval(tmp);
- cache_get_field_content(0, "Skin", tmp), PlayerInfo[playerid][pSkin] = strval(tmp);
- cache_get_field_content(0, "FWarns", tmp), PlayerInfo[playerid][pFWarns] = strval(tmp);
- cache_get_field_content(0, "FPunish", tmp), PlayerInfo[playerid][pFPunish] = strval(tmp);
- cache_get_field_content(0, "Warns", tmp), PlayerInfo[playerid][pWarns] = strval(tmp);
- cache_get_field_content(0, "Muted", tmp), PlayerInfo[playerid][pMuted] = strval(tmp);
- cache_get_field_content(0, "MuteTime", tmp), PlayerInfo[playerid][pMuteTime] = strval(tmp);
- cache_get_field_content(0, "DrivingLic", tmp), PlayerInfo[playerid][pDrivingLic] = strval(tmp);
- cache_get_field_content(0, "FlyingLic", tmp), PlayerInfo[playerid][pFlyingLic] = strval(tmp);
- cache_get_field_content(0, "GunLic", tmp), PlayerInfo[playerid][pGunLic] = strval(tmp);
- cache_get_field_content(0, "SailLic", tmp), PlayerInfo[playerid][pSailLic] = strval(tmp);
- cache_get_field_content(0, "FishingLic", tmp), PlayerInfo[playerid][pFishingLic] = strval(tmp);
- cache_get_field_content(0, "BiggestFish", tmp), PlayerInfo[playerid][pBiggestFish] = strval(tmp);
- cache_get_field_content(0, "Job", tmp), PlayerInfo[playerid][pJob] = strval(tmp);
- cache_get_field_content(0, "Wanted", tmp), PlayerInfo[playerid][pWanted] = strval(tmp);
- cache_get_field_content(0, "WantedLost", tmp), PlayerInfo[playerid][pWantedLost] = strval(tmp);
- cache_get_field_content(0, "Jailed", tmp), PlayerInfo[playerid][pJailed] = strval(tmp);
- cache_get_field_content(0, "JailTime", tmp), PlayerInfo[playerid][pJailTime] = strval(tmp);
- cache_get_field_content(0, "Bail", tmp), PlayerInfo[playerid][pBail] = strval(tmp);
- cache_get_field_content(0, "Materials", tmp), PlayerInfo[playerid][pMats] = strval(tmp);
- cache_get_field_content(0, "Drugs", tmp), PlayerInfo[playerid][pDrugs] = strval(tmp);
- cache_get_field_content(0, "HouseKey", tmp), PlayerInfo[playerid][pHouseKey] = strval(tmp);
- cache_get_field_content(0, "RentKey", tmp), PlayerInfo[playerid][pRentKey] = strval(tmp);
- cache_get_field_content(0, "BizzKey", tmp), PlayerInfo[playerid][pBizzKey] = strval(tmp);
- cache_get_field_content(0, "HeadValue", tmp), PlayerInfo[playerid][pHeadValue] = strval(tmp);
- cache_get_field_content(0, "Contracted", tmp), PlayerInfo[playerid][pContracted] = strval(tmp);
- cache_get_field_content(0, "Contract", tmp), format(PlayerInfo[playerid][pContract], 25, tmp);
- cache_get_field_content(0, "ContractTime", tmp), PlayerInfo[playerid][pContractTime] = strval(tmp);
- cache_get_field_content(0, "TowPoints", tmp), PlayerInfo[playerid][pTowPoints] = strval(tmp);
- cache_get_field_content(0, "SpawnChange", tmp), PlayerInfo[playerid][pSpawnChange] = strval(tmp);
- cache_get_field_content(0, "AJailed", tmp), PlayerInfo[playerid][pAJailed] = strval(tmp);
- cache_get_field_content(0, "AJailTime", tmp), PlayerInfo[playerid][pAJailTime] = strval(tmp);
- cache_get_field_content(0, "Referral", tmp), PlayerInfo[playerid][pReferral] = strval(tmp);
- cache_get_field_content(0, "Rob", tmp), PlayerInfo[playerid][pRob] = strval(tmp);
- cache_get_field_content(0, "FreePoints", tmp), PlayerInfo[playerid][pFreePoints] = strval(tmp);
- cache_get_field_content(0, "CLeader", tmp), PlayerInfo[playerid][pCLeader] = strval(tmp);
- cache_get_field_content(0, "CMember", tmp), PlayerInfo[playerid][pCMember] = strval(tmp);
- cache_get_field_content(0, "CRank", tmp), PlayerInfo[playerid][pCRank] = strval(tmp);
- cache_get_field_content(0, "Kills", tmp), PlayerInfo[playerid][pKills] = strval(tmp);
- cache_get_field_content(0, "Deaths", tmp), PlayerInfo[playerid][pDeaths] = strval(tmp);
- cache_get_field_content(0, "Crimes", tmp), PlayerInfo[playerid][pCrimes] = strval(tmp);
- cache_get_field_content(0, "Arrests", tmp), PlayerInfo[playerid][pArrests] = strval(tmp);
- cache_get_field_content(0, "WantedDeaths", tmp), PlayerInfo[playerid][pWantedDeaths] = strval(tmp);
- cache_get_field_content(0, "VehicleSlots", tmp), PlayerInfo[playerid][pVehicleSlots] = strval(tmp);
- cache_get_field_content(0, "TruckerSkill", tmp), PlayerInfo[playerid][pTruckerSkill] = strval(tmp);
- cache_get_field_content(0, "GarbageSkill", tmp), PlayerInfo[playerid][pGarbageSkill] = strval(tmp);
- cache_get_field_content(0, "MechanicSkill", tmp), PlayerInfo[playerid][pMechanicSkill] = strval(tmp);
- cache_get_field_content(0, "ThiefSkill", tmp), PlayerInfo[playerid][pThiefSkill] = strval(tmp);
- cache_get_field_content(0, "ArmsSkill", tmp), PlayerInfo[playerid][pArmsSkill] = strval(tmp);
- cache_get_field_content(0, "FarmerSkill", tmp), PlayerInfo[playerid][pFarmerSkill] = strval(tmp);
- cache_get_field_content(0, "PizzaSkill", tmp), PlayerInfo[playerid][pPizzaSkill] = strval(tmp);
- cache_get_field_content(0, "Gold", tmp), PlayerInfo[playerid][pGold] = strval(tmp);
- cache_get_field_content(0, "MoneyBoost", tmp), PlayerInfo[playerid][pMoneyBoost] = strval(tmp);
- cache_get_field_content(0, "RPBoost", tmp), PlayerInfo[playerid][pRPBoost] = strval(tmp);
- cache_get_field_content(0, "Fuel", tmp), PlayerInfo[playerid][pFuel] = strval(tmp);
- cache_get_field_content(0, "UseHidden", tmp), PlayerInfo[playerid][pUseHidden] = strval(tmp);
- cache_get_field_content(0, "Glasses", tmp), PlayerInfo[playerid][pGlasses] = strval(tmp);
- cache_get_field_content(0, "Hat", tmp), PlayerInfo[playerid][pHat] = strval(tmp);
- cache_get_field_content(0, "FactionTime", tmp), PlayerInfo[playerid][pFactionTime] = strval(tmp);
- cache_get_field_content(0, "StaffPoints", tmp), PlayerInfo[playerid][pStaffPoints] = strval(tmp);
- cache_get_field_content(0, "TutVeh", tmp), PlayerInfo[playerid][pTutVeh] = strval(tmp);
- cache_get_field_content(0, "GeneralIP", tmp), format(PlayerInfo[playerid][pGeneralIP], 32, tmp);
- cache_get_field_content(0, "FactionPoints", tmp), PlayerInfo[playerid][pFactionPoints] = strval(tmp);
- cache_get_field_content(0, "GiftTime", tmp), PlayerInfo[playerid][pGiftTime] = strval(tmp);
- cache_get_field_content(0, "Pickup", tmp), PlayerInfo[playerid][pPickups][0] = strval(tmp);
- cache_get_field_content(0, "Pickup1", tmp), PlayerInfo[playerid][pPickups][1] = strval(tmp);
- cache_get_field_content(0, "Pickup2", tmp), PlayerInfo[playerid][pPickups][2] = strval(tmp);
- cache_get_field_content(0, "Pickup3", tmp), PlayerInfo[playerid][pPickups][3] = strval(tmp);
- cache_get_field_content(0, "Pickup4", tmp), PlayerInfo[playerid][pPickups][4] = strval(tmp);
- cache_get_field_content(0, "Pickup5", tmp), PlayerInfo[playerid][pPickups][5] = strval(tmp);
- cache_get_field_content(0, "Pickup6", tmp), PlayerInfo[playerid][pPickups][6] = strval(tmp);
- cache_get_field_content(0, "Pickup7", tmp), PlayerInfo[playerid][pPickups][7] = strval(tmp);
- cache_get_field_content(0, "Pickup8", tmp), PlayerInfo[playerid][pPickups][8] = strval(tmp);
- cache_get_field_content(0, "Pickup9", tmp), PlayerInfo[playerid][pPickups][9] = strval(tmp);
- cache_get_field_content(0, "Pickup10", tmp), PlayerInfo[playerid][pPickups][10] = strval(tmp);
- cache_get_field_content(0, "Pickup11", tmp), PlayerInfo[playerid][pPickups][11] = strval(tmp);
- cache_get_field_content(0, "Pickup12", tmp), PlayerInfo[playerid][pPickups][12] = strval(tmp);
- cache_get_field_content(0, "Pickup13", tmp), PlayerInfo[playerid][pPickups][13] = strval(tmp);
- cache_get_field_content(0, "Pickup14", tmp), PlayerInfo[playerid][pPickups][14] = strval(tmp);
- cache_get_field_content(0, "Pickup15", tmp), PlayerInfo[playerid][pPickups][15] = strval(tmp);
- cache_get_field_content(0, "Pickup16", tmp), PlayerInfo[playerid][pPickups][16] = strval(tmp);
- cache_get_field_content(0, "Pickup17", tmp), PlayerInfo[playerid][pPickups][17] = strval(tmp);
- cache_get_field_content(0, "Pickup18", tmp), PlayerInfo[playerid][pPickups][18] = strval(tmp);
- cache_get_field_content(0, "Pickup19", tmp), PlayerInfo[playerid][pPickups][19] = strval(tmp);
- cache_get_field_content(0, "TotalPickups", tmp), PlayerInfo[playerid][pTotalPickups] = strval(tmp);
- cache_get_field_content(0, "PaintKills", tmp), PlayerInfo[playerid][pPaintKills] = strval(tmp);
- cache_get_field_content(0, "Seconds", tmp), PlayerInfo[playerid][pSeconds] = strval(tmp);
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Logare", ""ALB"Parola este gresita!\nTe rugam sa introduci parola pentru a te loga:", "Logare", "Exit");
- return 1;
- }
- new playerip[16];
- GetPlayerIp(playerid,playerip,sizeof(playerip));
- if(NumIp(playerip, playerid) > 5 && !IsPremiumOnIP(playerip))
- {
- Kick(playerid);
- SendClientMessage(playerid, COLOR_LIGHTRED, ""MARO"(Kick): "ALB"Ai nevoie de Cont Premium ca sa conectezi 3 conturi cu acelasi IP!");
- return 1;
- }
- if(PlayerInfo[playerid][pAdmin] >= 1) { // admini online
- counta++;
- }
- if(PlayerInfo[playerid][pHelper] >= 1) { // admini online
- counth++;
- }
- gQuery[0] = (EOS);
- mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `mdc` WHERE `ID` = %d", PlayerInfo[playerid][pSQLID]);
- mysql_tquery(handle, gQuery, "LoadCrimes", "i", playerid);
- mysql_format(handle, gQuery, sizeof(gQuery), "UPDATE `players` SET `Status` = '1' WHERE `ID` = %d", PlayerInfo[playerid][pSQLID]);
- mysql_tquery(handle, gQuery, "", "");
- new day, month, year;
- getdate(year, month, day);
- new hour, minute, second;
- gettime(hour, minute, second);
- new str[128];
- format(str, sizeof(str),"%02d/%02d/%d - %02d:%02d:%02d", day, month, year, hour, minute, second);
- format(PlayerInfo[playerid][pLastLogin], 128, str);
- Update(playerid, pLastLoginx);
- format(gString, sizeof(gString), ""MARO"(Connect):{FFFFFF} %s(ID: %d) | IP: %s | Version: 0.3.7 | Ping: %d", GetName(playerid), playerid, GetIPEx(playerid), GetPlayerPing(playerid));
- ABroadCast(COLOR_WHITE, gString, 1);
- SetCameraBehindPlayer(playerid);
- if(!strmatch(GetIPEx(playerid), PlayerInfo[playerid][pGeneralIP]))
- {
- gQuery[0] = (EOS);
- mysql_format(handle, gQuery, sizeof(gQuery), "INSERT INTO `ips` (`PIP`,`PName`) VALUES ('%s', '%e')",GetIPEx(playerid),GetName(playerid));
- mysql_tquery(handle, gQuery, "", "");
- }
- format(PlayerInfo[playerid][pGeneralIP], 32, GetIPEx(playerid));
- Update(playerid, pGeneralIPx);
- SetPlayerVirtualWorld(playerid, 0);
- if(PlayerInfo[playerid][pRegistred] == 1)
- {
- SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
- SetPlayerCash(playerid, PlayerInfo[playerid][pCash]);
- StopAudioStreamForPlayer(playerid);
- format(gString, sizeof(gString), "~w~Bun venit ~n~~y~ %s", GetName( playerid ));
- GameTextForPlayer(playerid, gString, 4000, 1);
- if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
- {
- format(gString, sizeof(gString), "Reports: ~y~%d ~w~/ Questions: ~y~%d", Reports, Questions);
- PlayerTextDrawSetString(playerid, PlayerText:StaffInfo[playerid], gString);
- PlayerTextDrawShow(playerid, StaffInfo[playerid]);
- }
- new faction = PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader];
- if(faction > 0)
- {
- format(gString, sizeof (gString), "%s din factiunea ta tocmai s-a conectat pe server.", GetName(playerid));
- SendFactionMessage(faction, COLOR_YELLOW, gString);
- }
- if(playeri < 1000)
- {
- format(gString, sizeof (gString), ""MARO"(Bonus):{FFFFFF} Cand serverul va atinge %d jucatori conectati o sa primesti %s$, %d RP si %d Gold.", playeri, FormatNumber(bani), rp, gold);
- SendClientMessage(playerid, COLOR_WHITE, gString);
- }
- if(DoubleMoney == 1) SendClientMessage(playerid, COLOR_WHITE, ""MARO"(Bonus):{FFFFFF} Bonusul tau salarial este dublat pana duminica la ora 18:00.");
- if(PlayerInfo[playerid][pHelper] > 0) SendClientMessage(playerid, COLOR_WHITE, ""MARO"(Staff):{FFFFFF} Foloseste comanda /hod pentru a deveni disponibil in calitate de helper.");
- if(PlayerInfo[playerid][pHelper] > 0 && PlayerInfo[playerid][pHelper] < 3) SendClientMessage(playerid, COLOR_WHITE, ""MARO"(!) "ALB"Trebuie sa fii la datorie ca sa folosesti aceasta comanda. Tasteaza /hod");
- BuyLevelMsg(playerid);
- SetPlayerWantedLevel(playerid,PlayerInfo[playerid][pWanted]);
- gLogged[playerid] = 1;
- CheckEvent();
- SetPlayerInterior(playerid, 0);
- SpawnPlayer(playerid);
- SetMaxCars(playerid);
- if(PlayerInfo[playerid][pCMember] + PlayerInfo[playerid][pCLeader] != 0)
- {
- new namesa[25];
- format(namesa, sizeof(namesa), "%s", GetName(playerid));
- SetPlayerName(playerid, "clName");
- SetPlayerName(playerid, namesa);
- PlayerTextDrawShow(playerid, NameText[playerid]);
- new id = PlayerInfo[playerid][pCMember] + PlayerInfo[playerid][pCLeader];
- if(!strmatch(ClanInfo[id][clNews], "0"))
- {
- format(gString,sizeof(gString),""MARO"(Clan News): {FFFFFF}%s",ClanInfo[id][clNews]);
- SendClientMessage(playerid, COLOR_WHITE, gString);
- }
- }
- if(PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader] != 0)
- {
- new id = PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader];
- if(!strmatch(SafeInfo[id][sNews], "0"))
- {
- format(gString,sizeof(gString),""MARO"(Faction News): {FFFFFF}%s",SafeInfo[id][sNews]);
- SendClientMessage(playerid, COLOR_WHITE, gString);
- }
- }
- if(PlayerInfo[playerid][pWanted] > 0)
- {
- PlayerTextDrawShow(playerid, WantedTime[playerid]);
- format(gString, sizeof(gString), "Wanted: %d", PlayerInfo[playerid][pWanted]);
- SetPlayerChatBubble(playerid, gString, COLOR_LIGHTRED, 25.0, 900000);
- }
- }
- else
- {
- if(PlayerInfo[playerid][pTutorial] == 0)
- {
- SetMaxCars(playerid);
- OnPlayerSpawn(playerid);
- TogglePlayerControllableEx(playerid, 0);
- SetPlayerVirtualWorld(playerid, playerid+1);
- SetPlayerPos(playerid,1439.0607,-1106.1150,93.3587);
- InterpolateCameraPos(playerid, 1364.3937,-726.6948,126.0533, 1346.7803,-2148.2166,117.6013, 20000);
- InterpolateCameraLookAt(playerid, 1308.7045,-1702.2900,120.4304, 1586.9072,-2277.0942,13.6560, 20000);
- ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_MSGBOX, "Inregistrare[2/5]", "{FFFFFF}Te rugam sa specifici sexul tau pentru a continua inregistrarea", "Barbat", "Femeie");
- }
- }
- }
- return 1;
- }
- function ReferralCheck(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- new rows, fields;
- new tmp[128];
- cache_get_data(rows, fields, handle);
- if(rows != 0)
- {
- new name[25], id, registred;
- cache_get_field_content(0, "ID", tmp), id = strval(tmp);
- cache_get_field_content(0, "Registred", tmp), registred = strval(tmp);
- cache_get_field_content(0, "Name", tmp), format(name, 64, tmp);
- if(strmatch(name, GetName(playerid)))
- {
- format(gString, sizeof(gString), "{FFFFFF}Te rugam sa scrii numele celui care te-a adus pe server:");
- ShowPlayerDialog(playerid, DIALOG_REFERRAL, DIALOG_STYLE_INPUT, "Inregistrare[5/5]", gString, "Gata", "Sari");
- return 1;
- }
- if(registred == 0)
- {
- format(gString, sizeof(gString), "{FFFFFF}Acel jucator nu este inregistrat, scrie numele celui care te-a adus pe server:");
- ShowPlayerDialog(playerid, DIALOG_REFERRAL, DIALOG_STYLE_INPUT, "Inregistrare[5/5]", gString, "Gata", "Sari");
- return 1;
- }
- format(gString, sizeof(gString), "{FFFFFF}Ai fost adus aici de "MARO"%s ?", name);
- ShowPlayerDialog(playerid, DIALOG_REFERRAL_CHECK, DIALOG_STYLE_MSGBOX,"Inregistrare[5/5]", gString, "Da", "Nu");
- ReferralID[playerid] = id;
- format(ReferralName[playerid], 64, name);
- }
- else
- {
- format(gString, sizeof(gString), "{FFFFFF}Te rugam sa scrii numele corect:");
- ShowPlayerDialog(playerid, DIALOG_REFERRAL, DIALOG_STYLE_INPUT, "Inregistrare[5/5]", gString, "Gata", "Sari");
- }
- }
- return 1;
- }
- function SetPlayerSpawn(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- SetPlayerTeam(playerid, 4);
- SetPlayerArmourEx(playerid, 0);
- SetPlayerHealthEx(playerid, 100);
- ResetPlayerWeapons(playerid);
- SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
- TeamColor(playerid);
- if(PlayerInfo[playerid][pGlasses] != -1) PutGlasses(playerid);
- if(PlayerInfo[playerid][pHat] != -1) PutHat(playerid);
- if(SpectatorID[playerid] != INVALID_PLAYER_ID) SpectatorID[playerid] = INVALID_PLAYER_ID, PlayerTextDrawHide(playerid, SpecText[playerid]);
- if(BeforeSpectate[playerid][pSpectating])
- {
- SetPlayerVirtualWorld(playerid, BeforeSpectate[playerid][pWorld]);
- SetPlayerInterior(playerid, BeforeSpectate[playerid][pInt]);
- if(BeforeSpectate[playerid][pState] == PLAYER_STATE_DRIVER)
- PutPlayerInVehicle(playerid, BeforeSpectate[playerid][pInVehicle], 0);
- else if(BeforeSpectate[playerid][pState] == PLAYER_STATE_PASSENGER)
- PutPlayerInVehicle(playerid, BeforeSpectate[playerid][pInVehicle], 1 + random(3));
- else
- SetPlayerPos(playerid, BeforeSpectate[playerid][pOldPos][0], BeforeSpectate[playerid][pOldPos][1], BeforeSpectate[playerid][pOldPos][2]);
- BeforeSpectate[playerid][pSpectating] = false;
- return 1;
- }
- if(PlayerInfo[playerid][pSpawnChange] == 1 || IsInWar1(playerid) || IsInWar2(playerid)) FactionSpawn(playerid);
- else if(PlayerInfo[playerid][pSpawnChange] == 2)
- {
- if(PlayerInfo[playerid][pHouseKey] != 0 || PlayerInfo[playerid][pRentKey] != 0)
- {
- new h = PlayerInfo[playerid][pHouseKey] + PlayerInfo[playerid][pRentKey];
- SetPlayerInterior(playerid,HouseInfo[h][hInt]);
- SetPlayerVirtualWorld(playerid,HouseInfo[h][hWorld]);
- SetPlayerPos(playerid,HouseInfo[h][hExitX],HouseInfo[h][hExitY],HouseInfo[h][hExitZ]);
- HouseEntered[playerid] = h;
- }
- else
- {
- PlayerInfo[playerid][pSpawnChange] = 1;
- Update(playerid, pSpawnChangex);
- SetPlayerSpawn(playerid);
- }
- }
- else if(PlayerInfo[playerid][pSpawnChange] == 3)
- {
- new clan = PlayerInfo[playerid][pCMember] + PlayerInfo[playerid][pCLeader];
- if(ClanInfo[clan][clHQType] == 1)
- {
- new h = ClanInfo[clan][clHouseHQ];
- SetPlayerInterior(playerid,HouseInfo[h][hInt]);
- SetPlayerVirtualWorld(playerid,HouseInfo[h][hWorld]);
- SetPlayerPos(playerid,HouseInfo[h][hExitX],HouseInfo[h][hExitY],HouseInfo[h][hExitZ]);
- HouseEntered[playerid] = h;
- }
- else
- {
- if(PlayerInfo[playerid][pHouseKey] != 0 || PlayerInfo[playerid][pRentKey] != 0) PlayerInfo[playerid][pSpawnChange] = 2;
- else PlayerInfo[playerid][pSpawnChange] = 1;
- Update(playerid, pSpawnChangex);
- SetPlayerSpawn(playerid);
- }
- }
- if(TurfsON[playerid]) ShowZones(playerid);
- if(HoldPizza[playerid] == 1 || TakenPizza[playerid] == 1)
- {
- HoldPizza[playerid] = 0;
- TakenPizza[playerid] = 0;
- if(IsPlayerAttachedObjectSlotUsed(playerid, 0)) RemovePlayerAttachedObject(playerid, 0);
- if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
- if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 2);
- if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
- if(IsPlayerAttachedObjectSlotUsed(playerid, 4)) RemovePlayerAttachedObject(playerid, 4);
- ClearAnimations(playerid);
- }
- if(ArmsPachet[playerid] >= 1)
- {
- ArmsPachet[playerid] = 0;
- if(IsPlayerAttachedObjectSlotUsed(playerid, 0)) RemovePlayerAttachedObject(playerid, 0);
- if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
- if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 2);
- if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
- if(IsPlayerAttachedObjectSlotUsed(playerid, 4)) RemovePlayerAttachedObject(playerid, 4);
- ClearAnimations(playerid);
- }
- if(PlayerPaintballing[playerid] != 0)
- {
- ResetPlayerWeapons(playerid);
- SetPlayerArmourEx(playerid,0);
- SetPlayerHealthEx(playerid,100);
- GivePlayerWeapon(playerid, pgunp, 9999);
- new randoo = random(sizeof(PaintballSpawns));
- SetPlayerPos(playerid, PaintballSpawns[randoo][0], PaintballSpawns[randoo][1], PaintballSpawns[randoo][2]);
- SetPlayerHealthEx(playerid, 10000);
- defer paintinv(playerid);
- SetPlayerInterior(playerid,10);
- SetPlayerVirtualWorld(playerid,1);
- }
- if(InTraining[playerid] != 0)
- {
- new spawntra = random(sizeof(TrainingSpawns));
- SetPlayerPos(playerid, TrainingSpawns[spawntra][0], TrainingSpawns[spawntra][1], TrainingSpawns[spawntra][2]);
- SetPlayerInterior(playerid, 10);
- GivePlayerWeaponEx(playerid, 24, 9999);
- GivePlayerWeaponEx(playerid, 31, 9999);
- GivePlayerWeaponEx(playerid, 32, 9999);
- GivePlayerWeaponEx(playerid, 27, 9999);
- GivePlayerWeaponEx(playerid, 33, 9999);
- return 1;
- }
- if(InClanWar[playerid])
- {
- ResetPlayerWeapons(playerid);
- SetPlayerArmourEx(playerid,0);
- SetPlayerHealthEx(playerid,100);
- new clan = PlayerInfo[playerid][pCLeader] + PlayerInfo[playerid][pCMember];
- if(clan == ClanWarT1)
- {
- new rando = random(3);
- SetPlayerInterior(playerid, 10);
- SetPlayerPos(playerid, ClanWarSpawn[rando][0], ClanWarSpawn[rando][1], ClanWarSpawn[rando][2]);
- TogglePlayerControllableEx(playerid, 1);
- }
- else if(clan == ClanWarT2)
- {
- new rando = random(3) + 3;
- SetPlayerInterior(playerid, 10);
- SetPlayerPos(playerid, ClanWarSpawn[rando][0], ClanWarSpawn[rando][1], ClanWarSpawn[rando][2]);
- TogglePlayerControllableEx(playerid, 1);
- }
- GivePlayerWeapon(playerid, 24, 99999);
- GivePlayerWeapon(playerid, 31, 99999);
- GivePlayerWeapon(playerid, 32, 99999);
- GivePlayerWeapon(playerid, 33, 99999);
- SetPlayerVirtualWorld(playerid,0);
- }
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- SetPlayerInterior(playerid, 6);
- new randp = random(sizeof(JailSpawn));
- SetPlayerPos(playerid, JailSpawn[randp][0], JailSpawn[randp][1], JailSpawn[randp][2]);
- SendClientMessage(playerid, COLOR_LIGHTRED, "Sentinta incompleta, inapoi la inchisoare!");
- PlayerTextDrawShow(playerid, JailTime[playerid]);
- SetPlayerVirtualWorld(playerid, 0);
- ResetPlayerWeapons(playerid);
- }
- else
- {
- PlayerTextDrawHide(playerid, JailTime[playerid]);
- }
- if(PlayerInfo[playerid][pAJailed] == 1)
- {
- SetPlayerInterior(playerid, 10);
- SetPlayerPos(playerid, 223.4726,110.7459,999.0156);
- SetPlayerVirtualWorld(playerid, playerid+1);
- PlayerTextDrawShow(playerid, JailTime[playerid]);
- SetPlayerVirtualWorld(playerid, 0);
- ResetPlayerWeapons(playerid);
- }
- else
- {
- PlayerTextDrawHide(playerid, JailTime[playerid]);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement