Jump to content

TheGodfather

Membru
  • Posts

    500
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by TheGodfather

  1. Salut, as vrea ca dupa restart sa imi puna valoarea pe care a avut-o job goal-ul inainte de restart. Job goal-ul se salveaza bine in baza de date de fiecare data cand un player face job. Doar ca atunci cand pornesc server-ul din nou o sa aiba valoarea 0. function UpdateJobGoal(update) { ServerGoal += update; gString[0] = EOS; format(gString, 60, "~y~$%s ~w~/ ~r~$%s", ServerGoal >= MAXGOAL ? FormatNumbers(MAXGOAL) : FormatNumbers(ServerGoal), FormatNumbers(MAXGOAL)); TextDrawSetString(GoalTD[0], gString); if(TerminatJobGoal != 1) { //goal gQuery[0] = EOS; mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `stuff` SET `goal`='%d'", ServerGoal); mysql_tquery(SQL, gQuery, "", ""); //goal if(ServerGoal >= MAXGOAL) { foreach(Player, b) { new amount, rand = random(30); switch(rand) { case 0..10: { amount = RandomEx(50, 100); format(gString, 100, "Job Goal: {FFFFFF}Congratulations! You received %d Gift Points because the job goal is full.", amount); SCM(b, 0xF5C738FF, gString); PlayerInfo[b][pGiftPoints] += amount; if(PlayerInfo[b][pGiftPoints] >= 500) PlayerInfo[b][pGiftPoints] = 500; Update(b, pGiftPointsx); } case 11..19: { amount = RandomEx(15, 30); format(gString, 100, "Job Goal: {FFFFFF}Congratulations! You received %d Premium Points because the job goal is full.", amount); SCM(b, 0xF5C738FF, gString); PlayerInfo[b][pPremiumPoints] += amount; Update(b, pPremiumPointsx); } default: { amount = RandomEx(200, 300); format(gString, 100, "Job Goal: {FFFFFF}Congratulations! You received %d Q-Points because the job goal is full.", amount); SCM(b, 0xF5C738FF, gString); PlayerInfo[b][pHpoints] += amount; Update(b, pHpointsx); } } } TerminatJobGoal = 1; } } return true; } GoalTD[0] este definit astfel in Booter.inc GoalTD[0] = TextDrawCreate(320.281829, 435.829803, "~y~$0~w~ /~g~ $50.000.000"); Goal-ul se salveaza aici: stuff - goal
  2. Da, acolo sunt stocate. Da, ajung in vw 0 pentru ca ma duceam in vw 0 si vedeam majoritatea masinilor de la factiune acolo, cand ele trebuiau sa fie in vw 3. Doar 4-5 masini din vreo 14 erau in vw 3, restul 0. YCMD:attack(playerid, params[], help) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); if(!IsAMember(playerid)) return SCM(playerid,COLOR_GREY, "You are not part of a mafia."); if(PlayerInfo[playerid][pRank] < 7) return SCM(playerid,COLOR_LIGHTBLUE,"You do not have rank 7."); new turf,string[100]; for(new i = 0; i < sizeof(TurfInfo); i++) { if(IsPlayerInTurf(playerid, i) == 1) { turf = i; break; } } new hour,minutes,second, year, month, day; gettime(hour,minutes,second); getdate(year, month, day); new days[180]; format(days, sizeof(days), GetWeekDay(day, month, year)); if(PlayerInfo[playerid][pAdmin] < { if(GetFactionMembersOn2(PlayerInfo[playerid][pMember]) < 2) return SCM(playerid, COLOR_LGREEN, "You can not use this command because there are less than 3 members connected from your faction!"); if(GetFactionMembersOn2(TurfInfo[turf][zOwned]) < 2) return SCM(playerid, COLOR_LGREEN, "You can not use this command because there are less than 3 members connected from the faction owning the territory!"); } if(turf == 0) return SCM(playerid, COLOR_WHITE, "You are not on a territory!"); new faction = PlayerInfo[playerid][pMember]; if(TurfInfo[turf][zOwned] == faction) return SCM(playerid, COLOR_GREY, "You can not attack the turf of your mafia."); if(WarInfo[turf][wAttacker] != 0) return SCM(playerid, COLOR_WHITE, "That turf is already attacked."); if(InWar[faction] == 1) return SCM(playerid, COLOR_WHITE, "There is an active war."); if(InWar[TurfInfo[turf][zOwned]] == 1) return SCM(playerid, COLOR_WHITE, "This mafia already has an active war."); if(FactionDeelay[PlayerInfo[playerid][pMember]] != 0 && PlayerInfo[playerid][pAdmin] < { format(string, sizeof(string), "You can use this command after %d minutes (%d seconds).", FactionDeelay[PlayerInfo[playerid][pMember]]/60, FactionDeelay[PlayerInfo[playerid][pMember]]); SCM(playerid, COLOR_LGREEN, string); return true; } format(string, sizeof(string), "[WAR] %s started a war with %s.",FactionName(PlayerInfo[playerid][pMember]), FactionName(TurfInfo[turf][zOwned])); SendAdminMessage(COLOR_LOGS, string, 1); format(string, sizeof(string), "[WAR] %s attacked territory %d owned by faction %s.",GetName(playerid),turf+1,FactionName(TurfInfo[turf][zOwned])); SendFactionMessage(faction,COLOR_MONEY,string); format(string, sizeof(string), "[WAR] %s (%s) attacked territory %d owned by faction %s.",FactionName(WarInfo[turf][wAttacker]),GetName(playerid),turf, FactionName(TurfInfo[turf][zOwned])); SendFactionMessage(TurfInfo[turf][zOwned],COLOR_MONEY,string); new query[128]; mysql_format(SQL, query,sizeof(query),"UPDATE `turfs` SET `Time`='24' WHERE `ID`='%d'",turf); mysql_tquery(SQL,query, "", ""); TurfInfo[turf][zTime] = 24; if(PlayerInfo[playerid][pAdmin] == WarInfo[turf][wTime] = 30; else WarInfo[turf][wTime] = 1200; WarInfo[turf][wAttacker] = faction; WarInfo[turf][wFaction] = TurfInfo[turf][zOwned]; worstscoreat[turf] = 0; worstmemberat[turf] = 999; bestscoreat[turf] = 0; bestmemberat[turf] = 999; worstscoredf[turf] = 0; worstmemberdf[turf] = 999; bestscoredf[turf] = 0; bestmemberdf[turf] = 999; InWar[TurfInfo[turf][zOwned]] = 1; InWar[faction] = 1; InWarTurf[faction] = turf; InWarTurf[TurfInfo[turf][zOwned]] = turf; foreach(Player, i) { if(IsPlayerLogged[i] == 1) { if(PlayerInfo[i][pMember] == faction || PlayerInfo[i][pMember] == TurfInfo[turf][zOwned]) UpdateVar(i, "WarTurf", turf); } } SetVehicle(faction, turf+1); SetVehicle(TurfInfo[turf][zOwned], turf+1); return true; }
  3. Am reusit sa rezolv partea cu /turfs. Dar acum masinile nu se spawneaza corect masinile in virtual world, de exemplu daca trebuie sa le puna in vw 3, unele le duce dar unele le lasa in vw 0. function SetVehicle(fid, turf) { for(new i = 1; i < MAX_SVEHICLES; i++) { if(ServerVehicles[i][vFaction] == fid) SetVehicleVirtualWorld(i, turf); } return true; }
  4. Sunt 34 de turfuri in total. enum zInfo { zID, zName[64], zOwned, zTime, Float:zMinX, Float:zMinY, Float:zMaxX, Float:zMaxY }; new TurfInfo[36][zInfo], Turfs[36];
  5. Salut, la gamemode-ul bhood hpq123 am observat ca dupa ce dau restart, turfurile se pun aiurea in /turfs. Cu siguranta mai sunt si alte probleme la sistemul de war. Aveti idee cum pot rezolva? Las mai jos ce tine de sistemul de war. YCMD:turfs(playerid, params[], help) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); if(TurfsDisp[playerid] == 0) { TurfsDisp[playerid] = 1; for(new i = 0; i < sizeof(Turfs); i++) { switch(TurfInfo[i][zOwned]) { case 0: GangZoneShowForPlayerEx(playerid, Turfs[i], 0xFFFFFFAA); //None case 4: GangZoneShowForPlayerEx(playerid, Turfs[i], 0x0CAB3C99); //Grove Street case 5: GangZoneShowForPlayerEx(playerid, Turfs[i], 0x11F2F299); //Los Vagos case 6: GangZoneShowForPlayerEx(playerid, Turfs[i], 0x8E541099); //Ballas case 10: GangZoneShowForPlayerEx(playerid, Turfs[i], 0xAB00FA99); //Los Aztecas } } SCM(playerid, -1, "You activated the turfs."); } else { TurfsDisp[playerid] = 0; for(new i = 0; i < sizeof(Turfs); i++) GangZoneHideForPlayerEx(playerid, Turfs[i]); SCM(playerid, -1, "You deactivated the turfs."); } return true; } function SQL_loadTurfs() { printf("Turfs: %d", cache_num_rows()); if(cache_num_rows() == 0) return true; new ORM:ormid; for(new i = 0; i < cache_num_rows(); i++) { ormid = orm_create("turfs"); orm_addvar_int(ormid, TurfInfo[i][zID], "ID"); orm_addvar_int(ormid, TurfInfo[i][zOwned], "Owned"); orm_addvar_float(ormid, TurfInfo[i][zMinX], "MinX"); orm_addvar_float(ormid, TurfInfo[i][zMinY], "MinY"); orm_addvar_float(ormid, TurfInfo[i][zMaxX], "MaxX"); orm_addvar_float(ormid, TurfInfo[i][zMaxY], "MaxY"); orm_apply_cache(ormid, i); } for(new i = 0; i < sizeof(TurfInfo); i++) Turfs[i] = GangZoneCreateEx(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY],TurfInfo[i][zID],1.0); return true; } Functia SQL_loadTurfs este folosita la OnGamemodeInit astfel: mysql_tquery(SQL, "SELECT * FROM `turfs`", "SQL_loadTurfs", ""); function OtherTimer() { new stringg[180], iswar; for(new w = 0; w < 16; w++) if(InWar[w] == 1) iswar = 1; if(iswar != 1) return true; for(new i = 0; i < sizeof(Turfs); i++) { new attackers = WarInfo[i][wAttacker]; new defenders = WarInfo[i][wFaction]; if(WarInfo[i][wTime] >= 2) { foreach(Player,j) { if(PlayerInfo[j][pMember] == attackers || PlayerInfo[j][pMember] == defenders) { if(WarInfo[i][wAttacker] == 4) GangZoneFlashForPlayer(j,Turfs[i], 0x0CAB3C99); else if(WarInfo[i][wAttacker] == 5) GangZoneFlashForPlayer(j,Turfs[i], 0x11F2F299); else if(WarInfo[i][wAttacker] == 6) GangZoneFlashForPlayer(j,Turfs[i], 0x8E541099); else if(WarInfo[i][wAttacker] == 10) GangZoneFlashForPlayer(j,Turfs[i], 0xAB00FA99); } } } if(WarInfo[i][wTime] > 0) { WarInfo[i][wTime] -= 1; foreach(Player,j) { if(IsPlayerInTurf(j,i) == 1) { if(PlayerInfo[j][pMember] == attackers) WarScoreF[attackers][i] += 0.002; if(PlayerInfo[j][pMember] == defenders) WarScoreF[defenders][i] += 0.002; } } if(WarInfo[i][wTime] == 1) { new Float: atscore = 0.0; new Float: defscore = 0.0; atscore = WarScoreF[attackers][i]; defscore = WarScoreF[defenders][i]; new winner; SetVehicle(attackers, 0); SetVehicle(defenders, 0); foreach(Player,j) { if(PlayerInfo[j][pMember] == attackers) { SCM(j, COLOR_MONEY, "--------------------- WAR Statistics ---------------------"); RespawnVehicle(attackers); GangZoneStopFlashForPlayer(j,Turfs[i]); format(stringg,sizeof(stringg),"War between %s and %s for turf %d is over.",FactionName(attackers),FactionName(defenders),i+1); SCM(j, COLOR_MONEY,stringg); //for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(j, 1001, 1001, 200); PlayerTextDrawHide(j, WarTime); } if(PlayerInfo[j][pMember] == defenders) { SCM(j, COLOR_MONEY, "--------------------- WAR Statistics ---------------------"); RespawnVehicle(defenders); GangZoneStopFlashForPlayer(j,Turfs[i]); format(stringg,sizeof(stringg),"War between %s and %s for turf %d is over.",FactionName(attackers),FactionName(defenders),i); SCM(j, COLOR_MONEY,stringg); //for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(j, 1001, 1001, 200); PlayerTextDrawHide(j, WarTime); } } DestroyPickups(i); if(atscore > defscore) winner = 1; else winner = 2; new winbest, losebest; new winbestj = -1, losebestj = -1; new bestname1[25],bestname2[25],bestname[25],worstname[25]; FactionDeelay[attackers] = 300; foreach(Player,j) { if(winner == 1) { if(PlayerInfo[j][pMember] == attackers) { winbest = bestscoreat[i]; if(bestmemberat[i] != 999) { if(PlayerInfo[bestmemberat[i]][pMember] == attackers) { winbestj = bestmemberat[i]; GetPlayerName(winbestj,bestname1,sizeof(bestname1)); strmid(bestname, bestname1, 0, strlen(bestname1), 255); } } else { format(bestname,sizeof(bestname),"Null"); strmid(bestname, bestname, 0, strlen(bestname), 255); } } if(PlayerInfo[j][pMember] == defenders) { losebest = worstscoredf[i]; if(worstmemberdf[i] != 999) { if(PlayerInfo[worstmemberdf[i]][pMember] == defenders) { losebestj = worstmemberdf[i]; GetPlayerName(losebestj,bestname2,sizeof(bestname2)); strmid(worstname, bestname2, 0, strlen(bestname2), 255); } } else { format(worstname,sizeof(worstname),"Null"); strmid(worstname, worstname, 0, strlen(worstname), 255); } } } if(winner == 2) { if(PlayerInfo[j][pMember] == defenders) { winbest = bestscoredf[i]; if(bestmemberdf[i] != 999) { if(PlayerInfo[bestmemberdf[i]][pMember] == defenders) { winbestj = bestmemberdf[i]; GetPlayerName(winbestj,bestname1,sizeof(bestname1)); strmid(bestname, bestname1, 0, strlen(bestname1), 255); } } else { format(bestname,sizeof(bestname),"Null"); strmid(bestname, bestname, 0, strlen(bestname), 255); } } if(PlayerInfo[j][pMember] == attackers) { losebest = worstscoreat[i]; if(worstmemberat[i] != 999) { if(PlayerInfo[worstmemberat[i]][pMember] == attackers) { losebestj = worstmemberat[i]; GetPlayerName(losebestj,bestname2,sizeof(bestname2)); strmid(worstname, bestname2, 0, strlen(bestname2), 255); } } else { format(worstname,sizeof(worstname),"Null"); strmid(worstname, worstname, 0, strlen(worstname), 255); } } } } foreach(Player,j) { new uciderii = 0; uciderii += ucideri[j][i]; new decesee = 0; decesee += decese[j][i]; ucideri[j][i] = 0; decese[j][i] = 0; if((PlayerInfo[j][pMember] == attackers) || (PlayerInfo[j][pMember] == defenders)) { SetPlayerVirtualWorld(j, 0); if(WarSeconds[j] >= 300) { //UpdateFactionRaport(j, 0); //edisonraport AddRaportPoint(j); //edisonraport } WarSeconds[j] = 0; if(winner == 1) { format(stringg,sizeof(stringg),"%s (%.1f) vs %s (%.1f).",FactionName(WarInfo[i][wAttacker]),atscore,FactionName(WarInfo[i][wFaction]),defscore); SCM(j, COLOR_MONEY,stringg); format(stringg,sizeof(stringg),"The best: %s (%d). The worst: %s (-%d).", bestname, winbest, worstname, losebest); SCM(j, COLOR_MONEY,stringg); format(stringg,sizeof(stringg),"Your statistics: Score %d (%d kills and %d deaths).",uciderii-decesee, uciderii, decesee); SCM(j, COLOR_MONEY,stringg); TurfInfo[i][zOwned] = WarInfo[i][wAttacker]; Wartimeon[j] = 0; } if(winner == 2) { format(stringg,sizeof(stringg),"%s (%.1f) vs %s (%.1f).",FactionName(WarInfo[i][wFaction]),defscore,FactionName(WarInfo[i][wAttacker]),atscore); SCM(j, COLOR_MONEY,stringg); format(stringg,sizeof(stringg),"The best: %s (%d). The worst: %s (-%d).", bestname, winbest, worstname, losebest); SCM(j, COLOR_MONEY,stringg); format(stringg,sizeof(stringg),"Your statistics: Score %d (%d kills and %d deaths).",uciderii-decesee,uciderii, decesee); SCM(j, COLOR_MONEY,stringg); Wartimeon[j] = 0; } SCM(j, COLOR_MONEY, "---------------------------------------------------------------"); WarScoreF[defenders][i] = 0.0; WarScoreF[attackers][i] = 0.0; InWar[attackers] = 0; InWar[defenders] = 0; } if(winner == 1) { GangZoneHideForPlayerEx(j,Turfs[i]); if(attackers == 4) GangZoneShowForPlayerEx(j,Turfs[i],0x0CAB3C99); if(attackers == 5) GangZoneShowForPlayerEx(j,Turfs[i],0x11F2F299); if(attackers == 6) GangZoneShowForPlayerEx(j,Turfs[i],0x8E541099); if(attackers == 10) GangZoneShowForPlayerEx(j,Turfs[i],0xAB00FA99); } } if(winner == 1) { new str[128]; mysql_format(SQL, str,128,"UPDATE `turfs` SET `Owned`='%d' WHERE `ID`='%d'",TurfInfo[i][zOwned],i); mysql_tquery(SQL,str, "", ""); } WarInfo[i][wTime] = 0; WarInfo[i][wFaction] = 0; WarInfo[i][wAttacker] = 0; worstscoreat[i] = 0; worstmemberat[i] = 999; bestscoreat[i] = 0; bestmemberat[i] = 999; worstscoredf[i] = 0; worstmemberdf[i] = 999; bestscoredf[i] = 0; bestmemberdf[i] = 999; mysql_tquery(SQL, "UPDATE `users` SET `WarTurf`='0', `WarKills`='0', `WarDeaths`='0'", "", ""); } } } return true; }
  6. Aceasta era problema, multumesc frumos pentru ajutor!
  7. Salut, masinile se respawneaza la un interval de timp daca cineva nu e in ele. Am pus peste tot unde e SetVehicleToRespawn() un mesaj unic, ca sa imi dau seama unde e problema. Dar cand masina se respawneaza nu apare niciun mesaj, tin sa mentionez ca mesajul e pus cu SendClientMessageToAll. Deci nu exista sansa sa se fi trimis si sa nu il fi vazut. Am gamemode hpq123 bhood.
  8. Am incercat si asta si nu a mers. Am rescris functia IsVehicleOccupied in alt mod si acum merge. Multumesc tuturor pentru reply-uri.
  9. Am pus cum ai zis si tot la fel face.
  10. Multumesc, voi incerca cand ajung acasa
  11. Am incercat si tot asa imi spune. Dupa ce dau /park, ma scoate din masina si cand dau /v imi spune ca e "occupied".
  12. Salut, cand dau /park, parcheaza masina corect dar daca ma uit in /v imi spune ca este "occupied" chiar daca eu nu mai sunt in ea. Ma scoate cand dau /park. YCMD:park(playerid, params[], help) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); new car = GetPlayerVehicleID(playerid); if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You are not in your vehicle."); if(Iter_Count(MyVehicle[playerid]) == 0) return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You do not have a personal vehicle!"); if(PersonalCar(playerid) == -1) return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You are not in one of your vehicles!"); if(GetPlayerState(playerid) != 2) return SCM(playerid, COLOR_GREEN, "* You need to drive the car in order to use this command!"); new idd = PersonalCar(playerid); new Float: vhp; GetVehicleHealth(car, vhp); if(vhp < 800) return SCM(playerid, COLOR_GREY, "You can not park the car because it has less than 800 'health'!"); if(PlayerToPoint(150, playerid, 564.1226, -1270.0704, 17.2477)) return SCM(playerid, COLOR_ERROR, "INFO: {FFFFFF}You can not park the car near the spawn."); new Float:x, Float:y, Float:z, Float:a; saveTuning(playerid, CarInfo[idd][Spawned]); GetVehiclePos(car, x, y, z); GetVehicleZAngle(car, a); CarInfo[idd][cLocationx] = x; CarInfo[idd][cLocationy] = y; CarInfo[idd][cLocationz] = z; CarInfo[idd][cTime] = gettime()+600; CarInfo[idd][cAngle] = a; CarInfo[idd][cVirtual] = GetPlayerVirtualWorld(playerid); DestroyVehicle(car); if(strlen(CarInfo[idd][cText]) >= 3) { DestroyDynamicObject(nameobject[CarInfo[idd][Spawned]]); } CarInfo[idd][Spawned] = CreateVehicleEx(CarInfo[idd][cModel],CarInfo[idd][cLocationx],CarInfo[idd][cLocationy],CarInfo[idd][cLocationz],CarInfo[idd][cAngle],CarInfo[idd][cColorOne],CarInfo[idd][cColorTwo], -1, 0); SetVehicleVirtualWorld(CarInfo[idd][Spawned], CarInfo[idd][cVirtual]); attach_vip_text(idd); SetVehicleHealth(CarInfo[idd][Spawned], CarInfo[idd][cVip] ? 2000 : 1000); SetTunning(idd); SetVehicleNumberPlate(CarInfo[idd][Spawned], CarInfo[idd][cLicense]); saveCar(idd); new Float: Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); CarInfo[idd][cLastPos][0] = Pos[0]; CarInfo[idd][cLastPos][1] = Pos[1]; CarInfo[idd][cLastPos][2] = Pos[2]; return true; } function IsVehicleOccupied(vehicleid) return VehicleOccupied[vehicleid] != 0 ? (true) : (false); stock ShowPlayerVehicle(playerid, bool: type) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]); new szTitle[2000], szDialog[2000], x = 0; if(Iter_Count(MyVehicle[playerid]) == 0) return SCM(playerid, COLOR_LGREEN, "Error: You do not have a personal vehicle!"); format(szTitle, sizeof(szTitle), "Your Vehicles {E3DE31}%d/%d", Iter_Count(MyVehicle[playerid]), GetSlots(playerid)); strcat(szDialog, "Vehicul\tStatus\tDespawn Time\tOthers details\n"); foreach(MyVehicle[playerid], car) { format(szDialog, sizeof(szDialog), "%s%s\t%s\t%s\t%s\n", szDialog, aVehicleNames[CarInfo[car][cModel]-400], CarInfo[car][Spawned] != 0 ? IsVehicleOccupied(CarInfo[car][Spawned]) ? ("{FFFF00}[occupied]") : ("{26B309}[spawned]") : ("{FF0000}[despawned]"), CheckDespawnCar(car), TotalUp(car)); PlayerInfo[playerid][pCarKey][x] = car; x++; } ShowPlayerDialog(playerid, type ? DIALOG_STICKET : DIALOG_GARAGE, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog, "Ok", "Exit"); return true; }
  13. Salut, am un server de samp si am nevoie de o persoana care sa ma ajute cu popularea lui. Mai multe detalii discutam in privat, cine e interesat ma poate contacta pe discord: The Godfather#0066
  14. Am incercat pe localhost si si pe server dar nu face nimic din pacate.
  15. Astea sunt toate locurile in care apar cele 2 functii mentionate in ultimul mesaj scris de tine. public OnPlayerRequestClass(playerid, classid) { if(IsPlayerLogged[playerid] == 1) SpawnPlayer(playerid); return true; } function ShowExam(playerid, type) { if(StepExam[playerid] == 0) { for(new i = 0; i < 13; i++) PlayerTextDrawShow(playerid, ExamTD[i]); SelectTextDraw(playerid, 0x52EF4AFF); TogglePlayerControllable(playerid, false); InterpolateCameraPos(playerid, 2637.850830, -985.842224, 111.864707, 2637.850830, -985.842224, 111.864707, 1000); InterpolateCameraLookAt(playerid, 2635.984130, -985.135314, 107.280380, 2633.261962, -984.218200, 110.722541, 1000); SetPlayerInterior(playerid, 0); } ExamTime[playerid] = 30; PlayerTextDrawSetString(playerid, ExamTD[4], "~b~00:30"); switch(type) { case 0: { switch(StepExam[playerid]) { case 0: { PlayerTextDrawSetString(playerid, ExamTD[6], "On who you can make DM? (1/5)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. No one."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. Cops."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. Everyone."); } case 1: { PlayerTextDrawSetString(playerid, ExamTD[6], "What happens if you do C-Bug? (2/5)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. Nothing."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. I will be banned."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. I receive money."); } case 2: { PlayerTextDrawSetString(playerid, ExamTD[6], "With what this license helps me? (3/5)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. Access to weapons."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. Nothing."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. I will be kicked."); } case 3: { PlayerTextDrawSetString(playerid, ExamTD[6], "I can sell this license? (4/5)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. Yes."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. I can trade it."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. No."); } case 4: { PlayerTextDrawSetString(playerid, ExamTD[6], "I can use weapons without this license? (5/5)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. No."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. Yes."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. I will be kicked."); } case 5: { ExamHP[playerid] = 10; SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, true); for(new i = 0; i < 13; i++) PlayerTextDrawHide(playerid, ExamTD[i]); SetPlayerPosEx(false, playerid, 291.5567,-135.8325,1004.0625); CancelSelectTextDraw(playerid); SetPlayerInterior(playerid, 7); GivePlayerWeapon(playerid, 23, 10); SCM(playerid, COLOR_LIGHTBLUE, "License: {FFFFFF}Destroy this box."); ExamTime[playerid] = 0; } } } case 1: { switch(StepExam[playerid]) { case 0: { PlayerTextDrawSetString(playerid, ExamTD[6], "What i can do with a boat license? (1/4)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. To swim."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. To fish."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. To drive a boat."); } case 1: { PlayerTextDrawSetString(playerid, ExamTD[6], "where i am allowed to go? (2/4)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. Through LV."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. Through water."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. Through air."); } case 2: { PlayerTextDrawSetString(playerid, ExamTD[6], "How i start a boat? (3/4)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. Pressing key '2'."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. Using /engine."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. It starts automatically."); } case 3: { PlayerTextDrawSetString(playerid, ExamTD[6], "Are you allowed to take the boat on the dry land? (4/4)"); PlayerTextDrawSetString(playerid, ExamTD[10], "1. No."); PlayerTextDrawSetString(playerid, ExamTD[11], "2. Maybe."); PlayerTextDrawSetString(playerid, ExamTD[12], "3. Yes."); } case 4: { SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, true); for(new i = 0; i < 13; i++) PlayerTextDrawHide(playerid, ExamTD[i]); SetPlayerInterior(playerid, false); SetPlayerVirtualWorld(playerid, false); ExamCar[playerid] = CreateVehicleEx(446, 2232.7983,411.4962,-0.5455,316.5272, 1, 1, -1, 0); Gas[ExamCar[playerid]] = 100; ExamTime[playerid] = 0; CancelSelectTextDraw(playerid); CP[playerid] = 120; SetPlayerRaceCheckpointEx(playerid, 0, DMVBOAT[CP[playerid]-120][0], DMVBOAT[CP[playerid]-120][1], DMVBOAT[CP[playerid]-120][2], DMVBOAT[CP[playerid]-120][0], DMVBOAT[CP[playerid]-120][1], DMVBOAT[CP[playerid]-120][2], 10.0); new engine,lights,alarm,bonnet,boot,objective; SetVehicleParamsEx(ExamCar[playerid],engine,lights,alarm,1,bonnet,boot,objective); PutPlayerInVehicleEx(playerid, ExamCar[playerid], 0); } } } } return 1; } function Camera(playerid) { InterpolateCameraPos(playerid, 2206.400146, 2485.206787, 104.116271, 2065.331054, 2227.627197, 63.345684, 40000); InterpolateCameraLookAt(playerid, 2203.034667, 2482.306396, 101.822631, 2067.583007, 2231.956542, 62.256824, 40100); SetPlayerPosEx(false, playerid, 2269.6230, -74.9329, 26.7724); SetPlayerVirtualWorld(playerid, 9999); return true; }
  16. Si e ceva ciudat, nu patesc asta de fiecare data. Uneori ma da acolo, uneori nu. Fara sa schimb nimic la gamemode.
  17. Gamemode-ul este cel editat de hpq123, b-hood. Nu am schimbat nimic la onplayerspawn, mergea bine dar dupa un timp ma da acolo aiurea
×
×
  • 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.