Jump to content
  • 0

pomoc Muj Wlcome Dialog nefunguje


Dominik Rozporka

Dotaz

Cau prosim opravi mi to nekdo aby mi to fungovalo? dekuji.

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("welcome dialog od Dominik Rozporka");
	print("--------------------------------------\n");
}

public OnFilterScriptExit()
{

	print("\n--------------------------------------");
	print("Welcome dialog od Dominik Rozporka byl vypnut");
	print("--------------------------------------\n");
}

public OnPlayerConnect(playerid)
{
#define DIALOG_RULES 9981
    ShowPlayerDialog(playerid, DIALOG_RULES, DIALOG_STYLE_MSGBOX, "Pravidla", "Necheatovat!!!\nvsechny cheaty jsou prisne zakazany a jsou hned trestany banem!!!\n krome parkour modu vsechny parkour mody jsou tu povoleny\nnas web: www.likinggame.8u.cz", "Souhlasim s pravidly", "Nesouhlasim s pravidly");
    public OnDialogResponse(playerid, 9981, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_RULES)
    {
        if(response) // If they clicked 'Yes' or pressed enter
        {
            SendClientMessage(playerid, COLOR_GREEN, "Dekujeme ze souhlasite s pravidily a ze jste prisel na tento server.");
        }
        else // Pressed ESC or clicked cancel
        {
            KickWithMessage(playerid, COLOR_RED, "Musite souhlasit s pravidly!!!");
            //For info & code of this function please refer to the bottom of this article.
        }
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }

    return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}
#endif
Link to comment
Share on other sites

4 odpovědí na tuto otázku

Recommended Posts

  • 0

#include <a_samp>
#define DIALOG_RULES 9981
#define COLOR_RED 0xFF0000FF
#define COLOR_GREEN 0x00FF00FF
stock KickWithMessage(id,color,msg[])
{
SendClientMessage(id,color,msg);
Kick(id);
return 1;
}
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("welcome dialog od Dominik Rozporka");
print("--------------------------------------\n");
}

public OnFilterScriptExit()
{

print("\n--------------------------------------");
print("Welcome dialog od Dominik Rozporka byl vypnut");
print("--------------------------------------\n");
}

public OnPlayerConnect(playerid)
{

ShowPlayerDialog(playerid, DIALOG_RULES, DIALOG_STYLE_MSGBOX, "Pravidla", "Necheatovat!!!\nvsechny cheaty jsou prisne zakazany a jsou hned trestany banem!!!\n krome parkour modu vsechny parkour mody jsou tu povoleny\nnas web: www.likinggame.8u.cz", "Souhlasim s pravidly", "Nesouhlasim s pravidly");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_RULES)
{
if(response) // If they clicked 'Yes' or pressed enter
{
SendClientMessage(playerid, COLOR_GREEN, "Dekujeme ze souhlasite s pravidily a ze jste prisel na tento server.");
}
else // Pressed ESC or clicked cancel
{
KickWithMessage(playerid, COLOR_RED, "Musite souhlasit s pravidly!!!");
//For info & code of this function please refer to the bottom of this article.
}

}

return 0;
}
Link to comment
Share on other sites

  • 0
Ja mam takovej problem proto ze mam na svim server mod Realna Zeme 7.9

tak tam takle nemuzu dat ten script proto jsem si to upravil misto OnPlayerConnect jsem dal OnPlayerSpawn ale kdyz hrace klikne na Nesouhlasim tak ho to nekickne proc? upravite mi to prosim tak aby to bylo funkcni?

zde to je:

 



#include <a_samp>
#define DIALOG_RULES 9981
#define COLOR_RED 0xFF0000FF
#define COLOR_GREEN 0x00FF00FF
stock KickWithMessage(id,color,msg[])
{
SendClientMessage(id,color,msg);
Kick(id);
return 1;
}
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Welcome dialog od Dominik Rozporka");
print("--------------------------------------\n");
}

public OnFilterScriptExit()
{

print("\n--------------------------------------");
print("Welcome dialog od Dominik Rozporka byl vypnut");
print("--------------------------------------\n");
}

public OnPlayerSpawn(playerid)
{

ShowPlayerDialog(playerid, DIALOG_RULES, DIALOG_STYLE_MSGBOX, "Pravidla", "Necheatovat!!!\nvsechny cheaty jsou prisne zakazany a jsou hned trestany banem!!!\n krome parkour modu vsechny parkour mody jsou tu povoleny\nnas web: www.likinggame.8u.cz", "Souhlasim", "Nesouhlasim");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_RULES)
{
if(response) // If they clicked 'Yes' or pressed enter
{
SendClientMessage(playerid, COLOR_GREEN, "Dekujeme ze souhlasite s pravidily a ze jste prisel na tento server.");
}
else // Pressed ESC or clicked cancel
{
KickWithMessage(playerid, COLOR_RED, "Musite souhlasit s pravidly!!!");
//For info & code of this function please refer to the bottom of this article.
}

}

return 0;
}

Link to comment
Share on other sites

  • 0

Nedělej to přes stock, je to naprosto zbytečný vytvářet na takovouhle funkci stock

 

na playerSpawn by to jít mělo, pokud to nejde, když se připojí, vytvoř si minutovej timer, jakmile skončí minutovej timer, ať se mu objeví tahle tabulka a pak by to jít mělo..

 

A jinak normálně do response

 

if(response)

{

    SCM(playerid, RED, "Díky");

}

else

{

    SCM(playerid, RED, "PADEJ!");

    Kick(playerid);

}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...