else if(dialogid == DIALOG_SELLHOUSETOME)
{
new price = GetPVarInt(playerid,"SellingPrice"),seller = GetPVarInt(playerid,"SellingFrom"),h = GetPVarInt(playerid,"AtHouseID");
if(response)
{
if(IsPlayerConnected(seller))
{
new Float:Pos[3];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
if(IsPlayerInRangeOfPoint(seller,5.0,Pos[0],Pos[1],Pos[2]))
{
new string[75];
GivePlayerCash(playerid,-price);
GivePlayerCash(seller,price);
mysql_format(1,QueryString,"UPDATE `HouseInfo` SET `Owner` = '%s' WHERE `ID` = %d",PlayerName(playerid),h);
mysql_function_query(1,QueryString,false,"SomeNotExistingCallback","","");
format(HouseInfo[h][Owner],MAX_PLAYER_NAME,"%s",PlayerName(playerid));
SendFormatMessage(playerid,COLOR_WHITE,"You have successfully bought this house from {FFFF00}%s {FFFFFF}for {008000}$%d. {FFFFFF}Congratulations!",PlayerName(seller),price);
SendFormatMessage(seller,COLOR_WHITE,"You have successfully sold your house to {FFFF00}%s {FFFFFF}for {008000}$%d. {FFFFFF}Congratulations!",PlayerName(playerid),price);
format(string,sizeof(string),"[House -NOT for sale]\r\n{FFFF00}Owner: {FFFFFF}%s",PlayerName(playerid));
Update3DTextLabelText(HouseInfo[h][Label],COLOR_LIGHTGREEN,string);
return 1;
}
else return SendClientMessage(playerid,COLOR_RED,"(( Error: That player is not near you. ))");
}
}
else
{
SendFormatMessage(playerid,COLOR_YELLOW,"You have declined %s's offer to purchase his house.",PlayerName(seller));
SendFormatMessage(seller,COLOR_YELLOW,"%s has declined your offer to purchase your house.",PlayerName(playerid));
return 1;
}
}
How much is you sure? You did print the id or tried to delete the 3DText?
|
Yes, I forgot that many times I came across this problem(overflow) and only got discover after make the server print everything he's doing in that piece of code.
|