Jump to content

Rayan

Membru
  • Posts

    198
  • Joined

  • Last visited

Profile Information

  • Level of knowledge
    Începător

Recent Profile Visitors

1,263 profile views

Rayan's Achievements

Community Regular

Community Regular (8/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

5

Reputation

  1. Din cate se pare, problema e la fixes.inc, l-am scos si acum merge totu perfect, deci nu era de la faptul ca foloseam si SetVehicleParamsEx..
  2. Mda, din cate vad problema e atunci cand ii dau /engine. new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective); vehEngine[vehicleid] = 1; si new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective); vehEngine[vehicleid] = 0; Doar atunci problema apare.. Vreo rezolvare? Am citit ceva pe wiki si cica nu prea se plac SetVehicleParamsForPlayer cu SetVehicleParamsEx, insa n-am idee de o rezolvare. Daca ai una..
  3. Am o problema cu aceasta functie. Am o comanda /lock, si cand o folosesc, trebuie sa incuie pentru toti jucatorii usile (masina sa fie locked), iar pentru mine sa fie deschisa. CMD:lock(playerid, params[]) { new vehicleid = user_vehicle[playerid]; foreach(new i : Player) { if(i != playerid) SetVehicleParamsForPlayer(vehicleid, i, 0, 1); } SetVehicleParamsForPlayer(vehicleid, playerid, 0, 0); return 1; } Totul merge ok, nimeni nu poate intra in masina, insa daca eu sunt detinatorul la masina, si ma urc in ea, dupa toti vor putea sa dea F, tinand cont ca am setat deja parametirii sa fie 1 (1 = locked).. si doar 0 (unlocked) pentru detinator (adica doar pentru mine).. Iar la OnVehicleStreamIn am asta: public OnVehicleStreamIn(vehicleid, forplayerid) { if(is_vehicle_personal[vehicleid] == 1) { if(!strcmp(vehicle_owner[vehicleid], PlayerInfo[forplayerid][pNormalName], true)) SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 0); // unlocked else SetVehicleParamsForPlayer(vehvicleid, forplayerid, 0, 1); // locked because is not the owner } return 1; } Nu inteleg unde e problema, am facut si un debug la functia SetVehicleParamsForPlayer si ce a iesit a fost asta: [16:45:56] SetVehicleParamsForPlayer(368,1,0,1) [16:45:56] SetVehicleParamsForPlayer(368,0,0,0) [16:45:56] SetVehicleParamsForPlayer(368,1,0,1) [16:45:56] SetVehicleParamsForPlayer(368,1,0,1) [16:45:57] SetVehicleParamsForPlayer(368,0,0,0) [16:45:57] SetVehicleParamsForPlayer(368,0,0,0) 1 == cel ce nu detinator 0 == jucatorul care detine masina 368 Totul merge ok, la /lock si la OnVehicleStreamIn sunt chemate si executate ok comenzile, insa cand owneru masinii se urca in ea, practic se deblocheaza pentru toti, iar functia SetVehicleParamsForPlayer nu e chemata (daca era chemata stiam ca e de la functia), chiar nu stiu unde e problema..
  4. hook OnPlayerConnect(playerid) { defer make_login_dee(playerid); return 1; } timer make_login_dee[5000](playerid) { // your code here. }
  5. Daca vrei sa faci scurtaturi pui in OnGamemodeIni asa: Command_AddAltNamed("adminhelp", "ah");
  6. Cel mai bine e sa folosesti include-ul asta Click
  7. Eu asta folosesc http://forum.sa-mp.com/showthread.php?t=598933
  8. Arata-ne functia sa vedem ce nu e bine
  9. Rayan

    Server crash

    ai dreptate, de la asta e, de exemplu am un clan inregistrat cu tag-ul [A] sunt 3 caractere care sunt minimile setate din samp default. e, daca ma conectez doar cu [A] si e un clan cu acest tag creat, server-ul primeste crash, deoarece incearca sa ii stearga tag-ul jucatorului fiind [A] il sterge si ramane cu niciun caracter in nickname. Ar trebui sa fac o verificare ca dupa ce ii sterge numele sa verific daca strlen < 3 sa ii dea kick pentru motiv nume prea scurt? edit; e ok daca pun asa? (conteaza daca e return 1 sau 0?) if(startdel > 0) { new end = strlen(playername); strdel(playername, startdel, end); if(strlen(playername) < 3) { SCM(playerid, -1, "Nickname prea scurt."); Kick(playerid); return 0; } SetPlayerName(playerid, playername); SetPVarInt(playerid, "with_clan_tag", 1); } else { strdel(playername, startdel, dellenght); if(strlen(playername) < 3) { SCM(playerid, -1, "Nickname prea scurt."); Kick(playerid); return 0; } SetPlayerName(playerid, playername); SetPVarInt(playerid, "with_clan_tag", 1); }
  10. Rayan

    Server crash

    cred ca asta: am recompilat gm-ul si am mai adaugat chestii si chiar numai stiu care era linia...dar asta mi se pare ca e GetPlayerName(playerid, numeJucator, sizeof(numeJucator));
  11. Salut, habar nu am de ce serverul a luat crash..nu mi s-a mai intamplat pana acum de la BanCheck(daca functia asta e); BanCheck: https://pastebin.com/hktHSTn6 server_logs [16:07:25] [connection] incoming connection: 85.186.179.25:53720 id: 9 [16:07:26] [join] renko has joined the server (9:85.186.179.25) [16:07:26] [debug] Server crashed while executing exgaming.amx [16:07:26] [debug] AMX backtrace: [16:07:26] [debug] #0 native SetPlayerName () from sscanf.so [16:07:26] [debug] #1 00309c10 in BanCheck (playerid=9) at D:\gamemode\gamemodes\exgaming.pwn:48376 [16:07:26] [debug] #2 00095690 in public OnPlPa_OnPlayerConnect (playerid=9) at D:\gamemode\gamemodes\exgaming.pwn:8218 [16:07:26] [debug] #3 native CallLocalFunction () from samp03svr [16:07:26] [debug] #4 000592dc in public inc_Ven_OnPlayerConnect (playerid=9) at D:\gamemode\pawno\include\OnPlayerPause.inc:106 [16:07:26] [debug] #5 000520bc in public MP_OPC (playerid=9) at D:\gamemode\pawno\include\vending.inc:564 [16:07:26] [debug] #6 native CallLocalFunction () from samp03svr [16:07:26] [debug] #7 000406ac in public SSCANF_OnPlayerConnect (playerid=9) at D:\gamemode\pawno\include\mSelection.inc:432 [16:07:26] [debug] #8 000356d8 in public _y_utils_OnPlayerConnect (playerid=9) at D:\gamemode\pawno\include\sscanf2.inc:236 [16:07:26] [debug] #9 0000a10c in public AB_OnPlayerConnect (playerid=9) at D:\gamemode\pawno\include\YSI\..\YSI_Coding\..\YSI_Core\y_utils.inc:236 [16:07:26] [debug] #10 000010b0 in OnPlayerConnect (playerid=9, ... <1073741822 arguments>) at D:\gamemode\pawno\include\OPA.inc:104 [16:07:26] [debug] #11 0000b0e0 in public OnPlayerConnect (... <1 argument>) at D:\gamemode\pawno\include\YSI\..\YSI_Coding\..\YSI_Internal\y_cgen.inc:30 [16:07:26] [debug] Native backtrace: [16:07:26] [debug] #0 b642ee8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so [16:07:26] [debug] #1 b6427bcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so [16:07:26] [debug] #2 b6428dbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so [16:07:26] [debug] #3 b6429226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so [16:07:26] [debug] #4 b642eadc in ?? () from plugins/crashdetect.so [16:07:26] [debug] #5 b771f600 in ?? () [16:07:26] [debug] #6 080d5a67 in ?? () from ./samp03svr [16:07:26] [debug] #7 080d7a95 in ?? () from ./samp03svr [16:07:26] [debug] #8 b645ab56 in ?? () from plugins/sscanf.so [16:07:26] [debug] #9 080950e4 in ?? () from ./samp03svr [16:07:26] [debug] #10 b642a94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so [16:07:26] [debug] #11 b642d8f8 in ?? () from plugins/crashdetect.so [16:07:26] [debug] #12 b6431916 in amx_Exec () from plugins/crashdetect.so [16:07:26] [debug] #13 b6429be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so [16:07:26] [debug] #14 b642d659 in ?? () from plugins/crashdetect.so [16:07:26] [debug] #15 b6076826 in ?? () from plugins/streamer.so [16:07:26] [debug] #16 080dfd62 in ?? () from ./samp03svr [16:07:26] [debug] #17 080950e4 in ?? () from ./samp03svr [16:07:26] [debug] #18 b642a94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so [16:07:26] [debug] #19 b642d8f8 in ?? () from plugins/crashdetect.so [16:07:26] [debug] #20 b6431916 in amx_Exec () from plugins/crashdetect.so [16:07:26] [debug] #21 b6429be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so [16:07:26] [debug] #22 b642d659 in ?? () from plugins/crashdetect.so [16:07:26] [debug] #23 b6076826 in ?? () from plugins/streamer.so [16:07:26] [debug] #24 080dfd62 in ?? () from ./samp03svr [16:07:26] [debug] #25 080950e4 in ?? () from ./samp03svr [16:07:26] [debug] #26 b642a94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so [16:07:26] [debug] #27 b642d8f8 in ?? () from plugins/crashdetect.so [16:07:26] [debug] #28 b6431916 in amx_Exec () from plugins/crashdetect.so [16:07:26] [debug] #29 b6429be6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so [16:07:26] [debug] #30 b642d659 in ?? () from plugins/crashdetect.so [16:07:26] [debug] #31 b6076826 in ?? () from plugins/streamer.so [16:07:26] [debug] #32 080a51c9 in ?? () from ./samp03svr [16:07:26] [debug] #33 080d09ff in ?? () from ./samp03svr [16:07:26] [debug] #34 080b5515 in ?? () from ./samp03svr [16:07:26] [debug] #35 08071d38 in ?? () from ./samp03svr [16:07:26] [debug] #36 08071e32 in ?? () from ./samp03svr [16:07:26] [debug] #37 0807bc50 in ?? () from ./samp03svr [16:07:26] [debug] #38 080aed3d in ?? () from ./samp03svr [16:07:26] [debug] #39 080aef02 in ?? () from ./samp03svr [16:07:26] [debug] #40 080aa13a in ?? () from ./samp03svr [16:07:26] [debug] #41 b7443d26 in __libc_start_main () from /lib/libc.so.6 [16:07:26] [debug] #42 0804b4e1 in ?? () from ./samp03svr
  12. bump, ma poate ajuta cineva?
×
×
  • 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.