how to make dialogid to LoginShowPlayerDialog fuctions
#1

this dialog id
pawn Код:
if(dialogid == 1244)
        {
            if(response)
            {
                if (gPlayerAccount[playerid] != 0)
                {
                    ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_PASSWORD,"Welcome, Please Log-In","{33CCFF}Type your password below to log-in ","Log-in","Quit");
                }
                else
                {
                    ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_PASSWORD,"Welcome, Please Register","{33CCFF}Type your password below to register a new account.","Register","Quit");
                }
                new y, m, d;
                new h,mi,s;
                getdate(y,m,d);
                gettime(h,mi,s);
                format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has accepted the terms and conditions.",d,m,y,h,mi,s,sendername);
                LoginLog(string);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY,"* You selected \"Refuse\", To play you must agree to the terms of condition");
                Kick(playerid);
            }
        }
i want make it to LoginShowPlayerDialog fuctions
like this
pawn Код:
public ShowAchievement(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw59);
    TextDrawShowForPlayer(playerid, Textdraw60);
    TextDrawShowForPlayer(playerid, Textdraw61);
    TextDrawShowForPlayer(playerid, Textdraw62);
    TextDrawShowForPlayer(playerid, Textdraw63);
    TextDrawShowForPlayer(playerid, Textdraw64[playerid]);
    SetTimerEx("HideAchievement",15000,false,"i",playerid);
}
i want make public LoginShowPlayerDialog(playerid)
Reply
#2

Hello, you can do this by creating a stock:

pawn Код:
stock LoginShowPlayerDialog(playerid)
{
     // Your code here.......
}
If you want to use this stock just put the line below where you want it.
pawn Код:
LoginShowPlayerDialog(playerid);
Example:
pawn Код:
public OnPlayerConnect(playerid)
{
     LoginShowPlayerDialog(playerid);
}
Reply
#3

i want put it at here, can?
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    new string[768];
    PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
    PlayerInfo[playerid][pModel] = Peds[classid][0];
    if(IsPlayerNPC(playerid))
    {
        SpawnPlayer(playerid);
        return 1;
    }
    if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
    {
        ClearChatbox(playerid, 10);
        LoginShowPlayerDialog(playerid);
        SetPlayerJoinCam(playerid);
        //PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
        PlayerInfo[playerid][pModel] = Peds[classid][0];

    }
    else
    {
        SpawnPlayer(playerid);
    }
 return false;
}
can?
Reply
#4

Yes you can.
Reply
#5

are you sure
Reply
#6

Yes...................... What part of yes do you don't understand?
Reply
#7

from where code (your code) you say.
pawn Код:
stock LoginShowPlayerDialog(playerid)
from where???
Reply
#8

pawn Код:
stock LoginShowPlayerDialog(playerid)
{
                if (gPlayerAccount[playerid] != 0)
                {
                    ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_PASSWORD,"Welcome, Please Log-In","{33CCFF}Type your password below to log-in ","Log-in","Quit");
                }
                else
                {
                    ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_PASSWORD,"Welcome, Please Register","{33CCFF}Type your password below to register a new account.","Register","Quit");
                }
                return 1;
}
Reply
#9

sure stock or public
Reply
#10

aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
MAAAAAAAAN
yes STOCK ! I THINK YOUR HAVE PROBLEM WITH YOUR SELF
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)