public OnDialogResponse(playerid, dialogid, response, listitem, tinputtext[])
{
Blah Blah
|
Hi,
I have a little problem I maked myself a house sytem, everything is ok pawno doesn't send errors, i logged into my server to check from first look it works, all textlabels are in places but when I press button it doens't do anything |
if( newkeys == KEY_WALK )
{
{
for(new house=0; house<maxhouses+1; house++)
{
if(!IsPlayerInRangeOfPoint(playerid,1,houseDB2[house][hx],houseDB2[house][hy],houseDB2[house][hz])) continue;
if(!strcmp("no",houseDB[house][owner_name],true))
{
if(GetPlayerMoneyA(playerid) < houseDB[house][nkaina]) return SendClientMessage(playerid,COLOR_RED,"you don't have enough money.");
if(GetPlayerScore(playerid) < 5000) return SendClientMessage(playerid,COLOR_RED,"Jyou need 5000 Xp.");
GivePlayerMoneyA(playerid,-houseDB[house][nkaina]);
new names[MAX_PLAYER_NAME];
GetPlayerName(playerid,names,MAX_PLAYER_NAME);
strmid(houseDB[house][owner_name],names,0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
houseDB[house][setting]=random(5);
new houseid = playerDB[playerid][rid][3];
new file[128];
format(file,sizeof(file),"saves/house/%i",houseid);
if(!fexist(file)) dini_Create(file);
dini_Set(file,"owner",names);
dini_IntSet(file,"setting",houseDB[houseid][setting]);
new dtext[38];
format(dtext,sizeof(dtext),"house owner: %s",houseDB[house][owner_name]);
Update3DTextLabelText(houseDB2[house][housetext],0x39A6C6FF,dtext);
SendClientMessage(playerid,COLOR_GREEN,"you bought a house!");
return 1;
}
else return SendClientMessage(playerid,COLOR_RED,"house not for sale!");
}
return 1; // Baigiame.
}
}