Login before intro problem -
FL3GM4 - 27.12.2012
how to make that my login dialog shows after intro ...
now it shows before intro :/
ongamemodeinit
Код:
Intro[0] = TextDrawCreate(642.0, 1.0, "~n~");
TextDrawLetterSize(Intro[0], 0.5, 49.5);
TextDrawUseBox(Intro[0], 1);
TextDrawBoxColor(Intro[0], 0x000000FF);
TextDrawTextSize(Intro[0], -2.0, 0.0);
Intro[1] = TextDrawCreate(190.000000, 190.000000, "~p~~h~Username");
TextDrawFont(Intro[1], 2);
TextDrawLetterSize(Intro[1], 0.570000, 1.799999);
Intro[2] = TextDrawCreate(310.000000, 190.000000, "present...");
TextDrawFont(Intro[2], 2);
TextDrawColor(Intro[2], 0xFFFFFF22);
TextDrawLetterSize(Intro[2], 0.570000, 1.799999);
Intro[3] = TextDrawCreate(310.000000, 190.000000, "present...");
TextDrawFont(Intro[3], 2);
TextDrawColor(Intro[3], 0xFFFFFF44);
TextDrawLetterSize(Intro[3], 0.570000, 1.799999);
Intro[4] = TextDrawCreate(310.000000, 190.000000, "present...");
TextDrawFont(Intro[4], 2);
TextDrawColor(Intro[4], 0xFFFFFF66);
TextDrawLetterSize(Intro[4], 0.570000, 1.799999);
Intro[5] = TextDrawCreate(310.000000, 190.000000, "present...");
TextDrawFont(Intro[5], 2);
TextDrawColor(Intro[5], 0xFFFFFF88);
TextDrawLetterSize(Intro[5], 0.570000, 1.799999);
Intro[6] = TextDrawCreate(310.000000, 190.000000, "present...");
TextDrawFont(Intro[6], 2);
TextDrawColor(Intro[6], 0xFFFFFFAA);
TextDrawLetterSize(Intro[6], 0.570000, 1.799999);
Intro[7] = TextDrawCreate(310.000000, 190.000000, "present...");
TextDrawFont(Intro[7], 2);
TextDrawColor(Intro[7], 0xFFFFFFCC);
TextDrawLetterSize(Intro[7], 0.570000, 1.799999);
Intro[8] = TextDrawCreate(310.000000, 190.000000, "present...");
TextDrawFont(Intro[8], 2);
TextDrawColor(Intro[8], 0xFFFFFFFF);
TextDrawLetterSize(Intro[8], 0.570000, 1.799999);
Intro[9] = TextDrawCreate(190.0, 202.0, ".");
TextDrawFont(Intro[9], 1);
TextDrawLetterSize(Intro[9], 23.250051, 1.099999);
Intro[10] = TextDrawCreate(304.00, 223.0, "~y~~h~The name of the SERVER");
TextDrawFont(Intro[10], 2);
TextDrawLetterSize(Intro[10], 0.340000, 1.099999);
Intro[11] = TextDrawCreate(331.0, 235.0, "~g~~h~www.pawno.ru");
TextDrawFont(Intro[11], 2);
TextDrawLetterSize(Intro[11], 0.340000, 1.099999);
ongamemodeexit
Код:
for(new i; i < sizeof(Intro); i++)
{
TextDrawDestroy(Intro[i]);
}
onplayerconnect
Код:
TogglePlayerSpectating(playerid, true);
ForceClassSelection(playerid);
SetPVarInt(playerid, "Intro", 0);
SetTimerEx("ShowIntro", 2000, 0, "d", playerid);
Код:
forward ShowIntro(playerid);
public ShowIntro(playerid)
{
SetPVarInt(playerid, "Intro", GetPVarInt(playerid, "Intro") + 1);
new iteration = GetPVarInt(playerid, "Intro");
switch(iteration)
{
case 1:
{
for(new i; i < 11; i++)
{
SendClientMessage(playerid, -1, "");
}
TextDrawShowForPlayer(playerid, Intro[0]);
}
case 2:
{
TextDrawShowForPlayer(playerid, Intro[1]);
}
case 3:
{
TextDrawShowForPlayer(playerid, Intro[2]);
}
case 4:
{
TextDrawHideForPlayer(playerid, Intro[2]);
TextDrawShowForPlayer(playerid, Intro[3]);
}
case 5:
{
TextDrawHideForPlayer(playerid, Intro[3]);
TextDrawShowForPlayer(playerid, Intro[4]);
}
case 6:
{
TextDrawHideForPlayer(playerid, Intro[4]);
TextDrawShowForPlayer(playerid, Intro[5]);
}
case 7:
{
TextDrawHideForPlayer(playerid, Intro[5]);
TextDrawShowForPlayer(playerid, Intro[6]);
}
case 8:
{
TextDrawHideForPlayer(playerid, Intro[6]);
TextDrawShowForPlayer(playerid, Intro[7]);
}
case 9:
{
TextDrawHideForPlayer(playerid, Intro[7]);
TextDrawShowForPlayer(playerid, Intro[8]);
}
case 10:
{
TextDrawShowForPlayer(playerid, Intro[9]);
}
case 11:
{
TextDrawShowForPlayer(playerid, Intro[10]);
}
case 12:
{
TextDrawShowForPlayer(playerid, Intro[11]);
}
}
if(GetPVarInt(playerid, "Intro") < 10)
{
SetTimerEx("ShowIntro", 300, 0, "d", playerid);
}
else if(9 < GetPVarInt(playerid, "Intro") < 13)
{
SetTimerEx("ShowIntro", 2000, 0, "d", playerid);
}
else
{
for(new i; i < sizeof(Intro); i++)
{
TextDrawHideForPlayer(playerid, Intro[i]);
}
TogglePlayerSpectating(playerid, false);
ForceClassSelection(playerid);
}
return 1;
}
Re: Login before intro problem -
FL3GM4 - 27.12.2012
any help ... i really dont know answer !?
i put every where before logins in script :/
sry for DP
Re: Login before intro problem -
Faisal_khan - 27.12.2012
pawn Код:
forward ShowIntro(playerid);
public ShowIntro(playerid)
{
SetPVarInt(playerid, "Intro", GetPVarInt(playerid, "Intro") + 1);
new iteration = GetPVarInt(playerid, "Intro");
switch(iteration)
{
case 1:
{
for(new i; i < 11; i++)
{
SendClientMessage(playerid, -1, "");
}
TextDrawShowForPlayer(playerid, Intro[0]);
}
case 2:
{
TextDrawShowForPlayer(playerid, Intro[1]);
}
case 3:
{
TextDrawShowForPlayer(playerid, Intro[2]);
}
case 4:
{
TextDrawHideForPlayer(playerid, Intro[2]);
TextDrawShowForPlayer(playerid, Intro[3]);
}
case 5:
{
TextDrawHideForPlayer(playerid, Intro[3]);
TextDrawShowForPlayer(playerid, Intro[4]);
}
case 6:
{
TextDrawHideForPlayer(playerid, Intro[4]);
TextDrawShowForPlayer(playerid, Intro[5]);
}
case 7:
{
TextDrawHideForPlayer(playerid, Intro[5]);
TextDrawShowForPlayer(playerid, Intro[6]);
}
case 8:
{
TextDrawHideForPlayer(playerid, Intro[6]);
TextDrawShowForPlayer(playerid, Intro[7]);
}
case 9:
{
TextDrawHideForPlayer(playerid, Intro[7]);
TextDrawShowForPlayer(playerid, Intro[8]);
}
case 10:
{
TextDrawShowForPlayer(playerid, Intro[9]);
}
case 11:
{
TextDrawShowForPlayer(playerid, Intro[10]);
}
case 12:
{
TextDrawShowForPlayer(playerid, Intro[11]);
}
}
if(GetPVarInt(playerid, "Intro") < 10)
{
SetTimerEx("ShowIntro", 300, 0, "d", playerid);
}
else if(9 < GetPVarInt(playerid, "Intro") < 13)
{
SetTimerEx("ShowIntro", 2000, 0, "d", playerid);
}
else
{
for(new i; i < sizeof(Intro); i++)
{
TextDrawHideForPlayer(playerid, Intro[i]);
//add it here
}
TogglePlayerSpectating(playerid, false);
ForceClassSelection(playerid);
}
return 1;
}
Re: Login before intro problem -
FL3GM4 - 27.12.2012
if I understand you right I put like this in public line:
Код:
if(GetPVarInt(playerid, "Intro") < 10)
{
SetTimerEx("ShowIntro", 300, 0, "d", playerid);
}
else if(9 < GetPVarInt(playerid, "Intro") < 13)
{
SetTimerEx("ShowIntro", 2000, 0, "d", playerid);
}
else
{
for(new i; i < sizeof(Intro); i++)
{
TextDrawHideForPlayer(playerid, Intro[i]);
SetPVarInt(playerid, "Intro", 0);
SetTimerEx("ShowIntro", 2000, 0, "d", playerid);
}
TogglePlayerSpectating(playerid, false);
ForceClassSelection(playerid);
}
ad got these errors:
Код:
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(4828) : error 017: undefined symbol "Intro"
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(4828) : warning 215: expression has no effect
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(4828) : error 001: expected token: ";", but found "]"
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(4828) : error 029: invalid expression, assumed zero
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(4828) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: Login before intro problem -
Faisal_khan - 27.12.2012
I meant, add your ShowPlayerDialog(login dialog) there.
Re: Login before intro problem -
FL3GM4 - 27.12.2012
Код:
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(4894) : error 017: undefined symbol "naslov2"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Код:
if(GetPVarInt(playerid, "Intro") < 10)
{
SetTimerEx("ShowIntro", 300, 0, "d", playerid);
}
else if(9 < GetPVarInt(playerid, "Intro") < 13)
{
SetTimerEx("ShowIntro", 2000, 0, "d", playerid);
}
else
{
for(new i; i < sizeof(Intro); i++)
{
TextDrawHideForPlayer(playerid, Intro[i]);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, naslov2, text, "Login", "Odustani");
}
TogglePlayerSpectating(playerid, false);
ForceClassSelection(playerid);
}
EDIT: Resolved!
Re: Login before intro problem -
Faisal_khan - 27.12.2012
pawn Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "naslov2", "text", "Login", "Odustani");
Re: Login before intro problem -
FL3GM4 - 27.12.2012
it still working badly...
now is LOGIN before INTRO, but now intro witing login, and now i need to write password 2 times, coz: "naslo2" and "text"
Re: Login before intro problem -
FL3GM4 - 28.12.2012
any help
![Huh?](images/smilies/confused.gif)
sry for DP, but thread gone far away ...