ID 0 problem. +REP
#1

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
Reply
#2

Maybe show us some code

How do you show the player the dialog
Reply
#3

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
Reply
#4

Post your code here. Maybe you have another dialog with the same ID

Edit: SecretBoss, of course, I think that's the case
Reply
#5

[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]
Reply
#6

@Rogher, please use the code or quote tag.
Reply
#7

Quote:
Originally Posted by StackedPizza
Посмотреть сообщение
@Rogher, please use the code or quote tag.
PHP код:
if(dialogid == MOBILEN2)
{
if(
IsPlayerConnected(playerid))
{
if(
response)
{
foreach (
Playeri)
{
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(playeridMOBILEN3DIALOG_STYLE_INPUT,"- PRATI PORAKA -","Napisete sto sakate da pisuva vo porakata:","Isprati","Izlezi");
return 
1;
}
}
}
}
}
}
}
if(
dialogid == MOBILEN3)
{
if(
IsPlayerConnected(playerid))
{
foreach (
Playeri)
{
new 
sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
GetPlayerName(playeridsendernamesizeof(sendername));
format(stringsizeof(string), "|%s vadi mobilen telefon i isprakja poraka.."sendername);
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
new 
giveplayerid;
giveplayerid i;
strval(inputtext);
if(
PhoneOnline[giveplayerid] > 0)
{
SendClientMessage(playeridCOLOR_GREY"{F81414}INFO:{FFFFFF}Pretplatnikot go isklucil telefonot,obidete se podocna...");
return 
1;
}
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
format(stringsizeof(string), "SMS: %s, Ispratil: %s (0%d)"inputtext,sendername,PlayerInfo[playerid][pPnumber]);
SendClientMessage(giveplayeridCOLOR_YELLOWstring);
format(stringsizeof(string), "SMS: %s, Ispratil: %s (0%d)"inputtext,sendername,PlayerInfo[playerid][pPnumber]);
SendClientMessage(playeridCOLOR_YELLOWstring);
SendClientMessage(playeridCOLOR_WHITE"{F81414}INFO:{FFFFFF}SMS poraka e pratena");
RingTone[giveplayerid] = 20;
Mobile[playerid] = 255;
format(stringsizeof(string), "|%s vadi mobilen telefon i cita poraka.."giveplayer);
ProxDetector(30.0giveplayeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
return 
1;
}
}

Reply
#8

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.
Reply
#9

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?
Reply
#10

Replace for each(I, player) with IsPlayerConnected(playerid)

If that doesn't work try using a different dialogic like 1000
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)