pawn Код:
CMD:createhouse(playerid,params[])
{
new price,Query[256],houseid = GetHouseFreeSlot();
if(pInfo[playerid][pAdmin] < 5 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,""embed_red"[ERROR] "embed_white"You are not authorized to use this command!");
if(sscanf(params, "i", price)) return SendClientMessage(playerid,0xFFBF00FF,"[Usage] {FFFFFF}/createhouse [Price]");
hInfo[houseid][hPrice] = price;
GetPlayerPos(playerid,hInfo[houseid][hEnterX],hInfo[houseid][hEnterY],hInfo[houseid][hEnterZ]);
hInfo[houseid][hInterior] = 12;
hInfo[houseid][hExitX] = 2807.619873;
hInfo[houseid][hExitY] = -1171.899902;
hInfo[houseid][hExitZ] = 1025.570312;
hInfo[houseid][hWorld] = 0;
hInfo[houseid][hLocked] = 0;
hInfo[houseid][hOnSale] = 1;
format(Query, sizeof(Query),"INSERT INTO `samp_houses` SET \
`Owner` = 'None',\
`EnterX` = '%f', \
`EnterY` = '%f', \
`EnterZ` = '%f', \
`ExitX` = '%f', \
`ExitY` = '%f', \
`ExitZ` = '%f', \
`World` = '%d', \
`Locked` = '%d', \
`OnSale` = '%d', \
`Price` = '%d'",
hInfo[houseid][hEnterX],
hInfo[houseid][hEnterY],
hInfo[houseid][hEnterZ],
hInfo[houseid][hExitX],
hInfo[houseid][hExitY],
hInfo[houseid][hExitZ],
hInfo[houseid][hWorld],
hInfo[houseid][hLocked],
hInfo[houseid][hOnSale],
hInfo[houseid][hPrice]);
mysql_query(Query);
UpdateHouseLabel(houseid);
return 1;
}