16.11.2011, 18:36
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.
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; } } }