21.02.2015, 17:14
hi guys i need a small help the cmd work but it show me SERVER: Unknown Command
sorry for my bad english
thnx
pawn Код:
CMD:sellhouse(playerid, params[])
{
if(pInfo[playerid][HouseKey] == 0) return SendClientMessage(playerid, COLOR_WHITE, "You don't have a house to sell.");
{
new string[256], Query[1000];
pInfo[playerid][Money] += hInfo[pInfo[playerid][HouseKey]][HousePrice] / 2 + 5000;
format(hInfo[pInfo[playerid][HouseKey]][HouseOwner], 24, "Nobody");
format(string, sizeof(string), "You have sold '%s' for $%d.", hInfo[pInfo[playerid][HouseKey]][HouseName], hInfo[pInfo[playerid][HouseKey]][HousePrice] / 2 + 5000);
SendClientMessage(playerid, COLOR_YELLOW, string);
mysql_format(mysql, Query, sizeof(Query), "UPDATE `Houses` SET `HouseOwner` = 'Nobody' WHERE `hID` = %i", pInfo[playerid][HouseKey]);
mysql_query(mysql, Query);
mysql_free_result();
pInfo[playerid][HouseKey] = 0;
SavePlayer(playerid);
}
return 1;
}
thnx