ID 0 problem. +REP -
Rogher - 15.10.2015
Hello.
I create a dialog .
But when used ID 1 ,2 , 3 ,4 .......100,101....working .
But when used ID 0 don't working .
Problem is not in plugins / include.. :3
AW: ID 0 problem. +REP -
Kaliber - 15.10.2015
Maybe show us some code
How do you show the player the dialog
Re: ID 0 problem. +REP -
SecretBoss - 15.10.2015
I think that you can't use 0 as dialogid since it is invalid (I think), as you said you can use the first numbers and just increase them each time
Re: ID 0 problem. +REP -
xMaKi - 15.10.2015
Post your code here. Maybe you have another dialog with the same ID
Edit: SecretBoss, of course, I think that's the case
Re: ID 0 problem. +REP -
Rogher - 16.10.2015
[code]if(dialogid == MOBILEN2)
{
if(IsPlayerConnected(playerid))
{
if(response)
{
foreach (Player, i)
{
new giveplayerid;
new phonenumb = strval(inputtext);
if(PlayerInfo[i][pPnumber] == phonenumb)
{
giveplayerid = i;
Mobile[playerid] = giveplayerid;
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
ShowPlayerDialog(playerid, MOBILEN3, DIALOG_STYLE_INPUT,"- PRATI PORAKA -","Napisete sto sakate da pisuva vo porakata:","Isprati","Izlezi");
return 1;
}
}
}
}
}
}
}
if(dialogid == MOBILEN3)
{
if(IsPlayerConnected(playerid))
{
foreach (Player, i)
{
new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "|%s vadi mobilen telefon i isprakja poraka..", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
new giveplayerid;
giveplayerid = i;
strval(inputtext);
if(PhoneOnline[giveplayerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, "{F81414}INFO:{FFFFFF}Pretplatnikot go isklucil telefonot,obidete se podocna...");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "SMS: %s, Ispratil: %s (0%d)", inputtext,sendername,PlayerInfo[playerid][pPnumber]);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
format(string, sizeof(string), "SMS: %s, Ispratil: %s (0%d)", inputtext,sendername,PlayerInfo[playerid][pPnumber]);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_WHITE, "{F81414}INFO:{FFFFFF}SMS poraka e pratena");
RingTone[giveplayerid] = 20;
Mobile[playerid] = 255;
format(string, sizeof(string), "|%s vadi mobilen telefon i cita poraka..", giveplayer);
ProxDetector(30.0, giveplayerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
return 1;
}
}
}[code]
Re: ID 0 problem. +REP -
StackedPizza - 19.10.2015
@Rogher, please use the code or quote tag.
Re: ID 0 problem. +REP -
Sh4d0w2 - 19.10.2015
Quote:
Originally Posted by StackedPizza
@Rogher, please use the code or quote tag.
|
PHP код:
if(dialogid == MOBILEN2)
{
if(IsPlayerConnected(playerid))
{
if(response)
{
foreach (Player, i)
{
new giveplayerid;
new phonenumb = strval(inputtext);
if(PlayerInfo[i][pPnumber] == phonenumb)
{
giveplayerid = i;
Mobile[playerid] = giveplayerid;
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
ShowPlayerDialog(playerid, MOBILEN3, DIALOG_STYLE_INPUT,"- PRATI PORAKA -","Napisete sto sakate da pisuva vo porakata:","Isprati","Izlezi");
return 1;
}
}
}
}
}
}
}
if(dialogid == MOBILEN3)
{
if(IsPlayerConnected(playerid))
{
foreach (Player, i)
{
new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "|%s vadi mobilen telefon i isprakja poraka..", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
new giveplayerid;
giveplayerid = i;
strval(inputtext);
if(PhoneOnline[giveplayerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, "{F81414}INFO:{FFFFFF}Pretplatnikot go isklucil telefonot,obidete se podocna...");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "SMS: %s, Ispratil: %s (0%d)", inputtext,sendername,PlayerInfo[playerid][pPnumber]);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
format(string, sizeof(string), "SMS: %s, Ispratil: %s (0%d)", inputtext,sendername,PlayerInfo[playerid][pPnumber]);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_WHITE, "{F81414}INFO:{FFFFFF}SMS poraka e pratena");
RingTone[giveplayerid] = 20;
Mobile[playerid] = 255;
format(string, sizeof(string), "|%s vadi mobilen telefon i cita poraka..", giveplayer);
ProxDetector(30.0, giveplayerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
return 1;
}
}
}
Re: ID 0 problem. +REP -
Kevln - 19.10.2015
Quote:
Originally Posted by SecretBoss
I think that you can't use 0 as dialogid since it is invalid (I think), as you said you can use the first numbers and just increase them each time
|
Not at all, wrong assumptions do not help.
@O.P. Please indent your code, post the full version of it and post it correctly.
Re: ID 0 problem. +REP -
iZN - 19.10.2015
Using IsPlayerConnected(playerid) with foreach() is far too silly, you don't need to use it with foreach(). Anyway, there could be a dialog ID 0 used in one of the filterscripts or include?
Re: ID 0 problem. +REP -
Kayla_Swade - 20.10.2015
Replace for each(I, player) with IsPlayerConnected(playerid)
If that doesn't work try using a different dialogic like 1000