29.08.2014, 13:55
Hey guys, I got a command here that returns unknown command as soon as the stock is inlcuded anyone knows why ?
Stock
Код:
else if(strcmp(x_job,"house",true) == 0) { if(BuyingHouse[playerid] == -1) return SCM(playerid, COLOR_LIGHTRED, "There is no house to accept"); new house = PlayerInfo[playerid][pPhousekey]; for(new slot = 0; slot < 100; slot ++) { FurnitureInfo[house][slot][fUsed] = 0, FurnitureInfo[house][slot][fModel] = 0, FurnitureInfo[house][slot][fPos][0] = 0, FurnitureInfo[house][slot][fPos][1] = 0, FurnitureInfo[house][slot][fPos][2] = 0, FurnitureInfo[house][slot][fPos][3] = 0.0, FurnitureInfo[house][slot][fPos][4] = 0.0, FurnitureInfo[house][slot][fPos][5] = 0.0, FurnitureInfo[house][slot][fWorld] = 0, FurnitureInfo[house][slot][fInt] = 0, DestroyDynamicObject(FurnitureInfo[house][slot][fObject]); } PlayerInfo[playerid][pPhousekey] = PlayerInfo[BuyingHouse[playerid]][pPhousekey]; SafeGivePlayerMoney(BuyingHouse[playerid],BuyingHousePrice[playerid]); SafeGivePlayerMoney(playerid,-BuyingHousePrice[playerid]); PlayerInfo[playerid][pHousePrice] = PlayerInfo[BuyingHouse[playerid]][pHousePrice]; PlayerInfo[BuyingHouse[playerid]][pHousePrice] = 0; PlayerInfo[BuyingHouse[playerid]][pPhousekey] = 9999; format(string,sizeof(string),"You have purchased a house from %s for %d", GPN(BuyingHouse[playerid]), BuyingHousePrice[playerid]); SCM(playerid,COLOR_LIGHTBLUE,string); format(string,sizeof(string),"You have sold your house to %s for $%d", GPN(playerid), BuyingHousePrice[playerid]); SCM(BuyingHouse[playerid],COLOR_LIGHTBLUE,string); strmid(HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], GPN(playerid), 0, strlen(GPN(playerid)), 255); new y,m,d; getdate(y,m,d); format(string, sizeof(string), "[%d/%d/%d][SMH] %s Purchased HouseID %d From %s For $%d", m,d,y,GPN(playerid),PlayerInfo[playerid][pPhousekey], GPN(BuyingHouse[playerid]),BuyingHousePrice[playerid]); HouseLog(string); format(string, sizeof(string), "[%d/%d/%d][SMH] %s Sold HouseID %d For $%d to %s", m,d,y,GPN(BuyingHouse[playerid]),PlayerInfo[playerid][pPhousekey],BuyingHousePrice[playerid],GPN(playerid)); HouseLog(string); FullHouseSave(PlayerInfo[playerid][pPhousekey]); OnPropTextdrawUpdate(1,PlayerInfo[playerid][pPhousekey]); BuyingHousePrice[playerid] = -1; BuyingHouse[playerid] = -1; sqlremovefurn(playerid); // This is the stock im talking about }
Код:
stock sqlremovefurn(playerid) { new query[32]; format(query,sizeof(query),"DELETE FROM `samp_furn` WHERE `owner`='%s'",GPN(playerid)); mysql_query(query); return 1; }