Jump to content

The_RobyRo

Membru
  • Posts

    43
  • Joined

  • Last visited

Everything posted by The_RobyRo

  1. Dap. Am si gasit problema. Este de la special quest cred ca am gresit eu pe undeva dar nu imi dau seama. if(SpecialWeek == 1) { if(CheckObjects(i) < 15 && TutorialActive[i] == 0 && PlayerInfo[i][pBackpack] == 1) { szTD = ""; string = ""; new objs; for(new sq = 0; sq < 15; sq++) { if(PlayerInfo[i][pSpecialQuest][sq] == 0) { if(PlayerToPoint(45.0, i, QuestPos[sq][0], QuestPos[sq][1], QuestPos[sq][2])) { new Float: oPos[3]; GetPlayerObjectRot(i, PlayerInfo[i][pObjectQuest][sq], oPos[0], oPos[1], oPos[2]); SetPlayerObjectRot(i, PlayerInfo[i][pObjectQuest][sq], oPos[0], oPos[1], oPos[2]+35); format(string, sizeof(string), "~g~Object %d nearby~n~", sq+1), strcat(szTD, string), objs++; } else if(PlayerToPoint(75.0, i, QuestPos[sq][0], QuestPos[sq][1], QuestPos[sq][2])) format(string, sizeof(string), "~y~Object %d nearby~n~", sq+1), strcat(szTD, string), objs++; else if(PlayerToPoint(150.0, i, QuestPos[sq][0], QuestPos[sq][1], QuestPos[sq][2])) format(string, sizeof(string), "~r~Object %d nearby~n~", sq+1), strcat(szTD, string), objs++; PlayerTextDrawSetString(i, QuestTD, szTD); PlayerTextDrawShow(i, QuestTD); if(PlayerToPoint(1.0, i, QuestPos[sq][0], QuestPos[sq][1], QuestPos[sq][2])) { if(GetPlayerVirtualWorld(i) != 0) return SCM(i, COLOR_LGREEN, "Eroare: Nu poti lua acest obiect deoarece esti in alt virtual world!"); if(QuestDeelay[i] > 0) { format(string, sizeof(string), "Eroare: Poti lua un alt obiect peste %d secunde!", QuestDeelay[i]); SCM(i, COLOR_LGREEN, string); } else { if(IsPlayerInAnyVehicle(i)) SCM(i, COLOR_LGREEN, "Eroare: Nu poti colecta acest obiect deoarece esti intr-un vehicul!"); else { DestroyPlayerObject(i, PlayerInfo[i][pObjectQuest][sq]); PlayerInfo[i][pSpecialQuest][sq] = 1; SaveQuest(i); format(string, sizeof(string), "Ai gasit ~y~%d/15~w~~h~ obiecte pana acum.~n~Continua sa cauti pentru a primi premiul special!", CheckObjects(i)); PlayerTextDrawSetString(i, InfosTD, string); PlayerTextDrawShow(i, InfosTD); SetTimerEx("HideTextdraw", 4000, 0, "%d", i); if(CheckObjects(i) == 15) { format(string, sizeof(string), "["QUEST_NAME"] %s a terminat de colectat toate obiectele ascunse si a castigat premiul special!", GetName(i)); SendClientMessageToAll(COLOR_YELLOW, string); SCM(i, COLOR_YELLOW, "Felicitari! Ai terminat de colectat toate obiectele ascunse!"); SCM(i, COLOR_YELLOW, "Ai primit: 1.000.000$, 20 rp, 20 puncte rob, 20 puncte escape, 500 pp, 1 level up, 1 slot garaj."); GivePlayerCash(i, 1000000); PlayerInfo[i][pExp] += 20; PlayerInfo[i][pPremiumPoints] += 500; Update(i, pPremiumPointsx); Update(i, pRP); PlayerInfo[i][pRob] += 20; Update(i, pRobx); PlayerInfo[i][pEscapePoints] += 20; PlayerInfo[i][pLevel]++; Update(i,pLevelx); SetPlayerScore(i, PlayerInfo[i][pLevel]); UpdateVar(i, "EscapePoints", PlayerInfo[i][pEscapePoints]); PlayerTextDrawHide(i, QuestTD); if(PlayerInfo[i][pSlot][0] == 0) PlayerInfo[i][pSlot][0] = 1; else if(PlayerInfo[i][pSlot][1] == 0) PlayerInfo[i][pSlot][1] = 1; else if(PlayerInfo[i][pSlot][2] == 0) PlayerInfo[i][pSlot][2] = 1; else if(PlayerInfo[i][pSlot][3] == 0) PlayerInfo[i][pSlot][3] = 1; else if(PlayerInfo[i][pSlot][4] == 0) PlayerInfo[i][pSlot][4] = 1; else SCM(i, COLOR_LGREEN, "Nu ai primit un slot pentru vehicule deoarece ai numarul maxim de vehicule!"); UpdateSlots(i); } QuestDeelay[i] = 60; } } } } } if(objs == 0) PlayerTextDrawHide(i, QuestTD); } if(QuestDeelay[i] >= 1) QuestDeelay[i] --; }
  2. Am inteles. M-am uitat si in consola dar apare fix asta: [debug] AMX backtrace:[debug] #0 002a47d8 in ?? (0) from gamemode.amx[debug] #1 002c388c in public Timers () from gamemode.amx[debug] Run time error 4: "Array index out of bounds"[debug] Attempted to read/write array element at index 15 in array of size 15 Si deja am o idee de la ce ar putea fi. Incerc sa rezolv. Mersi de ajutor!
  3. Ideea e ca acum ceva timp am abandonat gamemode-ul si era complet functional fara erori. Dar acum cand am reinceput sa lucrez la el pe localhost apare eroarea aia cand ma conectez pe server.
  4. Multumesc de raspuns! Am compilat cu pawno.exe iar compilatorul nu afiseaza eorori. Eroarea apare doar cand intru pe server.
  5. E sub forma de functie. Gamemode-ul e burned la baza. function Timers() { new string[180], szTD[600], anim, Float: ppHealth, Float: ppArmour, Float: x, Float: y, Float: z, Float: animpos[3], swinner[180]; foreach(Player, i) { if(IsPlayerConnected(i) && IsPlayerLogged[i] == 1) { if(JobWorking[i] == 1) WorkingTime[i] ++; if(JobLeftTime[i] > 0) { JobLeftTime[i] --; if(JobLeftTime[i] == 60) SCM(i, COLOR_YELLOW, "Mai ai la dispozitie 1 minut sa intri in vehiculul de la job."); if(JobLeftTime[i] == 0) { SendClientMessage(i, COLOR_GREY, "Job esuat! Ai parasit vehiculul."); if(playerObject[i] != 0) DestroyPlayerObject(i, playerObject[i]), playerObject[i] = 0; if(playerObject2[i] != 0) DestroyObject(playerObject2[i]), playerObject2[i] = 0; JobWorking[i] = 0; PlayerTextDrawHide(i, JobTD); if(JobVehicle[i] != 0) { DestroyVehicle(JobVehicle[i]); JobVehicle[i] = 0; } if(Trailer[i] != 0) { DestroyVehicle(Trailer[i]); Trailer[i] = 0; } PlayerTextDrawHide(i, InfosTD); DisablePlayerCheckpointEx(i); DisablePlayerRaceCheckpointEx(i); RemovePlayerAttachedObject(i, 6); RemovePlayerAttachedObject(i, 2); CP[i] = 0; JobVehicle[i] = 0; JobDeelay[i][PlayerInfo[i][pJob]] = 180; DestroyWoodObject(i); } } if(RaceStarted == 1 && RaceTime == 0 && InRaceArena[i] == 1) { playerRaceTime[i] ++; format(string, sizeof(string), "Position: ~y~%d/%d~w~~h~~n~Checkpoints: ~y~%d/%d~w~~h~~n~Race time: ~y~%s", playerRacePlace[i], RacePlayers, RaceCP[i]-1, RaceCheckpoints(), CalculeazaTimp2(playerRaceTime[i])); PlayerTextDrawSetString(i, CpTD, string); PlayerTextDrawShow(i, CpTD); } if(RepairTimer[i] > 0) { RepairTimer[i]--; if(RepairTimer[i] == 0) { RepairVehicle(VehicleForRepair[i]); SCM(i, COLOR_GREY, "Vehiculul tau a fost reparat cu succes."); VehicleForRepair[i] = -1; PlayerInfo[i][pKits]--; Update(i, pKitsx); } } if(TutorialActive[i] == 1) TutorialSeconds[i] ++; if(TutorialSeconds[i] == 20 && TutorialActive[i] == 1) { TutorialStep[i] ++; TutorialSeconds[i] = 0; szTD = ""; switch(TutorialStep[i]) { case 1: { TogglePlayerSpectating(i, 1); for( new j = 0; j <= 50; j++) SendClientMessage(i, COLOR_WHITE, ""); PlayAudioStreamForPlayer(i, "http://www.youtubeinmp3.com/fetch/?video=https://www.youtube.com/watch?v=pk1YRxLu8n4"); SetPlayerVirtualWorld(i, 9999); PlayerTextDrawHide(i, NameTD); PlayerTextDrawSetString(i, TutorialTD[1], "~y~Tutorial - Pasul 1:~w~~h~ Intro"); strcat(szTD, "Salut si bine ai venit pe comunitatea FIVE RPG Romania.~n~Pentru inceput, te voi pune la cunostinta cu cateva elemente de baza ale server-ului RPG.~n~"); strcat(szTD, "Pentru a vizualiza majoritatea comenzilor, poti folosi comanda /help.~n~Dupa tastarea acestei comenzi, ti se vor afisa diferite tabele cu fiecare informatie necesara la momentul dat."); InterpolateCameraPos(i, 1719.8304,-1849.8419,18.7495, 1816.2760,-1849.9463,13.4141, 15000); InterpolateCameraLookAt(i, 1799.7932,-1865.0728,13.5731, 1799.7932,-1865.0728,13.5731, 15000); SetPlayerPosEx(i, 1719.8304,-1849.8419,18.7495); } case 2: { PlayerTextDrawSetString(i, TutorialTD[1], "~y~Tutorial - Pasul 2:~w~~h~ Cum se fac banii?"); strcat(szTD, "Pentru a iti putea cumpara diferite bunuri, ai nevoie de bani.~n~Poti procura bani din diferite activitati precum lucrand la un job, facand comert cu~n~"); strcat(szTD, "alti jucatori sau savarsind actiuni ilegale precum traficul de droguri sau de arme.~n~Cel mai sigur mod prin care poti face bani usor si rapid sunt job-urile.~n~"); strcat(szTD, "Iti poti alege un job prin intermediul comenzii /jobs.~n~Pentru inceput, iti recomand job-ul Fisher.~n~Poti afla mai multe detalii despre job-ul tau, respectiv comenzile acestuia prin comanda /jobhelp.~n~"); InterpolateCameraPos(i, 1025.008911, -2257.895019, 27.578266, 894.154174, -2173.197998, 16.204189, 15000); InterpolateCameraLookAt(i, 1021.083007, -2254.932861, 26.676969, 891.013000, -2169.591796, 14.745256, 15000); SetPlayerPosEx(i, 1025.008911, -2257.895019, 27.578266); } case 3: { PlayerTextDrawSetString(i, TutorialTD[1], "~y~Tutorial - Pasul 3:~w~~h~ Factiunile server-ului"); strcat(szTD, "Server-ul nostru dispune in total de 13 factiuni: 3 departamente~n~(Los Santos Police Department, Federal Bureau of Investigations si National Guard),~n~"); strcat(szTD, "5 factiuni pasnice (Los Santos Taxi, News Reporters, Tow Truck Company, School Instructors si Paramedic & Fireman), 4 mafii (Grove Street, Los Aztecas~n~"); strcat(szTD, "Los Aztecas, Los Vagos si The Ballas) si o factiune mixta: Hitman Agency."); strcat(szTD, ""); strcat(szTD, ""); InterpolateCameraPos(i, 1421.910034, -1582.262817, 40.729099, 1507.106933, -1648.555297, 23.424715, 15000); InterpolateCameraLookAt(i, 1425.755249, -1585.182006, 39.427848, 1511.111816, -1651.263793, 22.149885, 15000); SetPlayerPosEx(i, 1421.910034, -1582.262817, 40.729099); } case 4: { PlayerTextDrawSetString(i, TutorialTD[1], "~y~Tutorial - Pasul 4:~w~~h~ Serviciile factiunilor"); strcat(szTD, "Fiecare factiune are rolul ei pe server, astfel, daca aveti nevoie de un anumit serviciu,~n~puteti apela la membrii unei factiuni!~n~ Singura metoda prin"); strcat(szTD, " care puteti lua legatura direct cu membrii~n~unei factiuni este prin intermediul comenzii /service."); InterpolateCameraPos(i, 1880.739990, -1513.968627, 43.872097, 1975.696899, -1472.749633, 29.635717, 15000); InterpolateCameraLookAt(i, 1884.849731, -1511.396240, 42.650218, 1979.281372, -1469.331787, 28.950380, 15000); SetPlayerPosEx(i, 1880.739990, -1513.968627, 43.872097); } case 5: { PlayerTextDrawSetString(i, TutorialTD[1], "~y~Tutorial - Pasul 5:~w~~h~ Anunturi publice"); strcat(szTD, "Aici se afla CNN-ul din orasul Los Santos.~n~In acest loc puteti posta un anunt prin care va puteti promova produsele~n~de vanzare sau ca doriti sa"); strcat(szTD, " cumparati ceva.~n~Puteti plasa un anunt incepand cu level 5 prin intermediul comenzii (/ad).~n~Fiecare anunt va costa bani iar dupa plasarea unui anunt,~n~va"); strcat(szTD, " trebui sa asteptati cateva secunde pentru a fi postat.~n~Pentru a afla locatiile importante ale server-ului poti folosi comanda (/gps)~n~"); InterpolateCameraPos(i, 1123.2764,-1412.7639,46.0174, 1152.8912,-1498.3093,29.8144, 15000); InterpolateCameraLookAt(i, 1170.7367,-1489.6268,22.7553, 1170.7367,-1489.6268,22.7553, 15000); SetPlayerPosEx(i, 1123.2764,-1412.7639,46.0174); } case 6: { PlayerTextDrawSetString(i, TutorialTD[1], "~y~Tutorial - Pasul 6:~w~~h~ Sfarsit"); strcat(szTD, "Am ajuns la sfarsitul tutorialului!~n~Speram ca ai inteles cate ceva despre server-ul nostru si iti uram distractie placuta!~n~Poti deschide acest"); strcat(szTD, " tutorial de cate ori doresti prin intermediul comenzii /tutorial.~n~Daca ai nelamuriri cu privinta la modul de joc, foloseste comanda [/newbie] iar un helper iti va raspunde!~n~"); strcat(szTD, "Pe server exista un sistem de realizari, (/realizari). Fiecare realizare obtinuta este recompensata cu bani, puncte premium si un RP."); InterpolateCameraPos(i, 1719.8304,-1849.8419,18.7495, 1816.2760,-1849.9463,13.4141, 15000); InterpolateCameraLookAt(i, 1799.7932,-1865.0728,13.5731, 1799.7932,-1865.0728,13.5731, 15000); SetPlayerPosEx(i, 1719.8304,-1849.8419,18.7495); } case 7: { TutorialActive[i] = 0; if(PlayerInfo[i][pTut] == 0) { ServerAccounts++; format(string, sizeof(string), "%s(%d) s-a inregistrat pe server. [#%d]", GetName(i), i, PlayerInfo[i][pSQLID]); SendAdminMessage(COLOR_LIGHTRED, string, 1); for( new j = 0; j <= 50; j++) SendClientMessage(i, COLOR_WHITE, ""); SendClientMessage(i, COLOR_YELLOW, "Te-ai inregistrat cu succes! Foloseste comanda /bonus pentru un premiu de inceput."); SendClientMessage(i, COLOR_YELLOW, "Server-ul ti-a plasat un checkpoint rosu pe mapa catre DMV, locul unde poti lua licenta de condus."); SendClientMessage(i, COLOR_YELLOW, "Iti uram distractie placuta!"); SetPlayerCheckpointEx(i, 1219.4441,-1813.0352,16.5938, 5.0); ResetPlayerCash(i); GivePlayerCash(i, 15000); PlayerInfo[i][pAccount] = 20000; format(string, sizeof(string), "UPDATE users SET `Tutorial`='1',`Bank`='20000',`Money`='15000' WHERE `name`='%s'",GetName(i)); mysql_query(SQL, string); TutTime[i] = 0; PlayerInfo[i][pTut] = 1; gOoc[i] = 0; gNews[i] = 0; gFam[i] = 0; CP[i] = 53; } TogglePlayerControllable(i, 1); TogglePlayerSpectating(i, 0); SetCameraBehindPlayer(i); SpawnPlayer(i); PlayerTextDrawHide(i, TutorialTD[0]); PlayerTextDrawHide(i, TutorialTD[1]); } } if(TutorialStep[i] >= 1 && TutorialStep[i] <= 6) { PlayerTextDrawSetString(i, TutorialTD[0], szTD); PlayerTextDrawShow(i, TutorialTD[0]); PlayerTextDrawShow(i, TutorialTD[1]); } } if(MoneyTimer[i] > 0) { MoneyTimer[i]--; if(MoneyTimer[i] == 0) { PlayerTextDrawHide(i, MoneyPTD); MoneyTimer[i] = -1; } } if(CP[i] != 0 && PlayerInfo[i][pShowCP] == 1) { new str[64], Float: fDistance = GetPlayerDistanceFromPoint(i, CheckpointPos[i][0], CheckpointPos[i][1], CheckpointPos[i][2]); format(str, sizeof(str), "Distance: %0.1fm", fDistance); PlayerTextDrawSetString(i, CpTDD, str); PlayerTextDrawShow(i, CpTDD); } if(IsACop(i) && NearWanted[i] == 1) show_near_wanted(i); if(InTraining[i] == 1 && PlayerInfo[i][pWantedLevel] != 0) { InTraining[i] = 0; FactionsSpawns(i); new t = GetPVarInt(i, "Training"); SetPlayerPosEx(i, Training[t][0], Training[t][1], Training[t][2]); DeletePVar(i, "Training"); ResetPlayerWeapons(i); SCM(i, COLOR_YELLOW, "Ai fost scos din sala de antrenament deoarece ai wanted!"); } if(!PlayerToPoint(100.0, i, LastPos[i][0], LastPos[i][1], LastPos[i][2]) && !IsPlayerInArea(i, -3000, -2274.5, -1776, -859.5) && PlayerInfo[i][pAdmin] == 0 && Exception[i] == 0 && AFKSeconds[i] < 10 && InDealer[i] == 0 && ArenaSpec[i] == -1 && GetPlayerState(i) != PLAYER_STATE_PASSENGER && Spectate[i] == 255 && GetPlayerSurfingVehicleID(i) != INVALID_VEHICLE_ID) { if(ServerSystem[0] == 0) { WarningsCheat[i] += 2; if(WarningsCheat[i] >= 4) { /*format(string, sizeof(string), "AdmWarning: %s (%d) este suspectat de teleport hack.", GetName(i), i); SendAdminMessage(COLOR_WARNING, string, 1);*/ NightBot(i, "Cheats (teleport-hack)"); WarningsCheat[i] = -3; } } } if(WarningsCheat[i] > 0) WarningsCheat[i] --; if(Exception[i] > 0) Exception[i] --; if(GetPlayerWeapon(i) >= 8 && GetPlayerWeapon(i) != 46 && GetPlayerWeapon(i) != 43 && PlayerInfo[i][pGunLic] == 0) { if(ServerSystem[1] == 0 ) NightBot(i, "Cheats (weapon-hack)"); } if(GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPlayerInterior(i) == 0) { if(!nearPNS(i) && VehicleExist[GetPlayerVehicleID(i)] == 1 && PlayerInfo[i][pAdmin] == 0) { new Float: vhp; GetVehicleHealth(GetPlayerVehicleID(i), vhp); if(vhp == 1000) { //if(ServerSystem[7] == 0) NightBot(i, "Cheats (repair-hack)"); RemovePlayerFromVehicle(i); } } if(!nearPNS2(i) && NearPNS[i] == 1) DisableRemoteVehicleCollisions(i, 0), NearPNS[i] = 0; if(nearPNS2(i)) { DisableRemoteVehicleCollisions(i, 1); NearPNS[i] = 1; } } if(GetPlayerState(i) == PLAYER_STATE_DRIVER) Checkvehinfo(i); if(TradeTime[i] > 0) { TradeTime[i] --; new id = TradeID[i]; format(string, sizeof(string), "00:0%d", TradeTime[i]); PlayerTextDrawSetString(i, TradePTD[6], string); PlayerTextDrawSetString(id, TradePTD[6], string); PlayerTextDrawShow(i, TradePTD[6]); PlayerTextDrawShow(id, TradePTD[6]); if(TradeTime[i] == 0) { FinishTrade(i); PlayerTextDrawHide(i, TradePTD[6]); PlayerTextDrawHide(id, TradePTD[6]); } } if(SafeRTime[i] > 0) { SafeRTime[i] --; if(SafeRTime[i] == 0) { TogglePlayerControllable(i,1); BagTime[i] = 60; Freezed[i] = 0; SendClientMessage(i, COLOR_YELLOW, "* Ai la dispozitie un minut sa duci sacul in spatele unui vehicul. (Apasa tasta Y)"); SetPlayerAttachedObject( i, 0, 1550, 1, 0.024558, -0.279748, -0.060589, 6.105677, 137.291320, 147.132202, 1.019888, 1.000000, 1.000000 ); ClearAnimations(i); } } if(BagTime[i] > 0) { BagTime[i] --; if(BagTime[i] == 0) { if(JobWorking[i] == 1 && PlayerInfo[i][pJob] == 3) { SendClientMessage(i, COLOR_GREY, "Job esuat! Nu ai dus lemenele la timp."); if(playerObject[i] != 0) DestroyPlayerObject(i, playerObject[i]), playerObject[i] = 0; if(playerObject2[i] != 0) DestroyObject(playerObject2[i]), playerObject2[i] = 0; JobWorking[i] = 0; PlayerTextDrawHide(i, JobTD); if(JobVehicle[i] != 0) { DestroyVehicle(JobVehicle[i]); JobVehicle[i] = 0; } if(Trailer[i] != 0) { DestroyVehicle(Trailer[i]); Trailer[i] = 0; } PlayerTextDrawHide(i, InfosTD); DisablePlayerCheckpointEx(i); DisablePlayerRaceCheckpointEx(i); RemovePlayerAttachedObject(i, 6); RemovePlayerAttachedObject(i, 2); SetPlayerSpecialAction(i,0); CP[i] = 0; JobVehicle[i] = 0; JobDeelay[i][PlayerInfo[i][pJob]] = 180; DestroyWoodObject(i); if(PlayerInfo[i][pJob] == 3) ResetWeapons(i); } else FailRob(i, "Nu ai dus sacul la timp"); } else { format(string, sizeof(string), "~w~%d", BagTime[i]); GameTextForPlayer(i, string, 1500, 4); } } // AdmBot - Kick if(GetPlayerState(i) == PLAYER_STATE_DRIVER && !IsAPlane(GetPlayerVehicleID(i))) { new speed = Carspeed(i); new idcar = GetPlayerVehicleID(i); new caridd = FindSpawnID(idcar); if(speed > 230 && PlayerInfo[i][pAdmin] < 1 && !IsPlayerInArea(i, -3000, -2274.5, -1776, -859.5)) { if(GetVehicleModel(i) == 522 && speed < 380 || CarInfo[caridd][cStage1] == 1) return 1; if(GetAdmins() > 0) { format(string, sizeof(string), "AdmWarning: %s(%d) conduce cu %.0d km/h un %s.", GetName(i),i,speed,aVehicleNames[GetVehicleModel(GetPlayerVehicleID(i))-400]); if(GetPVarInt(i, "Cover") == 0) SendAdminMessage(COLOR_WARNING, string,1); } else if(ServerSystem[5] == 0) NightBot(i, "Cheats (speed-hack)"); } } if(PlayerInfo[i][pAdmin] < 1) { anim = GetPlayerAnimationIndex(i); GetPlayerVelocity(i, animpos[0], animpos[1], animpos[2]); if(animpos[0] <= -0.800000 || animpos[1] <= -0.800000 || animpos[2] <= -0.800000 && anim == 1008) { new surfx = GetPlayerSurfingVehicleID(i); if(surfx == INVALID_VEHICLE_ID && !IsABike2(gLastCar[i])) { format(string, sizeof(string), "AdmWarning: %s (%d) este suspectat de Fly-Hack.", GetName(i), i); SendAdminMessage(COLOR_WARNING, string, 1); CheatWarnings[i] += 2; if(ServerSystem[6] == 0 && CheatWarnings[i] >= 6) NightBot(i, "Cheats (fly-hack)"); } } } if(CheatWarnings[i] > 0) CheatWarnings[i] --; if(GetPlayerSurfingVehicleID(i) != INVALID_VEHICLE_ID && PlayerInfo[i][pAdmin] == 0 && !IsABoat(GetPlayerSurfingVehicleID(i)) ) { new pid = GetVehicleDriver(GetPlayerSurfingVehicleID(i)); if(togsurf[pid] == 0 && IsPlayerInVehicle(pid, GetPlayerSurfingVehicleID(i))) SlapPlayer(i); } if(IsPlayerPaused(i) == true || PlayerToPoint(1.1, i, LastPos[i][0], LastPos[i][1], LastPos[i][2])) { /*if(HelperDuty[i] == 1) { DutyAFK[i] ++; if(DutyAFK[i] == 60) { HelperDuty[i] = 0; SCM(HaveHelp[i], -1, "Intrebarea ta a fost stearsa deoarece helper-ul nu a raspuns in cele 60 de secunde."); Helped[HaveHelp[i]] = 0; HaveHelp[i] = -1; SendClientMessage(i, -1, "Acum nu mai esti la datorie ca helper deoarece ai stat AFK mai mult de un minut."); } } else DutyAFK[i] = 0;*/ AFKSeconds[i] ++; if(AFKSeconds[i] == 3600 && PlayerInfo[i][pSleeping] == 0 && PlayerInfo[i][pAdmin] < 6) { format(string, sizeof(string), "AdmCmd: %s was kicked by AdmBot, reason: AFK fara /sleep mai mult de 60 minute.", GetNameEx(i)); SendClientMessageToAll(COLOR_LIGHTRED, string); KickEx(i); } if(AFKSeconds[i] >= 120) { if(JobWorking[i] == 1) { SendClientMessage(i, COLOR_GREY, "Job esuat! Ai stat AFK timp de 2 minute."); if(playerObject[i] != 0) DestroyPlayerObject(i, playerObject[i]), playerObject[i] = 0; if(playerObject2[i] != 0) DestroyObject(playerObject2[i]), playerObject2[i] = 0; JobWorking[i] = 0; PlayerTextDrawHide(i, JobTD); if(JobVehicle[i] != 0) { DestroyVehicle(JobVehicle[i]); JobVehicle[i] = 0; } if(Trailer[i] != 0) { DestroyVehicle(Trailer[i]); Trailer[i] = 0; } PlayerTextDrawHide(i, InfosTD); DisablePlayerCheckpointEx(i); DisablePlayerRaceCheckpointEx(i); CP[i] = 0; JobVehicle[i] = 0; JobDeelay[i][PlayerInfo[i][pJob]] = 180; RemovePlayerAttachedObject(i, 6); RemovePlayerAttachedObject(i, 2); SetPlayerSpecialAction(i, 0); DestroyWoodObject(i); if(PlayerInfo[i][pJob] == 3) ResetWeapons(i); SetPlayerSpecialAction(i, 0); } } } else AFKSeconds[i] = 0; if(PlayerInfo[i][pSleeping] == 0 && Spectate[i] == 255 && AFKSeconds[i] < 15) PlayerInfo[i][pSeconds] ++; GetPlayerPos(i, LastPos[i][0], LastPos[i][1], LastPos[i][2]); if(GetPlayerWeapon(i) != 0 && AFKSeconds[i] == 0) { if(ServerSystem[1] == 0 && GetPlayerWeapon(i) != 0) CheckWeapons(i, GetPlayerWeapon(i)); if(ServerSystem[2] == 0 && GetPlayerWeapon(i) != 0) CheckAmmo(i, GetPlayerWeapon(i)); } if(PlayerInfo[i][pAdmin] == 0 && GetPlayerSpecialAction(i) == 2) { if(ServerSystem[9] == 0) NightBot(i, "Cheats (jetpack)"); } /*if(WTimes[i] >= 6) { if(GetAdmins() > 0) { format(string, sizeof(string), "AdmCmd: %s a primit kick de la AdmBot. Motiv: Checkpoint teleport (3/3)", GetName(i)); SendClientMessageToAll(COLOR_LIGHTRED, string); KickEx(i); } else if(ServerSystem[4] == 0) NightBot(i, "Checkpoint teleport"); WTimes[i] = 0; }*/ if(WTimes[i] != 0) WTimes[i] -= 2; if(GetPlayerDrunkLevel(i) < 100) SetPlayerDrunkLevel(i, 2000); else { if(pDrunkLevelLast[i] != GetPlayerDrunkLevel(i)) { new wfps = pDrunkLevelLast[i] - GetPlayerDrunkLevel(i); if((wfps > 0) && (wfps < 200)) FPS2[i] = wfps; pDrunkLevelLast[i] = GetPlayerDrunkLevel(i); } } if(PlayerInfo[i][pShowFP] == 1 && PlayerInfo[i][pShowHud] == 0) { if(PlayerInfo[i][pAdmin] == 0) format(string, sizeof(string), "~g~%d~n~~w~~h~FPS~n~~n~~p~%d~n~~w~~h~PING", FPS2[i]-1, GetPlayerPing(i)); else format(string, sizeof(string), "~r~%d~n~~w~~h~Tick~n~~n~~g~%d~n~~w~~h~FPS~n~~n~~p~%d~n~~w~~h~PING", GetServerTickRate(), FPS2[i]-1, GetPlayerPing(i)); PlayerTextDrawSetString(i, ShowTD, string); PlayerTextDrawShow(i, ShowTD); } if(GetPlayerAnimationIndex(i)==1660) OnPlayerUseVending(i); if(GetPlayerSurfingVehicleID(i) != INVALID_VEHICLE_ID && !IsABoat(GetPlayerSurfingVehicleID(i))) { if(GetPlayerWeapon(i) != 0) { SetPlayerArmedWeapon(i, 0); SCM(i, COLOR_WARNING, "Nu poti folosi armele atata timp cat esti pe vehicul!"); } } if(PaintType[i] != 0 && PlayersOnPaint(PaintType[i]-1) >= 2) { new pp = PaintType[i]-1; if(pp < 2) { format(string, sizeof(string), "Paintball time: %s~n~Current map: %s~n~Stats: %d kills, %d deaths.~n~Total score: %d~n~Best player: %s (kills: %d)~n~%d players in paintball.", CalculeazaTimp2(PaintTime[pp]), MapName(pp), PKills[i], PDeaths[i], PKills[i]-PDeaths[i], GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]], PlayersOnPaint(pp)); } else { new masadenume[32]; GetWeaponNameEx(GetPlayerWeapon(i), masadenume, sizeof(masadenume)); format(string, sizeof(string), "Paintball time: %s~n~Current map: %s~n~Stats: %d kills, %d deaths.~n~Total score: %d~n~Level %d, Weapon: %s~n~Best player: %s (kills: %d)~n~%d players in paintball.", CalculeazaTimp2(PaintTime[pp]), MapName(pp), PKills[i], PDeaths[i], PKills[i]-PDeaths[i], GetPaintLevel(i), masadenume, GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]], PlayersOnPaint(pp)); } if(PaintTime[pp] == 0 && PaintballWinner[pp] != -1) { for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(i, 1001, 1001, 200); format(string, sizeof(string), "Statistica ta in aceasta runda: %d ucideri si %d decese.", PKills[i], PDeaths[i]); SCM(i, COLOR_YELLOW, string); format(swinner, 256, "* %s a castigat runda cu %d ucideri.", GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]]); PKills[i] = 0, PDeaths[i] = 0; ResetWeapons(i); PaintballWinnerScore[pp] = 0; SendPaintMessage(PaintType[i], COLOR_YELLOW, swinner); PaintballWinner[pp] = -1; } if(PaintTime[pp] != 0 && PaintText[pp] == 0) { PlayerTextDrawSetString(i, PaintTD, string); PlayerTextDrawShow(i, PaintTD); } else { PlayerTextDrawHide(i, PaintTD); } } else PlayerTextDrawHide(i, PaintTD); if(PlayerInfo[i][pWantedLevel] >= 1) { format(string, sizeof(string), "Nivel wanted actual: ~y~%d~n~~w~~h~Scade un nivel in: ~y~%d min.", PlayerInfo[i][pWantedLevel], 10-WantedTime[i]); PlayerTextDrawSetString(i, WantedTD[i], string); PlayerTextDrawShow(i, WantedTD[i]); } else PlayerTextDrawHide(i, WantedTD[i]); if(PlayerInfo[i][pJob] == 1 && JobWorking[i] == 1) { if(PlayerToPoint(200, i, -346.3617,-1437.6451,20.0199) && Carspeed(i) > 25) { JobSeconds[i] --; UpdateJobStats(i); if(JobSeconds[i] == 0) { new rand = 10 + random(30); KG[i] = rand; format(string, sizeof(string), "Ai primit %d kilograme de faina. Du-te la un Burger Shot pentru a vinde faina.", KG[i]); SendClientMessage(i, COLOR_MONEY, string); SCM(i, COLOR_WHITE, "Pentru a afla unde este un Burger Shot, foloseste comanda /locations."); JobWorking[i] = 0; PlayerTextDrawHide(i, JobTD); if(JobVehicle[i] != 0) { DestroyVehicle(JobVehicle[i]); JobVehicle[i] = 0; } PlayerTextDrawHide(i, InfosTD); DisablePlayerCheckpointEx(i); JobVehicle[i] = 0; } } } GetPlayerHealthEx(i, ppHealth); GetPlayerArmourEx(i, ppArmour); if(InGame[i] == 1 && GameStep == 1 && GameDeath[i] == 0) { format(string, sizeof(string), "%.0f%", ppHealth); PlayerTextDrawSetString(i, GamePTD[1], string); format(string, sizeof(string), "%.0f%", ppArmour); PlayerTextDrawSetString(i, GamePTD[2], string); format(string, sizeof(string), "%d", GetPlayerAmmo(i)); PlayerTextDrawSetString(i, GamePTD[3], string); PlayerTextDrawShow(i, GamePTD[1]); PlayerTextDrawShow(i, GamePTD[2]); PlayerTextDrawShow(i, GamePTD[3]); } if(PlayerInfo[i][pShowHP] != 0 && ppHealth >= 1 && InGame[i] == 0) { format(string, sizeof(string), "%.0f", ppHealth); PlayerTextDrawSetString(i, CleoTD[0], string); PlayerTextDrawShow(i, CleoTD[0]); PlayerTextDrawColor(i, CleoTD[0], GetHudColor(PlayerInfo[i][pShowHP])); } else PlayerTextDrawHide(i, CleoTD[0]); if(PlayerInfo[i][pShowAP] != 0 && ppArmour >= 1 && InGame[i] == 0) { format(string, sizeof(string), "%.0f", ppArmour); PlayerTextDrawSetString(i, CleoTD[1], string); PlayerTextDrawShow(i, CleoTD[1]); PlayerTextDrawColor(i, CleoTD[1], GetHudColor(PlayerInfo[i][pShowAP])); } else PlayerTextDrawHide(i, CleoTD[1]); if(SafeTime[i] > 0) SafeTime[i]--; if(SafeTime[i] == 1) { if(PlayerAccount[i] == 1 && IsPlayerLogged[i] == 0) { format(string, sizeof(string), "Cont inregistrat cu succes!\nIntrodu parola din nou in casuta de mai jos.",GetName(i)); ShowPlayerDialog(i,DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD,"Logare", string,"Logare","Quit"); } } if(PlayerInfo[i][pLevel] >= 0 && PlayerInfo[i][pLevel] <= 2) { PlayerInfo[i][pPayCheck] += 2; } else if(PlayerInfo[i][pLevel] >= 3 && PlayerInfo[i][pLevel] <= 4) { PlayerInfo[i][pPayCheck] += 3; } else if(PlayerInfo[i][pLevel] >= 5 && PlayerInfo[i][pLevel] <= 6) { PlayerInfo[i][pPayCheck] += 4; } else if(PlayerInfo[i][pLevel] >= 7 && PlayerInfo[i][pLevel] <= { PlayerInfo[i][pPayCheck] += 5; } else if(PlayerInfo[i][pLevel] >= 9 && PlayerInfo[i][pLevel] <= 10) { PlayerInfo[i][pPayCheck] += 6; } else if(PlayerInfo[i][pLevel] >= 11 && PlayerInfo[i][pLevel] <= 12) { PlayerInfo[i][pPayCheck] += 7; } else if(PlayerInfo[i][pLevel] >= 13 && PlayerInfo[i][pLevel] <= 14) { PlayerInfo[i][pPayCheck] += 8; } else if(PlayerInfo[i][pLevel] >= 15 && PlayerInfo[i][pLevel] <= 16) { PlayerInfo[i][pPayCheck] += 9; } else if(PlayerInfo[i][pLevel] >= 17 && PlayerInfo[i][pLevel] <= 18) { PlayerInfo[i][pPayCheck] += 10; } else if(PlayerInfo[i][pLevel] >= 19 && PlayerInfo[i][pLevel] <= 20) { PlayerInfo[i][pPayCheck] += 11; } else if(PlayerInfo[i][pLevel] >= 21) { PlayerInfo[i][pPayCheck] += 12; } if(PlayerInfo[i][pJailed] > 0) { if(PlayerInfo[i][pJailTime] > 0) { if(IsPlayerLogged[i] == 1) { PlayerInfo[i][pJailTime]--; TextDrawShowForPlayer(i, Jailtime[i]); if(PlayerInfo[i][pJailTime]/60 > 1) format(string, sizeof(string), "Jail time: ~r~%d minute", PlayerInfo[i][pJailTime]/60); else if(PlayerInfo[i][pJailTime]/60 == 1) format(string, sizeof(string), "Jail time: ~r~%d minut", PlayerInfo[i][pJailTime]/60); else if(PlayerInfo[i][pJailTime]/60 == 0) format(string, sizeof(string), "Jail time: ~r~%d secunde", PlayerInfo[i][pJailTime]); TextDrawSetString(Jailtime[i], string); } } if(PlayerInfo[i][pJailTime] <= 0) { PlayerInfo[i][pJailTime] = 0; if(PlayerInfo[i][pJailed] == 1) { PutPlayerInJail(i); } PlayerInfo[i][pJailed] = 0; Update(i, pJailTimex); Update(i, pJailedx); SpawnPlayer(i); SetPlayerSpecialAction(i,SPECIAL_ACTION_NONE); RemovePlayerAttachedObject(i,1); TextDrawHideForPlayer(i, Jailtime[i]); if(PlayerInfo[i][pChar] > 0) SetPlayerSkinEx(i, PlayerInfo[i][pChar]); else SetPlayerSkinEx(i, PlayerInfo[i][pModel]); ClearCrime(i); PlayerInfo[i][pAJail] = 0; UpdateVar(i, "AJail", 0); SetPlayerToTeamColor(i); TogglePlayerControllable(i, 1); } } if(PlayerInfo[i][pHitT] > 0) PlayerInfo[i][pHitT] -= 1; if(PlayerInfo[i][pMuted] > 0) { if(PlayerInfo[i][pMuteTime] > 0) PlayerInfo[i][pMuteTime]--; if(PlayerInfo[i][pMuteTime] <= 0){ PlayerInfo[i][pMuteTime] = 0; SendClientMessage(i, COLOR_GREY, "You have now been automatically unmuted."); PlayerInfo[i][pMuted] = 0; } } if(targetfind[i] >= 0 && UsedFind[i] == 1) { new target, j; target = targetfind[i]; if(Spectate[target] != 255) { PlayerTextDrawHide(i, FindTD); DisablePlayerCheckpointEx(i); SCM(i, COLOR_YELLOW, "Acel admin este ocupat! Checkpoint dezactivat."); targetfind[i] = -1; CP[i] = 0; UsedFind[i] = 0; } else { if(InBussines[target] > 0) { j = InBussines[target]; SetPlayerCheckpointEx(i,BizzInfo[j][bEntranceX], BizzInfo[j][bEntranceY], BizzInfo[j][bEntranceZ],4); format(szTD, sizeof(szTD), "Name: ~b~~h~%s (%d)~w~~h~~n~Distance: ~b~~h~%0.1f m (%s)", GetName(targetfind[i]), targetfind[i], GetPlayerDistanceFromPoint(i, BizzInfo[j][bEntranceX], BizzInfo[j][bEntranceY], BizzInfo[j][bEntranceZ]), GetCity(target)); PlayerTextDrawSetString(i, FindTD, szTD); PlayerTextDrawShow(i, FindTD); } else if(InHouse[target] > 0) { j = InHouse[target]; SetPlayerCheckpointEx(i,HouseInfo[j][hEntrancex],HouseInfo[j][hEntrancey],HouseInfo[j][hEntrancez],4); format(szTD, sizeof(szTD), "Name: ~b~~h~%s (%d)~w~~h~~n~Distance: ~b~~h~%0.1f m (%s)", GetName(targetfind[i]), targetfind[i], GetPlayerDistanceFromPoint(i, HouseInfo[j][hEntrancex],HouseInfo[j][hEntrancey],HouseInfo[j][hEntrancez]), GetCity(target)); PlayerTextDrawSetString(i, FindTD, szTD); PlayerTextDrawShow(i, FindTD); } else if(InHQ[target] != -1) { j = InHQ[target]-1; SetPlayerCheckpointEx(i,DynamicFactions[j][fcX],DynamicFactions[j][fcY],DynamicFactions[j][fcZ],4); format(szTD, sizeof(szTD), "Name: ~b~~h~%s (%d)~w~~h~~n~Distance: ~b~~h~%0.1f m (%s)", GetName(targetfind[i]), targetfind[i], GetPlayerDistanceFromPoint(i, HQPos[j][0],HQPos[j][1],HQPos[j][2]), GetCity(target)); PlayerTextDrawSetString(i, FindTD, szTD); PlayerTextDrawShow(i, FindTD); } else { GetPlayerPos(target,x,y,z); SetPlayerCheckpointEx(i,x,y,z,4); format(szTD, sizeof(szTD), "Name: ~b~~h~%s (%d)~w~~h~~n~Distance: ~b~~h~%0.1f m (%s)", GetName(targetfind[i]), targetfind[i], GetPlayerDistanceFromPoint(i, x,y,z), GetCity(target)); PlayerTextDrawSetString(i, FindTD, szTD); PlayerTextDrawShow(i, FindTD); } } } if(PlayerTazeTime[i] >= 1) { PlayerTazeTime[i] += 1; if(PlayerTazeTime[i] == 15) PlayerTazeTime[i] = 0; else { new Float:angle; GetPlayerFacingAngle(i, angle); SetPlayerFacingAngle(i, angle + 90); } } if(PlayerDrunk[i] >= 5) { PlayerDrunkTime[i] += 1; if(PlayerDrunkTime[i] == { PlayerDrunkTime[i] = 0; LoopingAnim(i,"PED","WALK_DRUNK",4.0,1,1,1,1,0); SetPlayerDrunkLevel (i, 5000); } } if(PlayerStoned[i] >= 2) SetPlayerDrunkLevel (i, 5000); if(IsSmoking[i] > 0) { if(IsSmoking[i] == 0) { format(string, sizeof(string), "* %s a terminat de fumat tigara.", GetName(i)); ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); new Float: PlayerHealth; GetPlayerHealthEx(i, PlayerHealth); if(PlayerHealth >= 93) SetPlayerHealthEx(i, 99); else SetPlayerHealthEx(i, PlayerHealth+6); } IsSmoking[i] -= 1; } if(PlayerCuffed[i] == 1) { if(PlayerCuffedTime[i] <= 0) { TogglePlayerControllable(i, 1); PlayerCuffed[i] = 0; PlayerCuffedTime[i] = 0; PlayerTazeTime[i] = 1; } else PlayerCuffedTime[i] -= 1; } if(PlayerCuffed[i] == 2) { if(PlayerCuffedTime[i] <= 0) { //GameTextForPlayer(i, "~r~~h~Esti liber acum!", 2500, 3); TogglePlayerControllable(i, 1); PlayerCuffed[i] = 0; PlayerCuffedTime[i] = 0; } else PlayerCuffedTime[i] -= 1; } for(new sf = 0; sf < MAX_SAFEZONES; sf++) { if(PlayerToPoint(20.0, i, GraffitiInfo[sf][gfX], GraffitiInfo[sf][gfY], GraffitiInfo[sf][gfZ]) && Showed[i] == 0) { PlayerTextDrawSetString(i, SafeTD, "CLAN-ZONE"); PlayerTextDrawShow(i, SafeTD); Showed[i] = 2; SFID[i] = sf; } else if(!PlayerToPoint(20.0, i, GraffitiInfo[SFID[i]][gfX], GraffitiInfo[SFID[i]][gfY], GraffitiInfo[SFID[i]][gfZ]) && Showed[i] == 2) { PlayerTextDrawHide(i, SafeTD); Showed[i] = 0; SFID[i] = 0; } if(SafeZone[sf][szRange] >= 15) { if(PlayerToPoint(SafeZone[sf][szRange], i, SafeZone[sf][szX], SafeZone[sf][szY], SafeZone[sf][szZ]) && Showed[i] == 0) { Showed[i] = 1; SFID[i] = sf; PlayerTextDrawSetString(i, SafeTD, "SAFE-ZONE"); PlayerTextDrawShow(i, SafeTD); } else if(!PlayerToPoint(SafeZone[SFID[i]][szRange], i, SafeZone[SFID[i]][szX], SafeZone[SFID[i]][szY], SafeZone[SFID[i]][szZ]) && Showed[i] == 1) { Showed[i] = 0; SFID[i] = 0; PlayerTextDrawHide(i, SafeTD); } } } if(IsAMember(i)) { if(InWar[PlayerInfo[i][pMember]] == 1) { new faction = PlayerInfo[i][pMember]; for(new wi = 1; wi < sizeof(TurfInfo);wi++) { if((WarInfo[wi][wFaction] == faction) || (WarInfo[wi][wAttacker] == faction)) { new attackers = WarInfo[wi][wAttacker]; new defenders = WarInfo[wi][wFaction]; new uciderii = 0; uciderii += ucideri[i][wi]; new decesee = 0; decesee += decese[i][wi]; new Float: atscore = 0.0; new Float: defscore = 0.0; atscore = WarScoreF[attackers][wi]; defscore = WarScoreF[defenders][wi]; if(playerDeath[i] == 0 && GetPlayerInterior(i) == 0 && IsAMember(i) && GetPlayerVirtualWorld(i) == 0 && PlayerInfo[i][pWantedLevel] == 0 && PlayerInfo[i][pJailTime] == 0) { SetPlayerVirtualWorld(i, wi); format(string, sizeof(string), "Ai fost teleportat in virtual world-ul %d deoarece mafia ta este intr-un war.", wi); SCM(i, COLOR_YELLOW, string); } if(WarInfo[wi][wFaction] == faction) { format(string, sizeof(string), "Turf: %s (%d)~n~%s %.1f - %.1f %s~n~Ucideri: %d Decese: %d Scor: %d~n~Secunde pe turf: %d~n~Timp war: ~y~~h~%s~w~~h~", TurfInfo[wi][zName],wi,FactionName(attackers),atscore,defscore,FactionName(defenders), uciderii, decesee, uciderii-decesee, WarSeconds[i], CalculeazaTimp2(WarInfo[wi][wTime])); } if(WarInfo[wi][wAttacker] == faction) { format(string, sizeof(string), "Turf: %s (%d)~n~%s %.1f - %.1f %s~n~Ucideri: %d Decese: %d Scor: %d~n~Secunde pe turf: %d~n~Timp war: ~y~~h~%s~w~~h~", TurfInfo[wi][zName],wi,FactionName(attackers),atscore,defscore,FactionName(defenders), uciderii, decesee, uciderii-decesee, WarSeconds[i], CalculeazaTimp2(WarInfo[wi][wTime])); } } } PlayerTextDrawSetString(i, WarTime, string); PlayerTextDrawShow(i, WarTime); } if(IsPlayerInTurf(i, InWarTurf[PlayerInfo[i][pMember]])) { new turf = InWarTurf[PlayerInfo[i][pMember]]; if(WarInfo[turf][wFaction] == PlayerInfo[i][pMember] || WarInfo[turf][wAttacker] == PlayerInfo[i][pMember]) { if(IsPlayerPaused(i) == false) WarSeconds[i] ++; if(TurfTime[i] == 0 && IsPlayerInAnyVehicle(i)) SCM(i, COLOR_YELLOW, "Ai intrat pe teritoriu. Peste 10 secunde o sa fii dat jos din vehicul."); if(TurfTime[i] < 10) TurfTime[i] ++; if(TurfTime[i] == 10) { if(IsPlayerInAnyVehicle(i)) { new Float: Pos[3]; GetPlayerPos(i, Pos[0], Pos[1], Pos[2]); SetPlayerPosEx(i, Pos[0], Pos[1], Pos[2]+1); } } } } } if(IsPlayerInAnyVehicle(i)) { new Float: hpv; GetVehicleHealth(GetPlayerVehicleID(i), hpv); if(hpv == 1000.0) { for(new h = 1; h < sizeof(BizzInfo); h++) { if(IsPlayerInRangeOfPoint(i,10.0,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ])) { if(h == 24 || h == 25 || h == 23) { GivePlayerCash(i,-BizzInfo[h][bFee]); BizzInfo[h][bBalance] += BizzInfo[h][bFee]; Update(i, pCashx); for(new m; m < 2; m++) { if(PlayerInfo[i][pDailyMission][m] == 19) CheckMission(i, m); } format(string, sizeof(string), "~r~-$%d", BizzInfo[h][bFee]); GameTextForPlayer(i, string, 1000, 1); } } } SetVehicleHealth(GetPlayerVehicleID(i), 999); } } if(SpecialWeek == 1) { if(CheckObjects(i) < 15 && TutorialActive[i] == 0 && PlayerInfo[i][pBackpack] == 1) { szTD = ""; string = ""; new objs; for(new sq = 0; sq < 15; sq++) { if(PlayerInfo[i][pSpecialQuest][sq] == 0) { if(PlayerToPoint(45.0, i, QuestPos[sq][0], QuestPos[sq][1], QuestPos[sq][2])) { new Float: oPos[3]; GetPlayerObjectRot(i, PlayerInfo[i][pObjectQuest][sq], oPos[0], oPos[1], oPos[2]); SetPlayerObjectRot(i, PlayerInfo[i][pObjectQuest][sq], oPos[0], oPos[1], oPos[2]+35); format(string, sizeof(string), "~g~Object %d nearby~n~", sq+1), strcat(szTD, string), objs++; } else if(PlayerToPoint(75.0, i, QuestPos[sq][0], QuestPos[sq][1], QuestPos[sq][2])) format(string, sizeof(string), "~y~Object %d nearby~n~", sq+1), strcat(szTD, string), objs++; else if(PlayerToPoint(150.0, i, QuestPos[sq][0], QuestPos[sq][1], QuestPos[sq][2])) format(string, sizeof(string), "~r~Object %d nearby~n~", sq+1), strcat(szTD, string), objs++; PlayerTextDrawSetString(i, QuestTD, szTD); PlayerTextDrawShow(i, QuestTD); if(PlayerToPoint(1.0, i, QuestPos[sq][0], QuestPos[sq][1], QuestPos[sq][2])) { if(GetPlayerVirtualWorld(i) != 0) return SCM(i, COLOR_LGREEN, "Eroare: Nu poti lua acest obiect deoarece esti in alt virtual world!"); if(QuestDeelay[i] > 0) { format(string, sizeof(string), "Eroare: Poti lua un alt obiect peste %d secunde!", QuestDeelay[i]); SCM(i, COLOR_LGREEN, string); } else { if(IsPlayerInAnyVehicle(i)) SCM(i, COLOR_LGREEN, "Eroare: Nu poti colecta acest obiect deoarece esti intr-un vehicul!"); else { DestroyPlayerObject(i, PlayerInfo[i][pObjectQuest][sq]); PlayerInfo[i][pSpecialQuest][sq] = 1; SaveQuest(i); format(string, sizeof(string), "Ai gasit ~y~%d/100~w~~h~ obiecte pana acum.~n~Continua sa cauti pentru a primi premiul special!", CheckObjects(i)); PlayerTextDrawSetString(i, InfosTD, string); PlayerTextDrawShow(i, InfosTD); SetTimerEx("HideTextdraw", 4000, 0, "%d", i); if(CheckObjects(i) == 100) { format(string, sizeof(string), "["QUEST_NAME"] %s a terminat de colectat toate obiectele ascunse si a castigat premiul special!", GetName(i)); SendClientMessageToAll(COLOR_YELLOW, string); SCM(i, COLOR_YELLOW, "Felicitari! Ai terminat de colectat toate obiectele ascunse!"); SCM(i, COLOR_YELLOW, "Ai primit: 1.000.000$, 20 rp, 20 puncte rob, 20 puncte escape, 500 pp, 1 level up, 1 slot garaj."); GivePlayerCash(i, 1000000); PlayerInfo[i][pExp] += 20; PlayerInfo[i][pPremiumPoints] += 500; Update(i, pPremiumPointsx); Update(i, pRP); PlayerInfo[i][pRob] += 20; Update(i, pRobx); PlayerInfo[i][pEscapePoints] += 20; PlayerInfo[i][pLevel]++; Update(i,pLevelx); SetPlayerScore(i, PlayerInfo[i][pLevel]); UpdateVar(i, "EscapePoints", PlayerInfo[i][pEscapePoints]); PlayerTextDrawHide(i, QuestTD); if(PlayerInfo[i][pSlot][0] == 0) PlayerInfo[i][pSlot][0] = 1; else if(PlayerInfo[i][pSlot][1] == 0) PlayerInfo[i][pSlot][1] = 1; else if(PlayerInfo[i][pSlot][2] == 0) PlayerInfo[i][pSlot][2] = 1; else if(PlayerInfo[i][pSlot][3] == 0) PlayerInfo[i][pSlot][3] = 1; else if(PlayerInfo[i][pSlot][4] == 0) PlayerInfo[i][pSlot][4] = 1; else SCM(i, COLOR_LGREEN, "Nu ai primit un slot pentru vehicule deoarece ai numarul maxim de vehicule!"); UpdateSlots(i); } QuestDeelay[i] = 60; } } } } } if(objs == 0) PlayerTextDrawHide(i, QuestTD); } if(QuestDeelay[i] >= 1) QuestDeelay[i] --; } } } for(new i = 0; i < 3; i++) { if(PaintTime[i] == 0) { PaintTime[i] = -1; PaintText[i] = 60; } } OtherTimer(); return 1; }
  6. Salut! De la ce poate aparea eroarea asta in consola (se spameaza cu eroarea mai exact) si ma puteti ajuta sa o rezolv. Chestia asta apare doar cand intru pe server, iar serverul este pe localhost. [debug] AMX backtrace: [debug] #0 002a47d8 in ?? (0) from gamemode.amx [debug] #1 002c388c in public Timers () from gamemode.amx [debug] Run time error 4: "Array index out of bounds" [debug] Attempted to read/write array element at index 15 in array of size 15
  7. Salut, am patit si eu aceeasi problema. Verifica in fisiere la pagina respectiva sa fie compatibil cu baza de date. Dupa ce e compatibil o sa iti afiseze.
  8. Este comanda default burned. Nu e modificat absolut nimic. Am incercat sa o rescriu si efectiv nu reusesc sa remediez problema. Ideea e ca comanda mergea perfect, dar dintr-o dată nu mai merge la mafii.
  9. Revin cu reply dupa mult mult timp Am refacut comanda si efectiv nu-i dau de cap. Am redeschis un topic, poate poate se gaseste o rezolvare Cel mai probabil altceva creeaza problema.
  10. Salut, nu reusesc nici cum sa gasesc o rezolvare pentru problema asta. Am incercat sa rescriu comanda, dar ceva imi spune ca nu de la comanda se trage aceasta problema. Comanda /setleader merge la orice factiune inafara de mafii. Daca pun spre exemplu /setleader id 4 (id groove) imi spune comanda inexistenta. (Comanda are return 1; la sfarsit) Gamemode-ul este Burned default la baza. Vreo idee ? Comanda: CMD:setleader(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_WHITE, AdminOnly); new id,level,string[180]; if(sscanf(params, "ui",id,level)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/setleader <playerid/name> <faction>"); if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat."); if(level > 15 || level < 0) return SendClientMessage(playerid, COLOR_WHITE, "Invalid ID. (1-15)."); if(PlayerInfo[id][pMember] > 0 && PlayerInfo[id][pLeader] > 0) return SendClientMessage(playerid,COLOR_WHITE, "Acel player este intr-o factiune."); format(string, sizeof(string), "%s este noul lider al factiunii.", GetName(id)); SendFactionMessage(level, COLOR_CLIENT, string); new ftext[50]; format(ftext, sizeof(ftext), FactionName(level)); PlayerInfo[id][pMember] = level; if(PlayerInfo[playerid][pMember] == 11) finishAchievement(id, 29); else if(IsACop(playerid)) finishAchievement(id, 30); else if(IsAMember(playerid)) finishAchievement(id, 31); else finishAchievement(id, 28); PlayerInfo[id][pLeader] = level; FactionMembers[PlayerInfo[id][pMember]] ++; if(level == 0) { PlayerInfo[id][pChar] = 0; } else if(level == 1) { PlayerInfo[id][pChar] = 265; } //Police Departament else if(level == 2) { PlayerInfo[id][pChar] = 295; } //FBI else if(level == 3) { PlayerInfo[id][pChar] = 179; } //National Guard else if(level == 4) { PlayerInfo[id][pChar] = 270; } //Triad else if(level == 5) { PlayerInfo[id][pChar] = 292; } //Los Vagos else if(level == 6) { PlayerInfo[id][pChar] = 273; } //Ballas else if(level == 7) { PlayerInfo[id][pChar] = 258; } //School Instructors else if(level == 8) { PlayerInfo[id][pChar] = 59; } //Tow Car Company else if(level == 9) { PlayerInfo[id][pChar] = 228; } //News Reporters else if(level == 10) { PlayerInfo[id][pChar] = 296; } //Los Aztecas else if(level == 11) { PlayerInfo[id][pChar] = 294; } //Hitman else if(level == 12) { PlayerInfo[id][pChar] = 272; } //School Instructors else if(level == 13) { PlayerInfo[id][pChar] = 70; } //Paramedic if(IsACop(id)) SetPlayerSkinEx(id, 305); else SetPlayerSkinEx(id, PlayerInfo[id][pChar]); PlayerInfo[id][pRank] = 7; SetPlayerToTeamColor(id); new query[256]; format(string, sizeof(string), "%s este liderul factiunii %s.", GetName(id), ftext); if(PlayerInfo[id][pAdmin] < 6) { mysql_format(SQL, query, sizeof(query), "INSERT INTO faction_logs (`text`, `player`,`leader`) VALUES ('%s','%d','%d')", string, PlayerInfo[id][pSQLID],PlayerInfo[playerid][pSQLID]); mysql_tquery(SQL,query,"",""); } format(query,sizeof(query),"UPDATE users SET `Leader`='%d',`Member`='%d',`Rank`='7',`Team`='%d',`CChar`='%d' WHERE `ID`='%d'",PlayerInfo[id][pLeader],PlayerInfo[id][pMember],PlayerInfo[id][pTeam],PlayerInfo[id][pChar],PlayerInfo[id][pSQLID]); mysql_query(SQL,query); format(string, sizeof(string), "L-ai promovat pe %s ca lider la factiunea %s.", GetName(id),ftext); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "Admin %s te-a promovat ca lider al factiunii %s.", GetName(playerid),ftext); SendClientMessage(id, COLOR_LIGHTBLUE, string); return 1; }
  11. Nup, nu merge. E alta problema care habar nu am de unde provine. Prin schimbarea SCM cu SendClientMessage nu prea se schimba nimic, iar textdraw-urile alea nu prea isi au locul acolo deoarece oricum nu am textdraw-urile in sine. Mersi oricum de ajutor.
  12. Salut! Acum ceva timp a aparut o problema cu comanda /setleader . Mai exact, cand dau setleader cuiva in mafie spune ca comanda nu exista si ii seteaza rank 0 in mafia respectiva. Comanda a mers perfect, nu inteleg ce a patit. Gamemode-ul este burned original la baza. Ma poate ajuta cineva? In comanda nu am umblat deloc, doar ce am modificat in loc de //School Instructors in SFPD unde pune skin-ul. Poze: https://imgur.com/a/A1sYTrO Comanda: https://pastebin.com/Ukzz0HwK Video:
  13. Salut, vreau sa fac o verificare care sa verifice daca o casa este sau nu detinuta, Gamemode-ul este burned la baza, la case fie ca sunt luate fie ca nu tabelul Owned este mereu 1 datorita sistemului de licitatie. Se poate face cumva o verificare de exemplu: if(houseowner != The State) sau ceva de genul?
  14. Salut, stie cineva de unde pot scoate aceste flacari ? Banuiesc ca sunt de la sistemul de la paramedic. Apar random pe mapa desi nu ar trebui sa fie acolo. Sistemul merge nu am umblat la el. Poza: https://imgur.com/a/PBOFXh8
  15. Salut, am adaugat un sistem de garaje pe server, iar acum cand am pus sa poti cumpara din /hmenu , imi da error 040: duplicate "case" label (value 410) . Dialog-ul este DIALOG_HOUSEBUYGARAGE , am verificat exista doar acesta nu mai este altul numit la fel. De la ce poate fi ? Gamemode-ul este burned la baza.
  16. Am facut sistemul destul de bine doar ca la restart serverul nu mai ia in considerare ca in baza de date e 1. Am si la LoadCar puse stage-urile dar degeaba, nu mi le incarca. Gamemode-ul la baza este Burned
  17. Da, daca deja are stage1 sa nu mai poata lua inca odata. Merge restrictia dar la restart nu ia in considerare valoarea 1 din baza de date
  18. Salut! Am si eu o problema. Am facut un sistem de stage la masini, merge tot mai putin o chestie. Mai exact, dupa restart, ma lasa sa fac upgrade la stage chiar daca am facut deja la acea masina. In baza de date se updateaza bine, daca e 1 si dau restart ma lasa sa fac iar upgrade chiar daca in baza este deja 1. Ma poate ajuta cineva?
  19. +1 , respect ! Mersi de ajutor !
  20. Am pus si new Pet[MAX_PLAYERS]; dar imi da o eroare si multe warning-uri: https://imgur.com/a/TqIusFh
  21. Salut, am luat un sistem de pet de pe un gm si imi da o eroare, probabil nu am pus ceva. Ma poate ajuta cineva? Poza: https://imgur.com/a/HeVDlOp
  22. Salut! Vreau sa fac o comanda sa vad cati bani sunt in seif-ul clanului.. Ma poate ajuta cineva? Nu stiu cum sa fac sa apara valoarea din baza de date. Daca in baza de date este 50 de exemplu, vreau sa apara si la comanda.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.