Jump to content

Gabriel03

Membru
  • Posts

    123
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Gabriel03

  1. Salut! Nu stiu daca este bine pus topicul aici insa as dorii sa imi dati niste idei pentru o melodie cand intri pe server. Multumesc!
  2. Burned Mega Edit eu asa stiu si + ca e pe net de mult timp si doar a copiat :)))
  3. AnrediGB e cel mai slab om la scripting =)))
  4. La o scala mare da, poate sa faca o diferenta enorma! Una e cand folosesti switch-ul la cateva persoane si una este cand o folosesti la 300 de persoane, toate secundele alea o sa conteze pentru a face un joc cat mai fluent pentru jucatorii tai!
  5. T/C, exista deja un topic, nu mi-am dat seama!
  6. Salut! Am editat un gamemode burned, destul de mult insa am o mica problema: Optimizarile! Am sters sistemul de CS:GO, am lasat doar paintball-ul am schimbat if-urile cu switchurile am micsorat stringurile insa tot nu este de ajuns... Uneori sunt si 170 de tickuri pe server la cateva persoane ( Chestia asta tine si de host ce-i drept, care mi-a facut nervi in ultimele zile ) si as dorii sa stiu ce optimizari sa ii mai fac, ce sa mai sterg din el, etc...
  7. Mi-am dat seama ca e retoric ce spui acolo :))))
  8. Presupun ca e gm burned si daca da, daca nu i-ai adaugat o factiune, scoate tot ce are legatura cu factiunea 14 pentru ca nu exista in baza de date... function Copcar2(carid) { if(ServerVehicles[carid][vFaction] == 1) return 1; if(ServerVehicles[carid][vFaction] == 2) return 1; if(ServerVehicles[carid][vFaction] == 3) return 1; return 0; } YCMD:megaphone(playerid, params[], help) { new tmpcar = GetPlayerVehicleID(playerid),textmeg[250],string[200]; if(PlayerInfo[playerid][pMuted] == 1) { format(string, sizeof(string), "You can't talk right now! You are muted. (%d seconds)",PlayerInfo[playerid][pMuteTime]); SCM(playerid, COLOR_GREY, string); return 1; } if(sscanf(params, "s[250]", textmeg)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/m <text>"); if(!IsACop(playerid)) return SCM(playerid, COLOR_GREY, "Nu faci parte din factiunea politiei."); if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece nu esti la datorie!"); if(!Copcar2(tmpcar)) return SCM(playerid, COLOR_GREY, "Nu esti intr-un vehicul de-al factiunii."); if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) format(string, sizeof(string), "> Ofiter %s: %s <", GetName(playerid), textmeg); else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2) format(string, sizeof(string), "> Agent %s: %s <", GetName(playerid), textmeg); else if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3) format(string, sizeof(string), "> Soldat %s: %s <", GetName(playerid), textmeg); ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); return 1; }
  9. Incearca asta, ca are dreptate!
  10. In primul rand foloseste comanda /tde box si muta mai sus bara cu unelte pentru a punte textdrawul jos de tot in colt
  11. Nu stiu daca are legatura cu comanda ( probabil nu ai copiat tu corect ) Lipseste un "}" dupa return 1;
  12. Foarte asemanator cu Arizona RP, la fel si asta:
  13. Bine poate am gresit eu ca m-am luat de gramatica lui insa sistemele sunt luate de la rusi garantat! Am avut ocazia sa am pe maini un gamemode arizona rp de la un rus care a fost scripter acolo si sunt sisteme foarte asemanatoare...
  14. Sisteme luate de la rusii. La niste textdraw-uri ai furat de la Arizona RP... Sa nu mai vorbesc de gramatica ta slaba
  15. Am rezolvat, mersi ca mi-ai adus aminte de baza de date... Am sters tot din tabelul cu masini personale dar am uitat sa sterg si din tabelul cu jucatori Car Key-urile...
  16. Nu merge comanda /v, nu apare dialogul. Server Log: [03:59:13] [debug] Run time error 4: "Array index out of bounds" [03:59:13] [debug] Accessing element at negative index -400 Functia care ar trebuii sa arate dialogul stock ShowPlayerVehicle(playerid) { new szTitle[180], szDialog[2048], szDialog2[2048], vstatus[1024]; if(GetVehicles(playerid) == 0) return SendClientMessage(playerid, COLOR_LGREEN, "Eroare: Nu ai un vehicul personal!"); format(szTitle, sizeof(szTitle), "Vehicles (%d/%d)", GetVehicles(playerid), TotalSlots(playerid)); for(new i = 0; i < 10; i++) { if(i < 5) { if(i < 3) { if(PlayerInfo[playerid][pCarKey][i] != 0) { new car = PlayerInfo[playerid][pCarKey][i]; if(IsVehicleOccupied(CarInfo[car][Spawned])) format(vstatus, sizeof(vstatus), "{FFFF00}(Occupied){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]); else if(CarInfo[car][Spawned] > 0) format(vstatus, sizeof(vstatus), "{26B309}(Spawned){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]); else format(vstatus, sizeof(vstatus), "{FF0000}(Despawnat){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]); format(szDialog, sizeof(szDialog), "%s\n", vstatus); strcat(szDialog2, szDialog); } else strcat(szDialog2, "{FFD857}<slot liber>\n"), sVehicle[i][playerid] = 0; } else { if(PlayerInfo[playerid][pCarKey][i] != 0) { new car = PlayerInfo[playerid][pCarKey][i]; if(IsVehicleOccupied(CarInfo[car][Spawned])) format(vstatus, sizeof(vstatus), "{FFFF00}(Occupied){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]); else if(CarInfo[car][Spawned] > 0) format(vstatus, sizeof(vstatus), "{26B309}(Spawned){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]); else format(vstatus, sizeof(vstatus), "{FF0000}(Despawnat){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]); format(szDialog, sizeof(szDialog), "%s\n", vstatus); strcat(szDialog2, szDialog); } else if(PlayerInfo[playerid][pPremiumAccount] == 1) strcat(szDialog2, "{FFD857}<slot liber>\n"), sVehicle[i][playerid] = 0; } } else { if(PlayerInfo[playerid][pCarKey][i] != 0) { new car = PlayerInfo[playerid][pCarKey][i]; if(IsVehicleOccupied(CarInfo[car][Spawned])) format(vstatus, sizeof(vstatus), "{FFFF00}(Occupied){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]); else if(CarInfo[car][Spawned] > 0) format(vstatus, sizeof(vstatus), "{26B309}(Spawned){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]); else format(vstatus, sizeof(vstatus), "{FF0000}(Despawnat){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]); format(szDialog, sizeof(szDialog), "%s\n", vstatus); strcat(szDialog2, szDialog); } else if(PlayerInfo[playerid][pSlot][i-5] == 1) strcat(szDialog2, "{FFD857}<slot liber>\n"), sVehicle[i][playerid] = 0; } } ShowPlayerDialog(playerid, DIALOG_GARAGE, DIALOG_STYLE_LIST, szTitle, szDialog2, "Ok", "Exit"); return 1; } function LoadCar(id) { if(CarInfo[id][cModel] != 0) return 1; new query[256]; mysql_format(SQL, query, 128, "SELECT * FROM `cars` WHERE `ID`='%d'", id); new Cache: db = mysql_query(SQL, query); if(cache_get_row_count() > 0) { new i = 0; CarInfo[id][cID] = id; CarInfo[id][cModel] = cache_get_field_content_int(i, "Model"); CarInfo[id][cLocationx] = cache_get_field_content_float(i, "Locationx"); CarInfo[id][cLocationy] = cache_get_field_content_float(i, "Locationy"); CarInfo[id][cLocationz] = cache_get_field_content_float(i, "Locationz"); CarInfo[id][cAngle] = cache_get_field_content_float(i, "Angle"); CarInfo[id][cColorOne] = cache_get_field_content_int(i, "ColorOne"); CarInfo[id][cColorTwo] = cache_get_field_content_int(i, "ColorTwo"); cache_get_field_content(i, "Owner", CarInfo[id][cOwner], SQL, 129); cache_get_field_content(i, "Text", CarInfo[id][cText], SQL, 129); CarInfo[id][cTextColor] = cache_get_field_content_int(i, "ColorText"); CarInfo[id][cValue] = cache_get_field_content_int(i, "Value"); CarInfo[id][cDays] = cache_get_field_content_int(i, "days"); cache_get_field_content(i, "License", CarInfo[id][cLicense], SQL, 129); CarInfo[id][cAlarm] = cache_get_field_content_int(i, "Alarm"); CarInfo[id][cLock] = cache_get_field_content_int(i, "Lockk"); CarInfo[id][mod0] = cache_get_field_content_int(i, "mod0"); CarInfo[id][mod1] = cache_get_field_content_int(i, "mod1"); CarInfo[id][mod2] = cache_get_field_content_int(i, "mod2"); CarInfo[id][mod3] = cache_get_field_content_int(i, "mod3"); CarInfo[id][mod4] = cache_get_field_content_int(i, "mod4"); CarInfo[id][mod5] = cache_get_field_content_int(i, "mod5"); CarInfo[id][mod6] = cache_get_field_content_int(i, "mod6"); CarInfo[id][mod7] = cache_get_field_content_int(i, "mod7"); CarInfo[id][mod8] = cache_get_field_content_int(i, "mod8"); CarInfo[id][mod9] = cache_get_field_content_int(i, "mod9"); CarInfo[id][mod10] = cache_get_field_content_int(i, "mod10"); CarInfo[id][mod11] = cache_get_field_content_int(i, "mod11"); CarInfo[id][mod12] = cache_get_field_content_int(i, "mod12"); CarInfo[id][mod13] = cache_get_field_content_int(i, "mod13"); CarInfo[id][paintjob] = cache_get_field_content_int(i, "paintjob"); CarInfo[id][KM] = cache_get_field_content_float(i, "KM"); CarInfo[id][Userid] = cache_get_field_content_int(i, "Userid"); CarInfo[id][Confiscated] = cache_get_field_content_int(i, "Confiscated"); CarInfo[id][Spawned] = 0; CarInfo[id][cSpecial] = cache_get_field_content_int(i, "Special"); CarInfo[id][cTax] = cache_get_field_content_int(i, "Tax"); CarInfo[id][cPoints] = cache_get_field_content_int(i, "Points"); CarInfo[id][cFuel] = cache_get_field_content_int(i, "Fuel"); CarInfo[id][cNeon] = cache_get_field_content_int(i, "Neon"); cache_delete(db); } return 1; } Mersi anticipat!
  17. Nu ai fisierul .dll specificat si cat despre compilarea systems.inc: - .inc vine de la include care doar adauga liniile de cod in gamemode prin #include <systems> si acel tip de fisiere nu poate fi compilat. - Compileaza doar gamemodeul si o sa se compileze in el si acel include.
  18. Aceasta a fost rezolvarea, am incercat sa mai schimb inainte in mai mult dar tot nu mergea cred ca din cauza ca nu erau suficiente sloturi sa corespunda cu baza de date. Mersi mult ca mi-ai dat idea cu 300 Puteti da T/C
  19. Am folosit crashdetect si in loguri am primit asta: [09:31:01] [debug] Run time error 4: "Array index out of bounds" [09:31:01] [debug] Accessing element at index 100 past array upper bound 99 [09:31:01] [debug] AMX backtrace: [09:31:01] [debug] #0 00262cf4 in public LoadProperty () from wa-rpg.amx [09:31:01] [debug] #1 00093800 in public zcmd_OnGameModeInit () from wa-rpg.amx [09:31:01] [debug] #2 native CallLocalFunction () from samp03svr [09:31:01] [debug] #3 0001f9dc in public L_AFK_OnGM () from wa-rpg.amx [09:31:01] [debug] #4 native CallLocalFunction () from samp03svr [09:31:01] [debug] #5 00012c20 in public SSCANF_OnGameModeInit () from wa-rpg.amx Functia: function LoadProperty() { new result[180],index = 0; mysql_query(SQL,"SELECT * FROM `houses` ORDER BY `houses`.`ID` ASC"); mysql_store_result(); while(mysql_retrieve_row()) { housess++; index++; new i = index; mysql_get_field("ID", result); HouseInfo[i][hID] = strval(result); mysql_get_field("Entrancex", result); HouseInfo[i][hEntrancex] = floatstr(result); mysql_get_field("Entrancey", result); HouseInfo[i][hEntrancey] = floatstr(result); mysql_get_field("Entrancez", result); HouseInfo[i][hEntrancez] = floatstr(result); mysql_get_field("Exitx", result); HouseInfo[i][hExitx] = floatstr(result); mysql_get_field("Exity", result); HouseInfo[i][hExity] = floatstr(result); mysql_get_field("Exitz", result); HouseInfo[i][hExitz] = floatstr(result); mysql_get_field("Owner", result); strmid(HouseInfo[i][hOwner], result, 0, 32, 32); mysql_get_field("Discription", result); strmid(HouseInfo[i][hDiscription], result, 0, 24, 24); mysql_get_field("Value", result); HouseInfo[i][hValue] = strval(result); mysql_get_field("Hel", result); HouseInfo[i][hHel] = strval(result); mysql_get_field("Arm", result); HouseInfo[i][hArm] = strval(result); mysql_get_field("Interior", result); HouseInfo[i][hInterior] = strval(result); mysql_get_field("Lockk", result); HouseInfo[i][hLock] = strval(result); mysql_get_field("Owned", result); HouseInfo[i][hOwned] = strval(result); mysql_get_field("Rent", result); HouseInfo[i][hRent] = strval(result); mysql_get_field("Rentabil", result); HouseInfo[i][hRentabil] = strval(result); mysql_get_field("Takings", result); HouseInfo[i][hTakings] = strval(result); mysql_get_field("Level", result); HouseInfo[i][hLevel] = strval(result); mysql_get_field("Virtual", result); HouseInfo[i][hVirtual] = strval(result); mysql_get_field("Radio", result); HouseInfo[i][hRadio] = strval(result); UpdateLabel(1,HouseInfo[i][hID]); } mysql_free_result(); printf("Houses: %d", index); return 1; } Si aici aveti si definitiile: enum hInfo { hID, Float:hEntrancex, Float:hEntrancey, Float:hEntrancez, Float:hExitx, Float:hExity, Float:hExitz, hOwner[25], hDiscription[64], hValue, hHel, hArm, hInterior, hLock, hOwned, hRent, hRentabil, hTakings, hLevel, hVirtual, hPickupID, hRadio }; new HouseInfo[100][hInfo], Text3D:HouseLabel[sizeof(HouseInfo)]; Ceva idei?
  20. L-am incercat si imi da 435 de warninguri de tipul: warning 239: literal array/string passed to a non-const parameter
  21. Mda insa asta reflecta si optimizarea gm-ului daca folosesti pe cel original... Insa o sa il incerc si pe acesta
  22. Ok, mersi! Mda... Nu este chiar asa rau insa gm-ul se compileaza in 45-48 sec si as dori sa ajung undeva la 35-40
  23. Ai putea sa ne oferi liniile de cod...
×
×
  • 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.