19.10.2013, 23:02
how to add the XYZ coordinates of the interior in the /createhouses CMD ? any idea ?
pawn Код:
enum hInfo
{
Float:hEnterX,
Float:hEnterY,
Float:hEnterZ,
Float:hExitX,
Float:hExitY,
Float:hExitZ,
hInsideInt,
hOutsideInt,
hInsideVW,
hOutsideVW,
hOwned,
hOwner,
hPrice,
hCheckpoint,
hIcon,
hID,
}
new HouseInfo[MAX_HOUSES][hInfo];
new HouseEnterCP[MAX_HOUSES];
CMD:createhouse(playerid, params[])
{
new HID, HVW, HPrice, HInt,string[128], houseid;
new Float:x,Float:y,Float:z;
if(sscanf(params, "iiii", HID, HInt, HVW, HPrice)) return SendClientMessage(playerid, COLOR_WHITE, "/createhouse [House ID] [interior] [VW] [price]");
HouseInfo[houseid][hID] = HID;
HouseInfo[houseid][hInsideInt] = HInt;
HouseInfo[houseid][hInsideVW] = HVW;
HouseInfo[houseid][hPrice] = HPrice;
HouseInfo[houseid][hEnterX] = x;
HouseInfo[houseid][hEnterY] = y;
HouseInfo[houseid][hEnterZ] = z;
HouseInfo[houseid][hOwned] = 0;
GetPlayerPos(playerid,x,y,z);
HouseEnterCP[houseid] = CreateDynamicCP(x,y,z,1.0,-1,-1,-1,50.0);
format(string, sizeof(string), "House ID: %i\nOwner: No Owner\nPrice: $%i", HID, HPrice);
CreateDynamic3DTextLabel(string,COLOR_WHITE,x,y,z,50.0);
return 1;
}