10.02.2010, 22:14
Heres my code:
If i leave the box blank and press enter, It still teleports me to room 2598,
And also how would i get it to show another dialog if the player clicks rooms?
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Sk in","Welcome to Visage Hotel Showroom \nPlease type in a Room Number to visit the room \nNote you cannot buy the rooms \nFor now this hotel is a Showroom","Enter","Rooms");
pawn Код:
if(response)
{
switch(dialogid)
{
case 1:
{
if(!strcmp(inputtext,"2598",true))
{
SendClientMessage(playerid,0xFFFFFFFF,"You are being taken to \"Room 2598 - En' Suite\"");
FadeColorForPlayer(playerid,0,0,0,0,0,0,0,255,15,0);
SetPlayerInterior(playerid,12);
SetPlayerPos(playerid,2324.33, -1144.79, 1050.71);
FadeColorForPlayer(playerid,0,0,0,0,255,255,255,255,15,0);
}
else
{
SendClientMessage(playerid,0x8F8F8FFF,"Invalid Room Number");
}
if(response == 0)
{
SendClientMessage(playerid,0x8F8F8FFF,"Rooms");
return 1;
}
}
}
}
And also how would i get it to show another dialog if the player clicks rooms?
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Sk in","Welcome to Visage Hotel Showroom \nPlease type in a Room Number to visit the room \nNote you cannot buy the rooms \nFor now this hotel is a Showroom","Enter","Rooms");