Hi, how do i set the Address at the house location, right now it is where the player login..
pawn Код:
if(PlayerInfo[playerid][pHouseAccepted] > 0)
{
print("/// CREATE HOUSE ///");
printf("PlayerID: %d", playerid);
new hnametag[64];
// new hloctag[64];
//pickup
HousePickupIDTemp[playerid] = CreatePickup(1273,1,PlayerInfo[playerid][pHouseX],PlayerInfo[playerid][pHouseY],PlayerInfo[playerid][pHouseZ]);
printf("PickupID: %d", HousePickupIDTemp[playerid]);
// NRW TAG
new string[256];
strmid(hnametag, PlayerInfo[playerid][pHouseTag], 0, strlen(PlayerInfo[playerid][pHouseTag]), 255);
strmid(PlayerInfo[playerid][pHouseOwnerTag], Name(playerid), 0, strlen(Name(playerid)), 255);
new location[MAX_ZONE_NAME];
new address= 135 + random(700);
GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
format(string,sizeof(string),"%s\n\n"COL_GREEN"Owner: "COL_WHITE"%s\nAddress: %d %s",PlayerInfo[playerid][pHouseTag], PlayerInfo[playerid][pHouseOwnerTag],address, location);
HouseTextOwnerID[playerid] = Create3DTextLabel(string,COLOR_GREEN,PlayerInfo[playerid][pHouseX],PlayerInfo[playerid][pHouseY],PlayerInfo[playerid][pHouseZ]+0.74,20.0,0,1);
//vehicle
HouseVehicleIDTemp[playerid] = CreateVehicle(PlayerInfo[playerid][pHouseCarModel],PlayerInfo[playerid][pHouseCarX],PlayerInfo[playerid][pHouseCarY],PlayerInfo[playerid][pHouseCarZ],PlayerInfo[playerid][pHouseCarFacing],PlayerInfo[playerid][pHouseCarColor],PlayerInfo[playerid][pHouseCarColor2], 900);
printf("VehicleID: %d", HouseVehicleIDTemp[playerid]);
print("/// CREATE HOUSE END ///");
}
Also, the address is based on where the player login, so on my server the newbie spawn is at blueberry, = which Means even if my house is in Willowfield in LS it says the address is "blueberry". i want the address to be where the house is created. its a dynamic house system by the way, its saved on the player, and disappears when they disconnect from the server