- 0
problema sellhouse
-
Similar Content
-
- 1 answer
- 210 views
-
- 3 answers
- 329 views
-
- 3 replies
- 384 views
-
- 1 reply
- 345 views
-
- 1 answer
- 202 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
InceMan
Problema intalnita (descriere):nu pot sa ii vand cuie-va casa care o detin eu si doar sa ii pun price la casa merge sa pun
Ero(area / rile) / warning-(ul / urile):nu sunt
Liniile de cod / sursa / script-ul(obligatoriu):
CMD:sellhouse(playerid, params[])
{
if(playerVariables[playerid][pStatus] >= 100)
{
new housePrice;
new houseID = getPlayerHouseID(playerid);
if(sscanf(params, "d", housePrice))
return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/sellhouse [price]");
if(houseID < 1)
return 1;
new labelString[96];
if(housePrice != 0 && housePrice > 0)
{
switch(houseVariables[houseID][hHouseLocked])
{
case 1:
{
format(labelString, sizeof(labelString), "House %d (owned)\nOwner: %s\nRent: %d\nPrice: $%s\n\nPress ~k~~F to enter.", houseID,houseVariables[houseID][hHouseOwner],houseVariables[houseID][hRent], NumberFormat(houseVariables[houseID][hHousePrice]));
}
case 0:
{
format(labelString, sizeof(labelString), "House %d (owned)\nOwner: %s\nRent: %d\nPrice: $%s\n\n(locked)", houseID,houseVariables[houseID][hHouseOwner], houseVariables[houseID][hRent], NumberFormat(houseVariables[houseID][hHousePrice]));
}
}
houseVariables[houseID][hHousePrice] = housePrice;
DestroyDynamicPickup(houseVariables[houseID][hPickupID]);
DestroyDynamic3DTextLabel(houseVariables[houseID][hLabelID]);
houseVariables[houseID][hLabelID] = CreateDynamic3DTextLabel(labelString, COLOR_YELLOW, houseVariables[houseID][hHouseExteriorPos][0], houseVariables[houseID][hHouseExteriorPos][1], houseVariables[houseID][hHouseExteriorPos][2], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0);
houseVariables[houseID][hPickupID] = CreateDynamicPickup(1272, 23, houseVariables[houseID][hHouseExteriorPos][0], houseVariables[houseID][hHouseExteriorPos][1], houseVariables[houseID][hHouseExteriorPos][2], 0, houseVariables[houseID][hHouseExteriorID], -1, 250);
format(labelString, sizeof(labelString), "House has been put on sold for $%s!", NumberFormat(houseVariables[houseID][hHousePrice]));
SendClientMessage(playerid, COLOR_WHITE, labelString);
saveHouse(houseID);
}
else if(housePrice == 0)
{
switch(houseVariables[houseID][hHouseLocked])
{
case 1:
{
format(labelString, sizeof(labelString), "House %d (owned)\nOwner: %s\nRent: %d\n\n(locked)", houseID, houseVariables[houseID][hHouseOwner], houseVariables[houseID][hRent]);
}
case 0:
{
format(labelString, sizeof(labelString), "House %d (owned)\nOwner: %s\nRent: %d\n\nPress ~k~~F to enter.", houseID,houseVariables[houseID][hHouseOwner], houseVariables[houseID][hRent]);
}
}
DestroyDynamicPickup(houseVariables[houseID][hPickupID]);
DestroyDynamic3DTextLabel(houseVariables[houseID][hLabelID]);
houseVariables[houseID][hLabelID] = CreateDynamic3DTextLabel(labelString, COLOR_YELLOW, houseVariables[houseID][hHouseExteriorPos][0], houseVariables[houseID][hHouseExteriorPos][1], houseVariables[houseID][hHouseExteriorPos][2], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0);
houseVariables[houseID][hPickupID] = CreateDynamicPickup(1272, 23, houseVariables[houseID][hHouseExteriorPos][0], houseVariables[houseID][hHouseExteriorPos][1], houseVariables[houseID][hHouseExteriorPos][2], 0, houseVariables[houseID][hHouseExteriorID], -1, 250);
houseVariables[houseID][hHousePrice] = 0;
format(labelString, sizeof(labelString), "House has been removed from sold!");
SendClientMessage(playerid, COLOR_WHITE, labelString);
saveHouse(houseID);
}
}
return 1;
}
Imagini / Video (optional):nu am
Ati incercat sa rezolvati singur?: da si nu merge
FiveGame Lands
Pawno Developer, Mapping , Scripter
Since 2016
Link to comment
Share on other sites
8 answers to this question
Recommended Posts