Jump to content

TheGodfather

Membru
  • Posts

    500
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by TheGodfather

  1. Nu merge, tot primesc aceeasi eroare si daca am 2 sau mai multe masini spawnate cu /spawncar despawneaza doar una
  2. up
  3. Salut, am o comanda de /spawncar si una de /despawncars, cand spawnez 2 masini de exemplu, o despawneaza pe prima dar pe a doua nu cand dau /despawncars iar in loguri am eroarea asta: [19:24:22] [debug] [19:24:22] [debug] Parameter count corrections: [19:24:22] [debug] [19:24:22] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<2 arguments>` [19:24:22] [debug] [19:24:22] [debug] Run time error 4: "Array index out of bounds" [19:24:22] [debug] AMX backtrace: [19:24:22] [debug] #0 0038d318 in ?? (0, 23972552, 0) from B-HOOD.amx [19:24:22] [debug] #1 000552f4 in ?? (0, 23972504, 0) from B-HOOD.amx [19:24:22] [debug] #2 00057e4c in ?? (0, 23972504, 0, 0, 0, 0, 8, 0, 23972504, 0, ... <1073741813 arguments>) from B-HOOD.amx [19:24:22] [debug] #3 00022180 in public OnPlayerCommandText (0, 23972504) from B-HOOD.amx YCMD:spawncar(playerid, params[], help) { if(PlayerInfo[playerid][pAdmin] < 1) return SCMM(playerid, -1, AdminOnly); new model, color1, color2; if(sscanf(params, "iii", model, color1, color2)) return SCMM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/spawncar <Model> <color1> <color2>"); if(model < 400 || model > 611) return SCMM(playerid,-1, "Invalid car ID."); new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); new carid = CreateVehicleEx(model, X,Y,Z, 0.0, color1, color2, -1, 0); Gas[carid] = 100; SetVehicleNumberPlate(carid, "AdmCar"); Iter_Add(SpawnedCars, carid); LinkVehicleToInterior(carid, GetPlayerInterior(playerid)); SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid)); PutPlayerInVehicleEx(playerid, carid, 0); new idcar = GetPlayerVehicleID(playerid), vehicle = GetVehicleModel(idcar) - 400; SCMf(playerid, COLOR_LIGHTGOLD, "[/spawncar] {FFFFFF}You have spawned one %s, car model: %d and car ID: %d.", aVehicleNames[vehicle], model, carid); return true; } YCMD:despawncars(playerid, params[], help) { if(PlayerInfo[playerid][pAdmin] < 1) return SCMM(playerid, -1, AdminOnly); foreach(new i : SpawnedCars) Iter_Remove(SpawnedCars, i), DestroyVehicle(i), SCMf(playerid, -1, "%d", i); new string[100]; format(string, sizeof(string), "[/despawncars] {FFFFFF}Admin %s destroyed all spawned cars.", GetName(playerid)); if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LIGHTGOLD, string, 1); return true; }
  4. La fel face EDIT: Am scos -d3 cand compilez gamemodeul + scos de tot crashdetect si inlocuit cu jit si merge doar ca acum dureaza cam mult sa compileze, in jur de 9 secunde fara de vreo 3-4 inainte sa fac schimbarile astea, chiar daca gamemode-ul (.amx) are 8 MB. Aceste este compilerul { "cmd": ["pawncc.exe", "-i includes", "$file", "-;+", "-v2","-Z+","-\\)+"], "path": "C:/Users/crist/Desktop/HPQ123 samp gamemode actual cu tot ce trebuie/pawno" }
  5. Salut, am instalat pluginul JIT si am urmat tutorialul de aici: https://github.com/Zeex/samp-plugin-jit dar tot imi spune cand pornesc serverul ca nu am pluginul.
  6. Eu vreau ceva automat, nu pot pune ca la fiecare 10 secunde sa dea slap tururor jucatorilor se pe sv
  7. Multumesc pentru raspuns
  8. Salut, care este mai ok pentru urmatorul scenariu. Pentru a afisa numele liderilor online, unul sub altul pentru un jucator care scrie o comanda oarecare. Iteratorul: Iterator:PlayerLeaders<MAX_PLAYERS> urmat la o comanda oarecare foreach(new i : PlayerLeaders) SCMf(playerid, -1, "%s", GetName(i)); foreach: foreach(new i : Player) if(PlayerInfo[i][pLeader] != 0) SCMf(playerid, -1, "%s", GetName(i)); EDIT: Sa luam si alt caz, tot cel cu liderii doar sa zicem ca trebuie sa facem un array in care pentru fiecare jucator care are lider avem o variabila definita Leaders[MAX_PLAYERS] iar la logare daca e lider, jucatorul are Leaders[playerid] = 1.
  9. Salut, am observat ca dupa ce dau restart la server si nu ies de pe el, astept sa reporneasca, primesc mesajul Kicking "ip meu" because they didn't logon to the game. Dupa daca ies din joc si intru iar nu mai e nicio problema. Pot scoate aceasta chestie sau sa maresc timpul? Nu e ceva ce gasesc in gamemode sau in alte fisiere
  10. Daca nu sunt logat cu pin daca dau o comanda care nu exista imi arata bine, daca scriu de ex /a imi scrie sintaxa comenzii, dar ar trebui sa imi dea mesajul de aici if(strlen(PlayerInfo[playerid][pPin]) != 0 && PlayerInfo[playerid][pPinLogged] == 0) { SCMM(playerid, -1, "{FF6347}[PIN] {FFFFFF}You can not use commands because you did not enter a valid PIN!"); return COMMAND_OK; } Cu ok merge bine daca nu exista comanda, daca pun in loc de COMMAND_OK pun COMMAND_ZERO_RET indiferent daca comanda exista sau nu primesc mesajul default, SERVER: Unknown command
  11. if(success == COMMAND_OK) SpamCheck[playerid] = GetTickCount(); if(success == COMMAND_UNDEFINED) {SCMM(playerid, COLOR_GREY, "Error: Unknown command!"); return COMMAND_ZERO_RET;} Am pus asa la OnPlayerCommandReceived, indiferent de ce comanda introduc imi scrie mesajul default, SERVER: Unknown command. (nu cel pe care il am eu)
  12. Cineva?
  13. Multumesc. La OnPlayerCommandPerformed nu imi arata mesajul cu unknown command cand scriu o comanda care nu exista, aveti idee de ce? Am mai cautat solutii pe internet dar la toate e la fel public e_COMMAND_ERRORS:OnPlayerCommandPerformed(playerid, cmdtext[], e_COMMAND_ERRORS:success) { //antispam if(aspam[playerid] == 0 && PlayerInfo[playerid][pAdmin] < aspam[playerid] = 1; //antispam if(success == COMMAND_OK) { SpamCheck[playerid] = GetTickCount(); return COMMAND_OK; } SCMM(playerid, COLOR_GREY, "Error: Unknown command!"); return COMMAND_OK; }
  14. Am reusit sa rezolv asta, dar cand pornesc serverul pe localhost imi spune asta: EDIT: Am pus asta la inceput de gamemode #define CGEN_MEMORY 100000 dar primesc alte erori, pe langa astea 2: EDIT 2: Asta am rezolvat punand #define MAX_COMMANDS 1000 la inceput de gamemode. Legat de acele scriptfiles, ce pot face?
  15. Pentru if(success == ...) (39277) : warning 213: tag mismatch: expected tag "e_COMMAND_ERRORS", but found none ("_") Linia 39277 este penultima, cea cu unknown command
  16. Din sutele de erori/warninguri am reusit sa ajung doar la cateva: C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Visual\y_commands\y_commands_impl.inc(197) : error 025: function heading differs from prototype C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Visual\y_commands\y_commands_impl.inc(198) : error 025: function heading differs from prototype C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Coding\y_timers\..\y_malloc\y_malloc_warning.inc(7) : warning 237: user warning: y_malloc heap allocation is unstable. Use `YSI_NO_HEAP_MALLOC` to disable it, or `YSI_YES_HEAP_MALLOC` to disable this warning: git.io/YSI_HEAP_MALLOC C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(3294) : warning 213: tag mismatch: expected tag "Timer", but found none ("_") C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(39197) : error 025: function heading differs from prototype C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(39270) : error 025: function heading differs from prototype C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(46781) : error 017: undefined symbol "_is_now_DYNAMIC_MEMORY_"
  17. M-a rupt... C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Data\y_foreach\..\..\YSI_Core\y_core\y_utils_impl.inc(236) : warning 219: local variable "ip" shadows a variable at a preceding level C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Data\y_foreach\..\..\YSI_Core\y_core\y_utils_impl.inc(901) : warning 219: local variable "ip" shadows a variable at a preceding level C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Data\y_foreach\..\..\YSI_Coding\y_va\..\..\YSI_Core\y_core\..\..\amx\disasm.inc(111) : warning 219: local variable "ip" shadows a variable at a preceding level C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Data\y_foreach\..\..\YSI_Coding\y_va\..\..\YSI_Core\y_core\..\..\amx\disasm.inc(144) : warning 219: local variable "ip" shadows a variable at a preceding level C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Data\y_foreach\..\..\YSI_Coding\y_hooks\y_hooks_impl.inc(659) : warning 219: local variable "sName" shadows a variable at a preceding level C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Data\y_foreach\y_foreach_iterators.inc(117) : error 017: undefined symbol "MAX_ACTORS" C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Data\y_foreach\y_foreach_iterators.inc(120) : error 017: undefined symbol "MAX_ACTORS" C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Data\y_foreach\y_foreach_iterators.inc(122) : error 017: undefined symbol "MAX_ACTORS" C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Data\y_foreach\y_foreach_iterators.inc(395) : error 017: undefined symbol "MAX_ACTORS" C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Visual\y_commands\y_commands_impl.inc(197) : error 025: function heading differs from prototype C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Visual\y_commands\y_commands_impl.inc(198) : error 025: function heading differs from prototype C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\YSI_Coding\y_timers\..\y_malloc\y_malloc_warning.inc(7) : warning 237: user warning: y_malloc heap allocation is unstable. Use `YSI_NO_HEAP_MALLOC` to disable it, or `YSI_YES_HEAP_MALLOC` to disable this warning: git.io/YSI_HEAP_MALLOC C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\dropAir.inc(64) : error 021: symbol already defined: "@yH_OnPlayerConnect@004" C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\dropAir.inc(64) : warning 209: function "@yH_OnPlayerConnect@004" should return a value C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\dropAir.inc(65) : error 021: symbol already defined: "@yH_OnPlayerDisconnect@004" C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\dropAir.inc(120) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\pawno\include\dropAir.inc(185) : error 017: undefined symbol "DONT_USE" C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(180) : error 021: symbol already defined: "Range" C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(190) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(201) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(232) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(278) : error 017: undefined symbol "DONT_USE" C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(353) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(358) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(358) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(362) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(367) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(367) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(372) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(377) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(377) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(381) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(386) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(386) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(397) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(397) : warning 215: expression has no effect C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(402) : error 076: syntax error in the expression, or invalid function call C:\Users\crist\Desktop\HPQ123 samp gamemode actual cu tot ce trebuie\gamemodes\B-HOOD.pwn(402) : error 076: syntax error in the expression, or invalid function call
  18. Am mai rezolvat alte erori dupa modelul tau, dar desigur vin alte erori De exemplu la linia timer... warning 208: function with tag result used before definition, forcing reparse
  19. Da, acum primesc eroarea asta: fatal error 100: cannot read from file: "YSI\y_hooks". Am incercat sa pun fisierul y_hooks in fisierul YSI dar primesc aceeasi eroare
  20. Imi spune asta: fatal error 100: cannot read from file: "YSI_Data\y_iterate"
  21. Aceeasi eroare, cea cu natives
  22. Da
  23. Am dat putin mai sus un reply catre Banditul legat de eroarea pe care o primesc dupa ce am pus ultima versiune de YSI. Folosesc Zeex compiler.
  24. Dupa ce am pus ce este acolo in includes, primesc mesajul acesta: ...\pawno\include\foreach.inc(230) : fatal error 100: cannot read from file: "YSI\internal\y_natives"
×
×
  • 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.