Please Help.
#1

Hello,
Maybe someone can fix this script?
When I have entered a name and clicked "Give", nothing happens. What's wrong in this script?
I'm sorry for poor English. I hope someone will help.

Код HTML:
if(dialogid == Duoti)
{
ShowPlayerDialog(playerid, AtiduotiNama, DIALOG_STYLE_INPUT, "{FF0000}Agency","{66FF00}Enter the name of the man you want to give away a house.","Give","Exit");
return 1;
}
Код HTML:
if(dialogid == AtiduotiNama)
{
if(response)
{
new hname[MAX_PLAYER_NAME], msg[128], file[128];
if(!strcmp(houseDB[GetPlayerVirtualWorld(playerid)][owner_name],"no",true)) return ShowPlayerDialog(playerid, NamasNeJusu, DIALOG_STYLE_MSGBOX, "{FF0000}Agency","{66FF00}This house is not your.","Ok","");

if(!strlen(inputtext)) return ShowPlayerDialog(playerid, AtiduotiNama, DIALOG_STYLE_INPUT, "{FF0000}Agency","{66FF00}Enter the name of the man you want to give away a house.","Give","Exit");

if(!IsPlayerConnected(strval(inputtext))) return ShowPlayerDialog(playerid, AtiduotiNama, DIALOG_STYLE_INPUT, "{FF0000}Agency","{66FF00}Enter the name of the man you want to give away a house.","Give","Exit");

GetPlayerName(strval(inputtext),hname,sizeof(hname));

format(msg,sizeof(msg),"{66FF00}You have given, {FF0000}%s{66FF00}, a house.",hname);
ShowPlayerDialog(playerid, NamasAtiduotas, DIALOG_STYLE_MSGBOX, "{FF0000}Agency",msg,"Ok","");

strmid(houseDB[GetPlayerVirtualWorld(playerid)][owner_name],hname,0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);

strmid(houseDB[GetPlayerVirtualWorld(playerid)][owner_name],hname,0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
format(file,sizeof(file),"saves/house/%i",GetPlayerVirtualWorld(playerid));
if(!fexist(file)) dini_Create(file);
dini_Set(file,"owner_name",hname);

format(msg,sizeof(msg),"{FFFFFF}House number {00FF00}%i{FFFFFF}\nHouse Purchase!\nOwner:{FF0000} %s",GetPlayerVirtualWorld(playerid),houseDB[GetPlayerVirtualWorld(playerid)][owner_name]);
Update3DTextLabelText(houseDB[GetPlayerVirtualWorld(playerid)][housetext],WHITE,msg);

SavePlayerData(playerid, false);
return 1;
}
}
}
Reply
#2

I think the dialog id have to be numeric and unique. Did you define AtiduotiNama ? If not then put something like #define AtiduotiNama 1000; in the defines area (where other stuff is defined)
Reply
#3

Yes, it is. I get a dialog, but when i input a name to it, nothing happens.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)