15.11.2018, 02:28
(
Последний раз редактировалось GuikBretas; 15.11.2018 в 03:15.
Причина: RESOLVIDO
)
RESOLVIDO: Para quem quer resolver, й sу nгo ser burro que nem eu. Adicione verificaзхes no seu comando, exemplo: Se o ID й vбlido, se o jogador nгo й um NPC, se o texto digitado no comando nгo excede os caracteres permitidos, etc.
Glr, o meu servidor frequentemente estб caindo e exibindo o seguinte erro
Eu estou achando que o cуdigo que estб causando o erro й o do comando /pm
Alguйm sabe o que fazer para resolver?
Glr, o meu servidor frequentemente estб caindo e exibindo o seguinte erro
Код:
[03:00:32] [debug] Server crashed while executing SvrCap.amx [03:00:32] [debug] AMX backtrace: [03:00:32] [debug] #0 native format () from samp03svr [03:00:32] [debug] #1 001af328 in public cmd_pm () from SvrCap.amx [03:00:32] [debug] #2 native CallLocalFunction () from samp03svr [03:00:32] [debug] #3 0000aeb8 in public OnPlayerCommandText (9, 190712668) from SvrCap.amx [03:00:32] [debug] Native backtrace: [03:00:32] [debug] #0 f7b01e8b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so [03:00:32] [debug] #1 f7afabcf in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so [03:00:32] [debug] #2 f7afbdbc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so [03:00:32] [debug] #3 f7afc226 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so [03:00:32] [debug] #4 f7b01adc in ?? () from plugins/crashdetect.so [03:00:32] [debug] #5 f7ef0010 in ?? () [03:00:32] [debug] #6 0809ed37 in ?? () from ./samp03svr [03:00:32] [debug] #7 080e8782 in ?? () from ./samp03svr [03:00:32] [debug] #8 0809d844 in ?? () from ./samp03svr [03:00:32] [debug] #9 f7afd94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so [03:00:32] [debug] #10 f7b008f8 in ?? () from plugins/crashdetect.so [03:00:32] [debug] #11 f7b04916 in amx_Exec () from plugins/crashdetect.so [03:00:32] [debug] #12 f7afcbe6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so [03:00:32] [debug] #13 f7b00659 in ?? () from plugins/crashdetect.so [03:00:32] [debug] #14 f7a57676 in ?? () from plugins/streamer.so [03:00:32] [debug] #15 080eb672 in ?? () from ./samp03svr [03:00:32] [debug] #16 0809d844 in ?? () from ./samp03svr [03:00:32] [debug] #17 f7afd94b in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so [03:00:32] [debug] #18 f7b008f8 in ?? () from plugins/crashdetect.so [03:00:32] [debug] #19 f7b04916 in amx_Exec () from plugins/crashdetect.so [03:00:32] [debug] #20 f7afcbe6 in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so [03:00:32] [debug] #21 f7b00659 in ?? () from plugins/crashdetect.so [03:00:32] [debug] #22 f7a57676 in ?? () from plugins/streamer.so [03:00:32] [debug] #23 080adff2 in ?? () from ./samp03svr [03:00:32] [debug] #24 080bba71 in ?? () from ./samp03svr [03:00:32] [debug] #25 0807a3e8 in ?? () from ./samp03svr [03:00:32] [debug] #26 0807a4e2 in ?? () from ./samp03svr [03:00:32] [debug] #27 08084300 in ?? () from ./samp03svr [03:00:32] [debug] #28 080b79ed in ?? () from ./samp03svr [03:00:32] [debug] #29 080b7bb2 in ?? () from ./samp03svr [03:00:32] [debug] #30 080b2d92 in ?? () from ./samp03svr [03:00:32] [debug] #31 f7b3d637 in __libc_start_main () from /lib32/libc.so.6
Код:
COMMAND:pm(playerid, params[]) { new text[128],targetid,string[255],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME]; if(sscanf(params, "us[128]", targetid, text)) SendClientMessage(playerid, COLOR_GREY, "USO: /pm {FFFFFF}[playerid] [texto]"); else { if (GetPVarInt(playerid, "PlayerLogged") != 1) return SendClientMessage(playerid, COLOR_WHITE, "Vocк precisa estar logado para usar esse comando."); if (playerid == targetid) return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode enviar PM para vocк mesmo."); if(GetPVarInt(playerid, "Admin") == 0 && GetPVarInt(targetid, "TogPM") == 1) return SendClientMessage(playerid,COLOR_GREY,"Esse jogador bloqueou mensagens particulares."); if(GetPVarInt(playerid, "Admin") == 0 && PlayerInfo[targetid][pBlockPM][playerid] == 1) return SendClientMessage(playerid,COLOR_GREY,"Esse jogador desabilitou mensagens particulares suas."); if(GetPVarInt(playerid, "Admin") == 0 && PlayerInfo[playerid][pBlockPM][targetid] == 1) return SendClientMessage(playerid,COLOR_GREY,"Vocк desabilitou as mensagens particulares com esse jogador."); if(GetPVarInt(playerid, "TogPM") == 1 && GetPVarInt(playerid, "Admin") == 0) return error(playerid, "As suas mensagens particulares estгo bloqueadas."); if(GetPVarInt(playerid, "Mute") == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк estб silenciado (mute)!"); if(IsPlayerConnected(targetid)) { if(GetPVarInt(targetid, "Admin") > 0 && GetPVarInt(targetid, "Admin") <= 9 && GetPVarInt(targetid, "AdminDuty") == 1 && GetPVarInt(playerid, "APMWRN") == 0) { SetPVarString(playerid, "APMMSG", text); SetPVarInt(playerid, "APMID", targetid); ShowPlayerDialog(playerid, 206, DIALOG_STYLE_MSGBOX, "ALERTA", "IMPORTANTE: Administradores sгo muito ocupados e vocк nгo pode mandar spam ou mensagens inъteis para eles\nQuer enviar o PM mesmo assim?", "Sim", "Nгo"); } else { format(sendername, sizeof(sendername), "%s", PlayerName(playerid)); format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid)); GiveNameSpace(sendername); GiveNameSpace(giveplayer); format(string, sizeof(string), "(( PM de [%d] %s: %s ))", playerid, sendername, text); SendClientMessageEx(targetid, 0xF9F900FF, string); format(string, sizeof(string), "(( PM enviada para [%d] %s: %s ))", targetid, giveplayer, text); SendClientMessageEx(playerid, 0xE5C43EAA, string); PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0); format(string, sizeof(string), "(( %s[%d] enviou %s[%d]: %s ))", sendername, playerid, giveplayer, targetid, text); ShowPMs(string); SeePM(playerid, string); SeePM(targetid, string); } } } return 1; }