17.01.2014, 19:32
I login game it game server:
OnplayerLoad:
Code:
[03:40:18] [debug] Run time error 4: "Array index out of bounds" [03:40:18] [debug] Accessing element at index 19 past array upper bound 15 [03:40:18] [debug] AMX backtrace: [03:40:18] [debug] #0 00238acc in public OnPlayerLoad (0x00000000) from DFU_NGRP.amx [03:40:18] [debug] #1 0002d8e4 in public OnQueryFinish (0x00000008, 0x00000000, 0x000000a4) from DFU_NGRP.amx
Code:
public OnPlayerLoad(playerid) { new string[128]; if(PlayerInfo[playerid][pOnline] != 0) { if(PlayerInfo[playerid][pOnline] != servernumber) { SendClientMessage(playerid, COLOR_WHITE, "SERVER: Tai khoan nay dang truc tuyen!"); SetTimerEx("KickNguoiChoi",500,false,"i",playerid); return 1; } } GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16); if( PlayerInfo[playerid][pPermaBanned] == 3 || PlayerInfo[playerid][pBanned] >= 1 ) { format(string, sizeof(string), "Canh bao: %s (IP:%s) co gang dang nhap tai khoan bi cam va da duoc tu dong cam.", GetPlayerNameEx( playerid ), PlayerInfo[playerid][pIP] ); ABroadCast(COLOR_YELLOW, string, 2); SendClientMessage( playerid, COLOR_LIGHTRED, "SERVER: Ban da bi banned tu may chu." ); AddBan(PlayerInfo[playerid][pIP]); Log("logs/ban.log", string); SetTimerEx("KickNguoiChoi",500,false,"i",playerid); return 1; } if(PlayerInfo[playerid][pAdmin] > 1 && !fexist("NoWhitelist.h")) { // Beta server. if(isnull(PlayerInfo[playerid][pSecureIP]) || strcmp(PlayerInfo[playerid][pIP], PlayerInfo[playerid][pSecureIP], false, strlen(PlayerInfo[playerid][pSecureIP])) != 0) { if(strcmp(PlayerInfo[playerid][pIP], "127.0.0.1", false, 16) != 0) { SendClientMessage(playerid, COLOR_WHITE, "SERVER: IP cua ban hien khong phu hop voi danh sach IP trang' cua tai khoan do.Lien he admin de xem IP hien tai."); format(string, sizeof(string), "{AA3333}He thong{FFFF00}: %s da bi tu dong kick vi IP khong thuoc danh sang trang.", GetPlayerNameEx(playerid)); ABroadCast(COLOR_YELLOW, string, 2); SetTimerEx("KickNguoiChoi",500,false,"i",playerid); return 1; } } } if(PlayerInfo[playerid][pDisabled] != 0) { if( PlayerInfo[playerid][pBanAppealer] > 1) PlayerInfo[playerid][pBanAppealer] = 0; if( PlayerInfo[playerid][pShopTech] > 1) PlayerInfo[playerid][pShopTech] = 0; if( PlayerInfo[playerid][pUndercover] > 1) PlayerInfo[playerid][pUndercover] = 0; if( PlayerInfo[playerid][pFactionModerator] > 1) PlayerInfo[playerid][pFactionModerator] = 0; if( PlayerInfo[playerid][pGangModerator] > 1) PlayerInfo[playerid][pGangModerator] = 0; if( PlayerInfo[playerid][pPR] > 1) PlayerInfo[playerid][pPR] = 0; SendClientMessage(playerid, COLOR_WHITE, "SERVER: Tai khoan nay da bi Vo Hieu Hoa!"); SetTimerEx("KickNguoiChoi",500,false,"i",playerid); return 1; } TotalLogin++; new serial[64]; gpci(playerid, serial, sizeof(serial)); format(string, sizeof(string), "sampweb.ng-gaming.net/scott/misc/gpci.php?g=%s&n=%s&i=%s", serial, GetPlayerNameExt(playerid), GetPlayerIpEx(playerid)); HTTP(0, HTTP_HEAD, string, "", ""); SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]); if(PlayerInfo[playerid][pReg] == 0) { for(new v = 0; v < MAX_PLAYERVEHICLES; v++) { PlayerVehicleInfo[playerid][v][pvModelId] = 0; PlayerVehicleInfo[playerid][v][pvPosX] = 0.0; PlayerVehicleInfo[playerid][v][pvPosY] = 0.0; PlayerVehicleInfo[playerid][v][pvPosZ] = 0.0; PlayerVehicleInfo[playerid][v][pvPosAngle] = 0.0; PlayerVehicleInfo[playerid][v][pvLock] = 0; PlayerVehicleInfo[playerid][v][pvLocked] = 0; PlayerVehicleInfo[playerid][v][pvPaintJob] = -1; PlayerVehicleInfo[playerid][v][pvColor1] = 0; PlayerVehicleInfo[playerid][v][pvImpounded] = 0; PlayerVehicleInfo[playerid][v][pvSpawned] = 0; PlayerVehicleInfo[playerid][v][pvColor2] = 0; PlayerVehicleInfo[playerid][v][pvPrice] = 0; PlayerVehicleInfo[playerid][v][pvTicket] = 0; PlayerVehicleInfo[playerid][v][pvWeapons][0] = 0; PlayerVehicleInfo[playerid][v][pvWeapons][1] = 0; PlayerVehicleInfo[playerid][v][pvWeapons][2] = 0; PlayerVehicleInfo[playerid][v][pvWepUpgrade] = 0; PlayerVehicleInfo[playerid][v][pvFuel] = 100.0; PlayerVehicleInfo[playerid][v][pvAllowedPlayerId] = INVALID_PLAYER_ID; PlayerVehicleInfo[playerid][v][pvPark] = 0; ListItemReleaseId[playerid][v] = -1; PlayerVehicleInfo[playerid][v][pvDisabled] = 0; PlayerVehicleInfo[playerid][v][pvPlate] = 0; ListItemTrackId[playerid][v] = -1; for(new m = 0; m < MAX_MODS; m++) { PlayerVehicleInfo[playerid][v][pvMods][m] = 0; } } for(new v = 0; v < MAX_PLAYERTOYS; v++) { PlayerToyInfo[playerid][v][ptModelID] = 0; PlayerToyInfo[playerid][v][ptBone] = 0; PlayerToyInfo[playerid][v][ptPosX] = 0.0; PlayerToyInfo[playerid][v][ptPosY] = 0.0; PlayerToyInfo[playerid][v][ptPosZ] = 0.0; PlayerToyInfo[playerid][v][ptRotX] = 0.0; PlayerToyInfo[playerid][v][ptRotY] = 0.0; PlayerToyInfo[playerid][v][ptRotZ] = 0.0; PlayerToyInfo[playerid][v][ptScaleX] = 1.0; PlayerToyInfo[playerid][v][ptScaleY] = 1.0; PlayerToyInfo[playerid][v][ptScaleZ] = 1.0; } PlayerInfo[playerid][pSmslog] = 0; strcpy(PlayerInfo[playerid][pSmslog0], "Empty", 64); strcpy(PlayerInfo[playerid][pSmslog1], "Empty", 64); strcpy(PlayerInfo[playerid][pSmslog2], "Empty", 64); strcpy(PlayerInfo[playerid][pSmslog3], "Empty", 64); strcpy(PlayerInfo[playerid][pSmslog4], "Empty", 64); strcpy(PlayerInfo[playerid][pSmslog5], "Empty", 64); strcpy(PlayerInfo[playerid][pSmslog6], "Empty", 64); strcpy(PlayerInfo[playerid][pSmslog7], "Empty", 64); strcpy(PlayerInfo[playerid][pSmslog8], "Empty", 64); strcpy(PlayerInfo[playerid][pSmslog9], "Empty", 64); strcpy(PlayerInfo[playerid][pKillLog0], "Empty", 64); strcpy(PlayerInfo[playerid][pKillLog1], "Empty", 64); strcpy(PlayerInfo[playerid][pKillLog2], "Empty", 64); strcpy(PlayerInfo[playerid][pKillLog3], "Empty", 64); strcpy(PlayerInfo[playerid][pKillLog4], "Empty", 64); strcpy(PlayerInfo[playerid][pKillLog5], "Empty", 64); strcpy(PlayerInfo[playerid][pKillLog6], "Empty", 64); strcpy(PlayerInfo[playerid][pKillLog7], "Empty", 64); strcpy(PlayerInfo[playerid][pKillLog8], "Empty", 64); strcpy(PlayerInfo[playerid][pKillLog9], "Empty", 64); PlayerInfo[playerid][pTokens] = 0; PlayerInfo[playerid][pSecureIP][0] = 0; PlayerInfo[playerid][pFlag][0] = 0; PlayerInfo[playerid][pCrates] = 0; PlayerInfo[playerid][pOrder] = 0; PlayerInfo[playerid][pOrderConfirmed] = 0; PlayerInfo[playerid][pRacePlayerLaps] = 0; PlayerInfo[playerid][pSprunk] = 0; PlayerInfo[playerid][pSpraycan] = 0; PlayerInfo[playerid][pCigar] = 0; PlayerInfo[playerid][pConnectSeconds] = 0; PlayerInfo[playerid][pPayDayHad] = 0; PlayerInfo[playerid][pCDPlayer] = 0; PlayerInfo[playerid][pWins] = 0; PlayerInfo[playerid][pLoses] = 0; PlayerInfo[playerid][pTut] = 0; PlayerInfo[playerid][pWarns] = 0; PlayerInfo[playerid][pRope] = 0; PlayerInfo[playerid][pDice] = 0; PlayerInfo[playerid][pScrewdriver] = 0; PlayerInfo[playerid][pWantedLevel] = 0; PlayerInfo[playerid][pInsurance] = 0; PlayerInfo[playerid][pDutyHours] = 0; PlayerInfo[playerid][pAcceptedHelp] = 0; PlayerInfo[playerid][pAcceptReport] = 0; PlayerInfo[playerid][pShopTechOrders] = 0; PlayerInfo[playerid][pTrashReport] = 0; PlayerInfo[playerid][pGiftTime] = 0; PlayerInfo[playerid][pTicketTime] = 0; PlayerInfo[playerid][pServiceTime] = 0; PlayerInfo[playerid][pFirework] = 0; PlayerInfo[playerid][Robbing] = 0; PlayerInfo[playerid][CashLoaded] = 0; PlayerInfo[playerid][CashLoading] = 0; PlayerInfo[playerid][ROffered] = 0; PlayerInfo[playerid][ROfferer] = 0; PlayerInfo[playerid][pBoombox] = 0; PlayerInfo[playerid][pCash] = 10000; PlayerInfo[playerid][pCoin] = 0; PlayerInfo[playerid][pLevel] = 1; PlayerInfo[playerid][pAdmin] = 0; PlayerInfo[playerid][pHelper] = 0; PlayerInfo[playerid][pSMod] = 0; PlayerInfo[playerid][pWatchdog] = 0; PlayerInfo[playerid][pBanned] = 0; PlayerInfo[playerid][pDisabled] = 0; PlayerInfo[playerid][pMuted] = 0; PlayerInfo[playerid][pRMuted] = 0; PlayerInfo[playerid][pRMutedTotal] = 0; PlayerInfo[playerid][pRMutedTime] = 0; PlayerInfo[playerid][pDMRMuted] = 0; PlayerInfo[playerid][pNMute] = 0; PlayerInfo[playerid][pNMuteTotal] = 0; PlayerInfo[playerid][pADMute] = 0; PlayerInfo[playerid][pADMuteTotal] = 0; PlayerInfo[playerid][pHelpMute] = 0; PlayerInfo[playerid][pVMutedTime] = 0; PlayerInfo[playerid][pVMuted] = 0; PlayerInfo[playerid][pRadio] = 0; PlayerInfo[playerid][pRadioFreq] = 0; PlayerInfo[playerid][pPermaBanned] = 0; PlayerInfo[playerid][pDonateRank] = 0; PlayerInfo[playerid][gPupgrade] = 0; PlayerInfo[playerid][pConnectHours] = 0; PlayerInfo[playerid][pHtOnline] = 0; PlayerInfo[playerid][pReg] = 0; PlayerInfo[playerid][pSex] = 0; PlayerInfo[playerid][pAge] = 0; PlayerInfo[playerid][pDJ] = 0; PlayerInfo[playerid][pRingtone] = 0; PlayerInfo[playerid][pVIPM] = 0; PlayerInfo[playerid][pVIPMO] = 0; PlayerInfo[playerid][pVIPExpire] = 0; PlayerInfo[playerid][pGVip] = 0; PlayerInfo[playerid][pOrigin] = 0; PlayerInfo[playerid][pHydration] = 100; PlayerInfo[playerid][pDoubleEXP] = 0; PlayerInfo[playerid][pEXPToken] = 0; PlayerInfo[playerid][pExp] = 0; PlayerInfo[playerid][pAccount] = 0; PlayerInfo[playerid][pCrimes] = 0; PlayerInfo[playerid][pDeaths] = 0; PlayerInfo[playerid][pArrested] = 0; PlayerInfo[playerid][pPhoneBook] = 0; PlayerInfo[playerid][pVang] = 0; PlayerInfo[playerid][pCuopVangTime] = 0; PlayerInfo[playerid][pSieuThiTime] = 0; PlayerInfo[playerid][pDau] = 0; PlayerInfo[playerid][pDoibung] = 100; PlayerInfo[playerid][pThucan] = 0; PlayerInfo[playerid][pLottoNr] = 0; PlayerInfo[playerid][pFishes] = 0; PlayerInfo[playerid][pBiggestFish] = 0; PlayerInfo[playerid][pJob] = 0; PlayerInfo[playerid][pJob2] = 0; PlayerInfo[playerid][pPayCheck] = 0; PlayerInfo[playerid][pHeadValue] = 0; PlayerInfo[playerid][pJailTime] = 0; PlayerInfo[playerid][pWRestricted] = 0; PlayerInfo[playerid][pMats] = 0; PlayerInfo[playerid][pLeader] = 0; PlayerInfo[playerid][pMember] = 0; PlayerInfo[playerid][pDivision] = 0; PlayerInfo[playerid][pFMember] = 255; PlayerInfo[playerid][pRank] = 0; PlayerInfo[playerid][pRenting] = INVALID_HOUSE_ID; PlayerInfo[playerid][pDetSkill] = 0; PlayerInfo[playerid][pSexSkill] = 0; PlayerInfo[playerid][pBoxSkill] = 0; PlayerInfo[playerid][pLawSkill] = 0; PlayerInfo[playerid][pMechSkill] = 0; PlayerInfo[playerid][pTruckSkill] = 0; PlayerInfo[playerid][pDrugsSkill] = 0; PlayerInfo[playerid][pArmsSkill] = 0; PlayerInfo[playerid][pSmugSkill] = 0; PlayerInfo[playerid][pFishSkill] = 0; PlayerInfo[playerid][pSHealth] = 0.0; PlayerInfo[playerid][pHealth] = 50.0; PlayerInfo[playerid][pPhousekey] = INVALID_HOUSE_ID; PlayerInfo[playerid][pPhousekey2] = INVALID_HOUSE_ID; PlayerInfo[playerid][pGioithieu] = 0; PlayerInfo[playerid][pCheckmapin] = 0; PlayerInfo[playerid][pNongdanTime] = 0; PlayerInfo[playerid][pCookies] = 0; PlayerInfo[playerid][pCheckCash] = 0; PlayerInfo[playerid][pChecks] = 0; PlayerInfo[playerid][pWeedObject] = 0; PlayerInfo[playerid][pWeedPos][0] = 0; PlayerInfo[playerid][pWeedPos][1] = 0; PlayerInfo[playerid][pWeedPos][2] = 0; PlayerInfo[playerid][pWeedVW] = 0; PlayerInfo[playerid][pWeedInt] = 0; PlayerInfo[playerid][pWeedGrowth] = -1; PlayerInfo[playerid][pWSeeds] = 0; PlayerInfo[playerid][pWarrant][0] = 0; PlayerInfo[playerid][pContractBy][0] = 0; PlayerInfo[playerid][pContractDetail] = 0; PlayerInfo[playerid][pJudgeJailTime] = 0; PlayerInfo[playerid][pJudgeJailType] = 0; PlayerInfo[playerid][pBeingSentenced] = 0; PlayerInfo[playerid][pProbationTime] = 0; PlayerInfo[playerid][pModel] = 299; PlayerInfo[playerid][pClothes] = 0; PlayerInfo[playerid][pPnumber] = 0; PlayerInfo[playerid][pCarLic] = 1; PlayerInfo[playerid][pFlyLic] = 0; PlayerInfo[playerid][pBoatLic] = 1; PlayerInfo[playerid][pFishLic] = 1; PlayerInfo[playerid][pGunLic] = 1; PlayerInfo[playerid][pTaxiLicense] = 0; PlayerInfo[playerid][pBugged] = 0; PlayerInfo[playerid][pCallsAccepted] = 0; PlayerInfo[playerid][pPatientsDelivered] = 0; PlayerInfo[playerid][pLiveBanned] = 0; PlayerInfo[playerid][pFreezeBank] = 0; PlayerInfo[playerid][pFreezeHouse] = 0; PlayerInfo[playerid][pFreezeCar] = 0; strcpy(PlayerInfo[playerid][pAutoTextReply], "Nothing", 64); PlayerInfo[playerid][pLevel] = 1; PlayerInfo[playerid][pSHealth] = 0.0; PlayerInfo[playerid][pPnumber] = 0; PlayerInfo[playerid][pPhousekey] = INVALID_HOUSE_ID; PlayerInfo[playerid][pPhousekey2] = INVALID_HOUSE_ID; PlayerInfo[playerid][pNongdanTime] = 0; PlayerInfo[playerid][pCookies] = 0; PlayerInfo[playerid][pAccount] = 20000; PlayerInfo[playerid][pGangWarn] = 0; PlayerInfo[playerid][pPaintTokens] = 0; PlayerInfo[playerid][pTogReports] = 0; PlayerInfo[playerid][pCHits] = 0; PlayerInfo[playerid][pFHits] = 0; PlayerInfo[playerid][pAccent] = 1; PlayerInfo[playerid][pFactionBanned] = 0; PlayerInfo[playerid][pCSFBanned] = 0; PlayerInfo[playerid][pWristwatch] = 0; PlayerInfo[playerid][pSurveillance] = 0; PlayerInfo[playerid][pTire] = 0; PlayerInfo[playerid][pFirstaid] = 0; PlayerInfo[playerid][pRccam] = 0; PlayerInfo[playerid][pReceiver] = 0; PlayerInfo[playerid][pGPS] = 0; PlayerInfo[playerid][pSweep] = 0; PlayerInfo[playerid][pSweepLeft] = 0; PlayerInfo[playerid][pReg] = 1; } if(PlayerInfo[playerid][pHospital] == 1) { PlayerInfo[playerid][pHospital] = 0; SetPVarInt(playerid, "MedicBill", 1); } if( PlayerInfo[playerid][pBanAppealer] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pBanAppealer] = 0; if( PlayerInfo[playerid][pPR] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pPR] = 0; if( PlayerInfo[playerid][pShopTech] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pShopTech] = 0; if( PlayerInfo[playerid][pUndercover] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pUndercover] = 0; if( PlayerInfo[playerid][pFactionModerator] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pFactionModerator] = 0; if( PlayerInfo[playerid][pGangModerator] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pGangModerator] = 0; if( PlayerInfo[playerid][pBanAppealer] > 1) PlayerInfo[playerid][pBanAppealer] = 0; if( PlayerInfo[playerid][pPR] > 1) PlayerInfo[playerid][pPR] = 0; if( PlayerInfo[playerid][pShopTech] > 1) PlayerInfo[playerid][pShopTech] = 0; if( PlayerInfo[playerid][pUndercover] > 1) PlayerInfo[playerid][pUndercover] = 0; if( PlayerInfo[playerid][pFactionModerator] > 1) PlayerInfo[playerid][pFactionModerator] = 0; if( PlayerInfo[playerid][pGangModerator] > 1) PlayerInfo[playerid][pGangModerator] = 0; if( PlayerInfo[playerid][pHelper] == 1 && PlayerInfo[playerid][pAdmin] >= 1) PlayerInfo[playerid][pHelper] = 0; if(PlayerInfo[playerid][pWarns] >= 3) { format(string, sizeof(string), "AdmCmd: %s (IP: %s) da Khoa tai khoan (3 Canh Cao)", GetPlayerNameEx(playerid), GetPlayerIpEx(playerid)); Log("logs/ban.log", string); format(string, sizeof(string), "AdmCmd: %s da Khoa tai khoan (3 Canh Cao)", GetPlayerNameEx(playerid)); SendClientMessageToAllEx(COLOR_LIGHTRED, string); PlayerInfo[playerid][pBanned] = 1; AddBan(GetPlayerIpEx(playerid)); SetTimerEx("KickNguoiChoi",500,false,"i",playerid); //MySQLBan(GetPlayerSQLId(playerid),ip,"had 3 warnings",-1); return 1; } HideMainMenuGUI(playerid); HideNoticeGUIFrame(playerid); PlayerTextDrawShow(playerid, Trangthai[0]); PlayerTextDrawShow(playerid, Trangthai[1]); if(PlayerInfo[playerid][pVIPExpire] > 0 && (1 <= PlayerInfo[playerid][pDonateRank] <= 3) && (PlayerInfo[playerid][pVIPExpire] < gettime()) && PlayerInfo[playerid][pAdmin] < 2) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "[DEBUG] %s (%s) VIP removed (Het han VIP: %d | Level: %d)", name, GetPlayerIpEx(playerid), PlayerInfo[playerid][pVIPExpire], PlayerInfo[playerid][pDonateRank]); Log("logs/vipremove.log", string); //format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: Please check person %s as their VIP may have expired.", GetPlayerNameEx(playerid)); //ABroadCast(COLOR_YELLOW, string, 4); //PlayerInfo[playerid][pDonateRank] = 0; //SendClientMessageEx(playerid, COLOR_YELLOW, "Your VIP has been removed as it has expired"); } if(PlayerInfo[playerid][pJob2] >= 1 && PlayerInfo[playerid][pDonateRank] < 1) { PlayerInfo[playerid][pJob2] = 0; SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have lost your secondary job due to the fact that you are longer a VIP."); } if(PlayerInfo[playerid][pDonateRank] >= 4 && PlayerInfo[playerid][pArmsSkill] < 400) { PlayerInfo[playerid][pArmsSkill] = 401; SendClientMessageEx(playerid, COLOR_YELLOW, "Platinum VIP Feature: You have been given Level 5 Arms Dealer."); } if (PlayerInfo[playerid][pLevel] < 6 || PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pHelper] > 0) { gNewbie[playerid] = 0; } if (PlayerInfo[playerid][pHelper] == 1) { gHelp[playerid] = 0; } if(PlayerInfo[playerid][pAdmin] != 0 && PlayerInfo[playerid][pAdmin] != 1 && PlayerInfo[playerid][pAdmin] != 2 && PlayerInfo[playerid][pAdmin] != 3 && PlayerInfo[playerid][pAdmin] != 4 &&PlayerInfo[playerid][pAdmin] != 1337 && PlayerInfo[playerid][pAdmin] != 1338 && PlayerInfo[playerid][pAdmin] != 99999) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s da co gang dang nhap voi Admin Level %d.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pAdmin]); ABroadCast( COLOR_YELLOW, string, 4 ); format(string, sizeof(string), "%s da co gang dang nhap voi Admin Level %d.", name, PlayerInfo[playerid][pAdmin]); Log("logs/security.log", string); PlayerInfo[playerid][pAdmin] = 0; } if (PlayerInfo[playerid][pAdmin] > 0) { if(PlayerInfo[playerid][pAdmin] == 1) { if(PlayerInfo[playerid][pSMod] == 1) { SendClientMessageEx(playerid, COLOR_WHITE,"SERVER: Ban da dang nhap la Senior Moderator."); format( string, sizeof( string ), "SERVER: %s da dang nhao nhu mot Senior Moderator.", GetPlayerNameEx( playerid )); } else { SendClientMessageEx(playerid, COLOR_WHITE,"SERVER: Ban da dang nhap la Moderator."); format( string, sizeof( string ), "SERVER: %s da dang nhu mot Moderator.", GetPlayerNameEx( playerid ));\ } } else { PriorityReport[playerid] = TextDrawCreate(261.000000, 373.000000, "New Report"); TextDrawBackgroundColor(PriorityReport[playerid], 255); TextDrawFont(PriorityReport[playerid], 2); TextDrawLetterSize(PriorityReport[playerid], 0.460000, 1.800000); TextDrawColor(PriorityReport[playerid], -65281); TextDrawSetOutline(PriorityReport[playerid], 0); TextDrawSetProportional(PriorityReport[playerid], 1); TextDrawSetShadow(PriorityReport[playerid], 1); format(string, sizeof(string), "SERVER: Ban da dang nhap cap bac %d Admin.",PlayerInfo[playerid][pAdmin]); SendClientMessageEx(playerid, COLOR_WHITE,string); format( string, sizeof( string ), "SERVER: %s da dang nhap cap bac %d Admin.", GetPlayerNameEx( playerid ), PlayerInfo[playerid][pAdmin] ); } foreach(new i: Player) if(PlayerInfo[i][pAdmin] >= 1337 >= PlayerInfo[playerid][pAdmin]) SendClientMessageEx(i, COLOR_WHITE, string); } printf("%s da dang nhap.", GetPlayerNameEx(playerid)); format(string, sizeof(string), "SERVER: Chao mung, %s.", GetPlayerNameEx(playerid)); SendClientMessageEx(playerid, COLOR_WHITE, string); SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1); SkinDelay(playerid); gPlayerLogged{playerid} = 1; g_mysql_AccountOnline(playerid, servernumber); TogglePlayerSpectating(playerid, 0); //SpawnPlayer(playerid); format(string, sizeof(string), "~w~Xin chao,~n~~y~%s!", GetPlayerNameEx(playerid)); GameTextForPlayer(playerid, string, 5000, 1); SendClientMessageEx(playerid, COLOR_YELLOW, GlobalMOTD); if(PlayerInfo[playerid][pAdmin] > 0) { if(PlayerInfo[playerid][pAdmin] >= 2) SendClientMessageEx(playerid, COLOR_YELLOW, AdminMOTD); SendClientMessageEx(playerid, TEAM_AZTECAS_COLOR, CAMOTD); } if(PlayerInfo[playerid][pDonateRank] >= 1) SendClientMessageEx(playerid, COLOR_VIP, VIPMOTD); if(PlayerInfo[playerid][pHelper] >= 1) { SendClientMessageEx(playerid, TEAM_AZTECAS_COLOR, CAMOTD); if(PlayerInfo[playerid][pHelper] >= 2) { SetPVarInt(playerid, "AdvisorDuty", 1); ++Advisors; } } if(PlayerInfo[playerid][pInt] > 0 || PlayerInfo[playerid][pVW] > 0) { Player_StreamPrep(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], FREEZE_TIME); } SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightStyle]); // LoadPlayerVehicles(playerid); - Redundant, now that we no longer spawn on login. switch(PlayerInfo[playerid][pDonateRank]) { case 0: { PlayerVehicleInfo[playerid][0][pvDisabled] = 0; PlayerVehicleInfo[playerid][1][pvDisabled] = 0; PlayerVehicleInfo[playerid][2][pvDisabled] = 0; PlayerVehicleInfo[playerid][3][pvDisabled] = 0; PlayerVehicleInfo[playerid][4][pvDisabled] = 0; PlayerVehicleInfo[playerid][5][pvDisabled] = 1; PlayerVehicleInfo[playerid][6][pvDisabled] = 1; PlayerVehicleInfo[playerid][7][pvDisabled] = 1; PlayerVehicleInfo[playerid][8][pvDisabled] = 1; PlayerVehicleInfo[playerid][9][pvDisabled] = 1; } case 1: { PlayerVehicleInfo[playerid][0][pvDisabled] = 0; PlayerVehicleInfo[playerid][1][pvDisabled] = 0; PlayerVehicleInfo[playerid][2][pvDisabled] = 0; PlayerVehicleInfo[playerid][3][pvDisabled] = 0; PlayerVehicleInfo[playerid][4][pvDisabled] = 0; PlayerVehicleInfo[playerid][5][pvDisabled] = 0; PlayerVehicleInfo[playerid][6][pvDisabled] = 1; PlayerVehicleInfo[playerid][7][pvDisabled] = 1; PlayerVehicleInfo[playerid][8][pvDisabled] = 1; PlayerVehicleInfo[playerid][9][pvDisabled] = 1; } case 2: { PlayerVehicleInfo[playerid][0][pvDisabled] = 0; PlayerVehicleInfo[playerid][1][pvDisabled] = 0; PlayerVehicleInfo[playerid][2][pvDisabled] = 0; PlayerVehicleInfo[playerid][3][pvDisabled] = 0; PlayerVehicleInfo[playerid][4][pvDisabled] = 0; PlayerVehicleInfo[playerid][5][pvDisabled] = 0; PlayerVehicleInfo[playerid][6][pvDisabled] = 0; PlayerVehicleInfo[playerid][7][pvDisabled] = 1; PlayerVehicleInfo[playerid][8][pvDisabled] = 1; PlayerVehicleInfo[playerid][9][pvDisabled] = 1; } case 3: { PlayerVehicleInfo[playerid][0][pvDisabled] = 0; PlayerVehicleInfo[playerid][1][pvDisabled] = 0; PlayerVehicleInfo[playerid][2][pvDisabled] = 0; PlayerVehicleInfo[playerid][3][pvDisabled] = 0; PlayerVehicleInfo[playerid][4][pvDisabled] = 0; PlayerVehicleInfo[playerid][5][pvDisabled] = 0; PlayerVehicleInfo[playerid][6][pvDisabled] = 0; PlayerVehicleInfo[playerid][7][pvDisabled] = 0; PlayerVehicleInfo[playerid][8][pvDisabled] = 1; PlayerVehicleInfo[playerid][9][pvDisabled] = 1; } default: { PlayerVehicleInfo[playerid][0][pvDisabled] = 0; PlayerVehicleInfo[playerid][1][pvDisabled] = 0; PlayerVehicleInfo[playerid][2][pvDisabled] = 0; PlayerVehicleInfo[playerid][3][pvDisabled] = 0; PlayerVehicleInfo[playerid][4][pvDisabled] = 0; PlayerVehicleInfo[playerid][5][pvDisabled] = 0; PlayerVehicleInfo[playerid][6][pvDisabled] = 0; PlayerVehicleInfo[playerid][7][pvDisabled] = 0; PlayerVehicleInfo[playerid][8][pvDisabled] = 0; PlayerVehicleInfo[playerid][9][pvDisabled] = 0; } } SetPlayerToTeamColor(playerid); if(PlayerInfo[playerid][pLottoNr] > 0) { CountTickets(playerid); LoadTickets(playerid); } if(PlayerInfo[playerid][pFMember] == -1) { PlayerInfo[playerid][pFMember] = 255; } if(PlayerInfo[playerid][pFMember] >= 0 && PlayerInfo[playerid][pFMember] < 255) { format(string, sizeof(string), "Family MOTD: %s.", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyMOTD]); SendClientMessageEx(playerid, COLOR_YELLOW, string); } CountFlags(playerid); if(PlayerInfo[playerid][pFlagged] > 5) { format(string, sizeof(string), "SERVER: %s has %d outstanding flags.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pFlagged]); ABroadCast(COLOR_WHITE, string, 2); } if(PlayerInfo[playerid][pOrder] > 0) { if(PlayerInfo[playerid][pOrderConfirmed] == 1) { format(string, sizeof(string), "SERVER: %s has an outstanding shop (Confirmed) order.", GetPlayerNameEx(playerid)); ShopTechBroadCast(COLOR_WHITE, string); } else { format(string, sizeof(string), "SERVER: %s has an outstanding shop (Invalid) order.", GetPlayerNameEx(playerid)); ShopTechBroadCast(COLOR_WHITE, string); } } if(PlayerInfo[playerid][pWeedObject] != 0) { PlayerInfo[playerid][pWeedObject] = CreateDynamicObject(3409, PlayerInfo[playerid][pWeedPos][0], PlayerInfo[playerid][pWeedPos][1], PlayerInfo[playerid][pWeedPos][2], 0.0, 0.0, 0.0, PlayerInfo[playerid][pWeedVW], PlayerInfo[playerid][pWeedInt]); } if(PlayerInfo[playerid][pRenting] != INVALID_HOUSE_ID && (PlayerInfo[playerid][pPhousekey] != INVALID_HOUSE_ID || PlayerInfo[playerid][pPhousekey2] != INVALID_HOUSE_ID)) { PlayerInfo[playerid][pRenting] = INVALID_HOUSE_ID; } if(iRewardPlay) { format(string, sizeof(string), "Ban dang co %d phan thuong gio, vui lo kiem tra /rewards de xem thong tin.", floatround(PlayerInfo[playerid][pRewardHours])); SendClientMessageEx(playerid, COLOR_YELLOW, string); if(floatround(PlayerInfo[playerid][pRewardHours]) > 150) { new namedetected = 0; new File: fDedicated; fDedicated = fopen("RewardDedicated.cfg", io_read); while(fread(fDedicated, string)) { if(strcmp(string,GetPlayerNameEx(playerid),true,strlen(GetPlayerNameEx(playerid))) == 0) { namedetected = 1; break; } } fclose(fDedicated); if(namedetected == 0) { fclose(fDedicated); fDedicated = fopen("RewardDedicated.cfg", io_append); format(string, sizeof string, "%s|%i\r\n", GetPlayerNameEx(playerid), gettime()); fwrite(fDedicated, string); fclose(fDedicated); SendClientMessageEx(playerid, COLOR_YELLOW, "Phan thuong khi choi: Ban da them danh sach nguoi choi chuyen dung, cho thu nhap 150 gio!"); } } } if(1 <= PlayerInfo[playerid][pDonateRank] <= 3 && PlayerInfo[playerid][pVIPExpire] > 0 && (PlayerInfo[playerid][pVIPExpire] - 259200 < gettime()) ) { SendClientMessageEx(playerid, COLOR_RED, "VIP cua ban se het han trong vong 3 ngаy nua go /vipdate de biet thкm thфng tin."); } if(PlayerInfo[playerid][pRVehWarns] != 0 && PlayerInfo[playerid][pLastRVehWarn] + 2592000 < gettime()) { SendClientMessageEx(playerid, COLOR_WHITE, "Han che canh bao,xe cua ban da het han!"); PlayerInfo[playerid][pLastRVehWarn] = 0; PlayerInfo[playerid][pRVehWarns] = 0; } if(!isnull(PlayerInfo[playerid][pFlag])) { AddFlag(playerid, INVALID_PLAYER_ID, PlayerInfo[playerid][pFlag]); format(string, sizeof(string), "SERVER: %s's old flag %s has been moved to the new system automatically", GetPlayerNameEx(playerid), PlayerInfo[playerid][pFlag]); Log("logs/flagmove.log", string); ABroadCast(COLOR_YELLOW, string, 1337); PlayerInfo[playerid][pFlag][0] = 0; } /* Check for overencumbered items & transfer them to Personal Storage. (Not Needed for Storage Devices - ONLY POCKET) */ /*// Pot if(PlayerInfo[playerid][pPot] > limits[0][1]) { new remainder = PlayerInfo[playerid][pPot] - limits[0][1]; format(string, sizeof(string), "%d Pot has been transfered toward your Personal Storage from your Pocket.", remainder); SendClientMessageEx(playerid, COLOR_WHITE, string); PlayerInfo[playerid][pPot] -= remainder; PlayerInfo[playerid][pPSFPot] += remainder; } // Crack if(PlayerInfo[playerid][pCrack] > limits[0][2]) { new remainder = PlayerInfo[playerid][pCrack] - limits[0][2]; format(string, sizeof(string), "%d Crack has been transfered toward your Personal Storage from your Pocket.", remainder); SendClientMessageEx(playerid, COLOR_WHITE, string); PlayerInfo[playerid][pCrack] -= remainder; PlayerInfo[playerid][pPSFCrack] += remainder; } // Materials if(PlayerInfo[playerid][pMats] > limits[0][3]) { format(string, sizeof(string), "%d Materials has been transfered toward your Personal Storage from your Pocket.", PlayerInfo[playerid][pMats]); SendClientMessageEx(playerid, COLOR_WHITE, string); PlayerInfo[playerid][pPSFMats] += PlayerInfo[playerid][pMats]; PlayerInfo[playerid][pMats] = 0; }*/ if(pMOTD[0]) { ShowPlayerDialog(playerid, PMOTDNOTICE, DIALOG_STYLE_MSGBOX, "Thong bao tu NG-Gaming", pMOTD, "Ok", ""); } else if(GetPVarInt(playerid, "NullEmail")) { ShowPlayerDialog(playerid, NULLEMAIL, DIALOG_STYLE_INPUT, "{3399FF}Dang ky E-Mail", "{FFFFFF}Xin vui long nhap dia chi E-mail hop le de lien ket voi tai khoan.\n\nLuu y: Cung cap mot dia chi email khong hop le tai khoan se bi cham dut tai khoan.", "Xac nhan", "Bo qua"); } SetUnreadMailsNotification(playerid); return 1; }