04.11.2011, 10:47
Hi all
I have a small problem
I want to make a function witch i can get the position (XYZ) of my house, but it doesn't work, i tried almost everything but... doesn't work, what to do?
I have a small problem
I want to make a function witch i can get the position (XYZ) of my house, but it doesn't work, i tried almost everything but... doesn't work, what to do?
pawn Код:
stock GetHouseEnterXYZ(houseid)
{
new gtx[128];
format(gtx, sizeof(gtx), "%f%f%f", HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ]);
return strval(gtx);
}
//test command
YCMD:hprice(playerid, params[], help)
{
#pragma unused help
new houseid1, dure[128];
if(sscanf(params, "i", houseid1)) return SendClientMessage(playerid, -1, "Usage: /hprice [House ID]");
format(dure, sizeof(dure), "Coordiantes of house ID %d is %d", houseid1, GetHouseEnterXYZ(houseid1));
SendClientMessage(playerid, COLOR_ORANGE, dure);
return 1;
}