Dialog.
#1

Hey guys,

I have a problem with this dialog,it crashes my pawn..

pawn Код:
if(dialogid == DIALOG_REG)
    {
    if(RegistrationStep[playerid] > 0)
    {
        if(RegistrationStep[playerid] == 1)
        {
        if(response) // If they clicked 'Male' or pressed enter
        {
                PlayerInfo[playerid][pSex] = 1;
                SendClientMessage(playerid, COLOR_LIGHTRED, "Okay you are a male!");
                SendClientMessage(playerid, COLOR_LIGHTRED, "What is your age?");
                new maleskin;
                maleskin = 101;
                SetPlayerSkin(playerid, maleskin);
                PlayerInfo[playerid][pModel] = maleskin;
                RegistrationStep[playerid] = 2;
        }
        else // If they clicked 'Female' or pressed enter
        {
                PlayerInfo[playerid][pSex] = 2;
                SendClientMessage(playerid, COLOR_LIGHTRED, "!Okay you are a female");
                SendClientMessage(playerid, COLOR_LIGHTRED, "What is your age?");
                new femaleskin;
                femaleskin = 226;
                SetPlayerSkin(playerid, femaleskin);
                SetPlayerSkin(playerid, femaleskin);
                PlayerInfo[playerid][pModel] = femaleskin;
                RegistrationStep[playerid] = 2;
        }
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
   }
Reply
#2

My pawn or my server?

{ - 5 times used
} - 3 times used

Код:
if(dialogid == DIALOG_REG)
{
    if(RegistrationStep[playerid] > 0)
    {
        if(RegistrationStep[playerid] == 1)
        {
			if(response) // If they clicked 'Male' or pressed enter
			{
					PlayerInfo[playerid][pSex] = 1;
					SendClientMessage(playerid, COLOR_LIGHTRED, "Okay you are a male!");
					SendClientMessage(playerid, COLOR_LIGHTRED, "What is your age?");
					new maleskin;
					maleskin = 101;
					SetPlayerSkin(playerid, maleskin);
					PlayerInfo[playerid][pModel] = maleskin;
					RegistrationStep[playerid] = 2;
			}
			else // If they clicked 'Female' or pressed enter
			{
					PlayerInfo[playerid][pSex] = 2;
					SendClientMessage(playerid, COLOR_LIGHTRED, "!Okay you are a female");
					SendClientMessage(playerid, COLOR_LIGHTRED, "What is your age?");
					new femaleskin;
					femaleskin = 226;
					SetPlayerSkin(playerid, femaleskin);
					SetPlayerSkin(playerid, femaleskin);
					PlayerInfo[playerid][pModel] = femaleskin;
					RegistrationStep[playerid] = 2;
			}
		}
	}
	return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
}
Reply
#3

Quote:
Originally Posted by IgrexolonO
Посмотреть сообщение
My pawn or my server?

{ - 5 times used
} - 3 times used

Код:
if(dialogid == DIALOG_REG)
{
    if(RegistrationStep[playerid] > 0)
    {
        if(RegistrationStep[playerid] == 1)
        {
			if(response) // If they clicked 'Male' or pressed enter
			{
					PlayerInfo[playerid][pSex] = 1;
					SendClientMessage(playerid, COLOR_LIGHTRED, "Okay you are a male!");
					SendClientMessage(playerid, COLOR_LIGHTRED, "What is your age?");
					new maleskin;
					maleskin = 101;
					SetPlayerSkin(playerid, maleskin);
					PlayerInfo[playerid][pModel] = maleskin;
					RegistrationStep[playerid] = 2;
			}
			else // If they clicked 'Female' or pressed enter
			{
					PlayerInfo[playerid][pSex] = 2;
					SendClientMessage(playerid, COLOR_LIGHTRED, "!Okay you are a female");
					SendClientMessage(playerid, COLOR_LIGHTRED, "What is your age?");
					new femaleskin;
					femaleskin = 226;
					SetPlayerSkin(playerid, femaleskin);
					SetPlayerSkin(playerid, femaleskin);
					PlayerInfo[playerid][pModel] = femaleskin;
					RegistrationStep[playerid] = 2;
			}
		}
	}
	return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
}
tnx bro
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)