Hack Ke apaga el Server
#1

Holas, me decido postear esto x q ya no sй q hacer con este wey, pero al entrar al server lo crashea y lo apaga, apenas entra y lo apaga sin dejar a tiempo a nada, rbaneo su ip pero luego vuelve y sigue..
Esto es lo q me sale antes de apagarse:

[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID
[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID
[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID
[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID
[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID
[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID
[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID
[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID
[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID
[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID
[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID
[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID
[23:38:55] Warning: PlayerDialogResponse PlayerId: 7 dialog ID doesn't match last sent dialog ID

Es algo con los dнalogos, nu se si los modifica o algo q hace q crashee el server , nu soy el ъnico con este problema si no muchos otrso servers q le pasan lo mismo..

Me pueden ayudar y ver como detener esto, y x q sale eso de los diбlogos :S
Reply
#2

Supongo que sera el dialog hack.. Pero pense que lo habian reparado en 0.3e.. en fin ,este include te servira

https://sampforum.blast.hk/showthread.php?tid=301034
Reply
#3

Agrega este codigo dentro de tu GM (deberia ser antes de cualquier callback):

pawn Код:
#define INVALID_DIALOG_ID       (-1)

new CurrentDialog[MAX_PLAYERS];

stock _ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
    CurrentDialog[playerid] = dialogid;
    return ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
}
#define ShowPlayerDialog    _ShowPlayerDialog

public OnPlayerConnect(playerid)
{
    CurrentDialog[playerid] = INVALID_DIALOG_ID;
    if(funcidx("_OnPlayerConnect") != -1)
        return CallLocalFunction("_OnPlayerConnect", "i", playerid);
    return 1;
}
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
    #define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect _OnPlayerConnect
forward public _OnPlayerConnect(playerid);

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(CurrentDialog[playerid] != dialogid)
    {
        BanEx(playerid, "Dialog hacking");
        return 1;
    }
    if(funcidx("_OnDialogResponse") != -1)
        return CallLocalFunction("_OnDialogResponse", "iiiis", playerid, dialogid, response, listitem, inputtext);
    return 0;
}
#if defined _ALS_OnDialogResponse
#undef OnDialogResponse
#else
    #define _ALS_OnDialogResponse
#endif
#define OnDialogResponse    _OnDialogResponse
forward public _OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
Reply
#4

Quote:
Originally Posted by the_chaoz
Посмотреть сообщение
Agrega este codigo dentro de tu GM (deberia ser antes de cualquier callback):

pawn Код:
#define INVALID_DIALOG_ID       (-1)

new CurrentDialog[MAX_PLAYERS];

stock _ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
    CurrentDialog[playerid] = dialogid;
    return ShowPlayerDialog((playerid, dialogid, style, caption, info, button1, button2);
}
#define ShowPlayerDialog    _ShowPlayerDialog

public OnPlayerConnect(playerid)
{
    CurrentDialog[playerid] = INVALID_DIALOG_ID;
    if(funcidx("_OnPlayerConnect") != -1)
        return CallLocalFunction("_OnPlayerConnect", "i", playerid);
    return 1;
}
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
    #define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect _OnPlayerConnect
forward public _OnPlayerConnect(playerid);

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(CurrentDialog[playerid] != dialogid)
    {
        BanEx(playerid, "Dialog hacking");
        return 1;
    }
    if(funcidx("_OnDialogResponse") != -1)
        return CallLocalFunction("_OnDialogResponse", "iiiis", playerid, dialogid, response, listitem, inputtext);
    return 0;
}
#if defined _ALS_OnDialogResponse
#undef OnDialogResponse
#else
    #define _ALS_OnDialogResponse
#endif
#define OnDialogResponse    _OnDialogResponse
forward public _OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
Me sale este error:

C:\Users\Luis Loor\Desktop\Pawno\XtreamFree\gamemodes\XtreamFree .pwn(553) : error 035: argument type mismatch (argument 1)

En la lнnea 553 tengo esto:

return ShowPlayerDialog((playerid, dialogid, style, caption, info, button1, button2);

Algo hice mal?
Reply
#5

pawn Код:
return ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
prueba asi
Reply
#6

Quote:
Originally Posted by Shiny_David
Посмотреть сообщение
pawn Код:
return ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
prueba asi
Nu me fijй el parйntesis de mбs .___.
Pruebo

Edito:

No funciona x q se cierra el samp-server solito cuando uso un diбlogo como si tubiera cumpliendo la funciуn del hack de crashear el server O:
Reply
#7

intenta usar el include fixes en todos tus scripts, este include me parece que ya tiene solucionado el problema de los hack de dialogos
Reply
#8

Uuum yo lo probй y se me cierra solo el samp-server... cuando uso un dialogo se cierra y me banea como si estuviera tratando de hackear un dialogo...
Reply
#9

Disculpen, fue mi error no considerar que el script debe ser compatible entre scripts (GM y FS)

Aqui el codigo modificado. Cabe destacar que este codigo debe ir al comienzo del GM (luego de los includes y definiciones, variables, arrays)
pawn Код:
#define INVALID_DIALOG_ID       (-1)

stock _ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
    SetPVarInt(playerid, "CurrentDialog", dialogid);
    return ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
}
#define ShowPlayerDialog    _ShowPlayerDialog

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(GetPVarInt(playerid, "CurrentDialog") != dialogid)
    {
        BanEx(playerid, "Dialog hacking");
        return 1;
    }
    SetPVarInt(playerid, "CurrentDialog", INVALID_DIALOG_ID);
    if(funcidx("_OnDialogResponse") != -1)
        return CallLocalFunction("_OnDialogResponse", "iiiis", playerid, dialogid, response, listitem, inputtext);
    return 0;
}
#if defined _ALS_OnDialogResponse
#undef OnDialogResponse
#else
    #define _ALS_OnDialogResponse
#endif
#define OnDialogResponse    _OnDialogResponse
forward public _OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
Reply
#10

Me ayudan!!! Seria asi??

Luego de los includes y definiciones, variables, arrays
pawn Код:
#define INVALID_DIALOG_ID       (-1)

stock _ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
    SetPVarInt(playerid, "CurrentDialog", dialogid);
    return ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
}
#define ShowPlayerDialog    _ShowPlayerDialog

#if defined _ALS_OnDialogResponse
#undef OnDialogResponse
#else
    #define _ALS_OnDialogResponse
#endif
#define OnDialogResponse    _OnDialogResponse
forward public _OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
Y esto dentro del public OnDialogResponse!

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(GetPVarInt(playerid, "CurrentDialog") != dialogid)
    {
        BanEx(playerid, "Dialog hacking");
        return 1;
    }
    SetPVarInt(playerid, "CurrentDialog", INVALID_DIALOG_ID);
    if(funcidx("_OnDialogResponse") != -1)
        return CallLocalFunction("_OnDialogResponse", "iiiis", playerid, dialogid, response, listitem, inputtext);
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)