Код:
format(hfile, sizeof(hfile), "/Houses/%d.ini", GetPlayerHouseID(playerid));
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
dini_FloatSet(hfile, "ECPX", X);
dini_FloatSet(hfile, "ECPY", Y);
dini_FloatSet(hfile, "ECPZ", Z);
dini_IntSet(hfile, "CPSet", 1);
DestroyDynamicMapIcon(HMarker[GetPlayerHouseID(playerid)]);
DestroyDynamicCP(HEnterCP[GetPlayerHouseID(playerid)]);
HEnterCP[GetPlayerHouseID(playerid)] = CreateDynamicCP(X, Y, Z, 1, -1, -1, -1, 25);
HMarker[GetPlayerHouseID(playerid)] = CreateDynamicMapIcon(X, Y, Z, 31, 0, -1, -1, -1, 45);
new str[128];
format(str, sizeof(str), "House [ID:%d] enter checkpoint has been set to\n X: %f, Y: %f, Z: %f.", GetPlayerHouseID(playerid), X, Y, Z);
ShowPlayerDialog(playerid, DABOX-1, DIALOG_STYLE_MSGBOX, "House Edit - Enter CP", str, "Ok", "Cancel");
SendClientMessage(playerid, COLOR_BLUE, str);
}
case 1:
{
Instead of using CreateDynamicCP, you could use CreateDynamicPickup, you could then set the model id to 1273, making it just appear as a floating green house icon.
pawn Код:
CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
Make sure you are using the correct parameters for the function, and make sure you have the streamer plugin.