13.11.2015, 20:32
Hi, how do i set the Address at the house location, right now it is where the player login..
This is onplayerconnect
This is onplayerconnect
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 ///");
}