12.10.2011, 16:10
Hello,
I'd like to know how to convert the original commands to YCMD
Here are the commands:
I'd like to know how to convert the original commands to YCMD
Here are the commands:
pawn Код:
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if(!strcmp(cmdtext, "/buyhouse", true))
{ // Buying house.
if(HouseOwner[playerid] == false)
{
if(IsSettingUpHouse[playerid] == false)
{
ShowPlayerDialog(playerid, 666, DIALOG_STYLE_MSGBOX, "Confirmation", "You are about to create your very own house.\n\nPress 'Continue' to start.", "Continue", "Cancel");
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "You are already setting up your house.");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "You already own a house.");
return 1;
}
return 1;
}
if(!strcmp(cmdtext, "/houseupgrade", true))
{
if(HouseOwner[playerid] == true)
{
ShowPlayerDialog(playerid, 680, DIALOG_STYLE_LIST, "House Upgrade", "Upgrade Name\nUpgrade Description\nUpgrade Entrance\nUpgrade Interior\nUpgrade Vehicle\nUpgrade Rent Info", "Select", "Cancel");
return 1;
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "You don't own a house.");
}
return 1;
}
if(!strcmp(cmdtext, "/confirm", true))
{ // Confirming entrance/vehicle.
if(SettingUpEntrance[playerid] == true)
{
new str[32], str2[32], str3[32];
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetupHouseInfo[playerid][SetupPX] = X;
SetupHouseInfo[playerid][SetupPY] = Y;
SetupHouseInfo[playerid][SetupPZ] = Z;
HousePickup[playerid] = CreatePickup(1273, 23, X, Y, Z);
PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFF00FF, "You have set your house entrance coordinates to:");
format(str, sizeof(str), "X: %f", X);
SendClientMessage(playerid, 0xFFFFFFAA, str);
format(str2, sizeof(str2), "Y: %f", Y);
SendClientMessage(playerid, 0xFFFFFFAA, str2);
format(str3, sizeof(str3), "Z: %f", Z);
SendClientMessage(playerid, 0xFFFFFFAA, str3);
ShowPlayerDialog(playerid, 668, DIALOG_STYLE_LIST, "House Setup", "Entrance\nName\nDescription\nInterior\nVehicle\nRent\nPurchase", "Select", "Cancel");
HasAlreadySetupEntrance[playerid] = true;
return 1;
}
if(IsSettingUpVehicle[playerid] == true)
{
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
SetupHouseInfo[playerid][SetupCarX] = X;
SetupHouseInfo[playerid][SetupCarY] = Y;
SetupHouseInfo[playerid][SetupCarZ] = Z;
SetupHouseInfo[playerid][SetupCarRot] = A;
HouseCar[playerid] = CreateVehicle(SetupHouseInfo[playerid][SetupCarModel], X, Y, Z, A, -1, -1, 5000000);
PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
ShowPlayerDialog(playerid, 668, DIALOG_STYLE_LIST, "House Setup", "Entrance\nName\nDescription\nInterior\nVehicle\nRent\nPurchase", "Select", "Cancel");
HasAlreadySetupCar[playerid] = true;
IsSettingUpVehicle[playerid] = false;
return 1;
}
if(IsUpgradingVehicle[playerid] == true)
{
for(new h = 0; h < sizeof(HouseInfo); h++)
{
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
HouseInfo[h][CarX] = X;
HouseInfo[h][CarY] = Y;
HouseInfo[h][CarZ] = Z;
HouseInfo[h][CarRot] = A;
HouseCar[playerid] = CreateVehicle(HouseInfo[h][CarModel], X, Y, Z, A, -1, -1, 5000000);
PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
IsUpgradingVehicle[playerid] = false;
return 1;
}
}
return 1;
}
if(!strcmp(cmdtext, "/lockhouse", true))
{ // Locking house.
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseOwner[playerid] == true)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[h][PX], HouseInfo[h][PY], HouseInfo[h][PZ]))
{
if(HouseInfo[h][Locked] == 0)
{
HouseInfo[h][Locked] = 1;
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~r~House locked!", 5000, 6);
return 1;
}
else if(HouseInfo[h][Locked] == 1)
{
HouseInfo[h][Locked] = 0;
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
GameTextForPlayer(playerid, "~g~House unlocked!", 5000, 6);
return 1;
}
else if(!IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[h][PX], HouseInfo[h][PY], HouseInfo[h][PZ]))
{
SendClientMessage(playerid, 0xE21F1FFF, "You are not near your house.");
return 1;
}
}
else if(HouseOwner[playerid] == false)
{
SendClientMessage(playerid, 0xE21F1FFF, "You don't own a house.");
return 1;
}
}
}
return 1;
}
if(!strcmp(cmdtext, "/enter", true))
{ // Enter house.
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[h][PX], HouseInfo[h][PY], HouseInfo[h][PZ]))
{
if(HouseInfo[h][Locked] == 0 || IsRentingHouse[playerid] == true)
{
SetPlayerPos(playerid, HouseInfo[h][TX], HouseInfo[h][TY], HouseInfo[h][TZ]);
SetPlayerFacingAngle(playerid, HouseInfo[h][TA]);
SetPlayerInterior(playerid, HouseInfo[h][Int]);
SetPlayerVirtualWorld(playerid, HouseInfo[h][Vir]);
return 1;
}
else
{
SendClientMessage(playerid, 0xE12F1FFF, "This house is locked.");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xE12F1FFF, "You are not near a house.");
return 1;
}
}
return 1;
}
if(!strcmp(cmdtext, "/exit", true))
{ // Exit house.
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[h][TX], HouseInfo[h][TY], HouseInfo[h][TZ]))
{
SetPlayerPos(playerid, HouseInfo[h][PX], HouseInfo[h][PY], HouseInfo[h][PZ]);
SetPlayerFacingAngle(playerid, 0.0);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
else
{
SendClientMessage(playerid, 0xE12F1FFF, "You are not in a house.");
return 1;
}
}
return 1;
}
if(!strcmp(cmdtext, "/sellhouse", true))
{ // Sell your house.
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseOwner[playerid] == true)
{
new str[64];
format(str, sizeof(str), "Congratulations! You have sold your house for $%i.",HouseInfo[h][Price]/2);
SendClientMessage(playerid, 0xFFFF00FF, str);
GivePlayerMoney(playerid, HouseInfo[h][Price]/2);
HouseOwner[playerid] = false;
HouseInfo[h][Name] = 0;
HouseInfo[h][Desc] = 0;
HouseInfo[h][Owner] = 0;
HouseInfo[h][Price] = 0;
HouseInfo[h][PX] = 0.0;
HouseInfo[h][PY] = 0.0;
HouseInfo[h][PZ] = 0.0;
HouseInfo[h][TX] = 0.0;
HouseInfo[h][TY] = 0.0;
HouseInfo[h][TZ] = 0.0;
HouseInfo[h][TA] = 0.0;
HouseInfo[h][Int] = 0;
HouseInfo[h][Vir] = 0;
DestroyVehicle(HouseCar[playerid]);
DestroyPickup(HousePickup[playerid]);
Delete3DTextLabel(HouseLabel[playerid]);
new file[100], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, 24);
format(file, sizeof(file), "Houses/%s.ini", pName);
dini_Remove(file);
return 1;
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "You don't own a house.");
return 1;
}
}
return 1;
}
if(!strcmp(cmdtext, "/storecash", true))
{ // Store cash in house safe.
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseOwner[playerid] == true)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[h][TX], HouseInfo[h][TY], HouseInfo[h][TZ]))
{
ShowPlayerDialog(playerid, 674, DIALOG_STYLE_INPUT, "Cash", "Please enter an amount you would like to store in your cash box.", "Store", "Cancel");
return 1;
}
else
{
SendClientMessage(playerid, 0xE12F1FFF, "You are not in a house.");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xE12F1FFF, "You don't own a house.");
return 1;
}
}
return 1;
}
if(!strcmp(cmdtext, "/takecash", true))
{ // Take cash from house safe.
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseOwner[playerid] == true)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[h][TX], HouseInfo[h][TY], HouseInfo[h][TZ]))
{
ShowPlayerDialog(playerid, 675, DIALOG_STYLE_INPUT, "Cash", "Please enter an amount you would like to take from your cash box.", "Store", "Cancel");
return 1;
}
else
{
SendClientMessage(playerid, 0xE12F1FFF, "You are not in a house.");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xE12F1FFF, "You don't own a house.");
return 1;
}
}
return 1;
}
if(!strcmp(cmdtext, "/renthouse", true))
{ // Renting house.
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseOwner[playerid] == false)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[h][TX], HouseInfo[h][TY], HouseInfo[h][TZ]))
{
if(HouseInfo[h][Rentable] == 1)
{
if(IsRentingHouse[playerid] == false)
{
new string[64];
format(string, sizeof(string), "Are you sure you would like to rent this house for $%i?", HouseInfo[h][RentPrice]);
ShowPlayerDialog(playerid, 676, DIALOG_STYLE_MSGBOX, "Confirm Rent", string, "Yes", "No");
return 1;
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "You already rent a house!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "This house is not available for rent.");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "You are not near a house.");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "You cannot rent a house if you own a house!");
return 1;
}
}
return 1;
}
if(!strcmp(cmdtext, "/unrenthouse", true))
{ // Unrenting house.
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(IsRentingHouse[playerid] == true)
{
SendClientMessage(playerid, 0xFFFF00FF, "You have unrented the house, you are now homeless.");
IsRentingHouse[playerid] = false;
return 1;
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "You are not renting any house!");
return 1;
}
}
return 1;
}
if(strcmp(cmd, "/park", true) == 0)
{ // Park house car.
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseOwner[playerid] == true)
{
if(IsPlayerInVehicle(playerid, HouseCar[playerid]))
{
new Float:X, Float:Y, Float:Z, Float:A;
GetVehiclePos(HouseCar[playerid], X, Y, Z);
GetVehicleZAngle(HouseCar[playerid], A);
HouseInfo[h][CarX] = X;
HouseInfo[h][CarY] = Y;
HouseInfo[h][CarZ] = Z;
HouseInfo[h][CarRot] = A;
DestroyVehicle(HouseCar[playerid]);
HouseCar[playerid] = CreateVehicle(HouseInfo[h][CarModel], HouseInfo[h][CarX], HouseInfo[h][CarY], HouseInfo[h][CarZ], HouseInfo[h][CarRot], -1, -1, 5000000);
SendClientMessage(playerid, 0x33CCFFAA, "House car parked successfully.");
PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
return 1;
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "You are not in your vehicle!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "You don't own a house.");
return 1;
}
}
return 1;
}
if(strcmp(cmd, "/approvehouse", true) == 0)
{ // Accepting house.
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: Unknown command.");
new tmp[128], giveplayerid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, 0xE21F1FFF, "USAGE: /approvehouse [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid)) {
if(giveplayerid != INVALID_PLAYER_ID) {
if(IsApprovalPending[giveplayerid] == true) {
new money = GetPlayerMoney(giveplayerid);
if(money < SetupHouseInfo[giveplayerid][SetupPrice])
{ // Cannot afford, so we'll reset all variables used.
SendClientMessage(giveplayerid, 0xE21F1FFF, "You cannot afford the house.");
IsSettingUpHouse[giveplayerid] = false; SettingUpEntrance[giveplayerid] = false;
HasAlreadySetupName[giveplayerid] = false; HasAlreadySetupDesc[giveplayerid] = false;
HasAlreadySetupEntrance[giveplayerid] = false; HasAlreadySetupInterior[giveplayerid] = false;
HasAlreadySetupRentable[giveplayerid] = false; HasAlreadySetupRentPrice[giveplayerid] = false;
HasAlreadySetupCar[giveplayerid] = false;
SetupHouseInfo[giveplayerid][SetupName] = 0; SetupHouseInfo[giveplayerid][SetupDesc] = 0;
SetupHouseInfo[giveplayerid][SetupOwner] = 0; SetupHouseInfo[giveplayerid][SetupPrice] = 0;
SetupHouseInfo[giveplayerid][SetupPX] = 0.0; SetupHouseInfo[giveplayerid][SetupPY] = 0.0;
SetupHouseInfo[giveplayerid][SetupPZ] = 0.0; SetupHouseInfo[giveplayerid][SetupTX] = 0.0;
SetupHouseInfo[giveplayerid][SetupTY] = 0.0; SetupHouseInfo[giveplayerid][SetupTZ] = 0.0;
SetupHouseInfo[giveplayerid][SetupTA] = 0.0; SetupHouseInfo[giveplayerid][SetupInt] = 0;
SetupHouseInfo[giveplayerid][SetupVir] = 0; SetupHouseInfo[giveplayerid][SetupRentable] = 0;
SetupHouseInfo[giveplayerid][SetupRentPrice] = 0; SetupHouseInfo[giveplayerid][SetupCarX] = 0.0;
SetupHouseInfo[giveplayerid][SetupCarY] = 0.0; SetupHouseInfo[giveplayerid][SetupCarZ] = 0.0;
SetupHouseInfo[giveplayerid][SetupCarRot] = 0.0; SetupHouseInfo[giveplayerid][SetupCarModel] = 0;
DestroyPickup(HousePickup[playerid]);
Delete3DTextLabel(HouseLabel[playerid]);
DestroyVehicle(HouseCar[playerid]);
IsApprovalPending[giveplayerid] = false;
PlayerPlaySound(giveplayerid, 1085, 0.0, 0.0, 0.0);
new file[100], pname[24];
GetPlayerName(giveplayerid, pname, 24);
format(file, sizeof(file), "Houses/%s.ini", pname);
dini_Remove(file);
return 1;
}
else { // If player can afford house.
new str[64];
for(new h = 0; h < sizeof(HouseInfo); h++)
{ // Store setup data in house variables.
new str2[128];
HouseInfo[h][Name] = SetupHouseInfo[giveplayerid][SetupName];
HouseInfo[h][Desc] = SetupHouseInfo[giveplayerid][SetupDesc];
HouseInfo[h][Owner] = SetupHouseInfo[giveplayerid][SetupOwner];
HouseInfo[h][Price] = SetupHouseInfo[giveplayerid][SetupPrice];
HouseInfo[h][PX] = SetupHouseInfo[giveplayerid][SetupPX];
HouseInfo[h][PY] = SetupHouseInfo[giveplayerid][SetupPY];
HouseInfo[h][PZ] = SetupHouseInfo[giveplayerid][SetupPZ];
HouseInfo[h][TX] = SetupHouseInfo[giveplayerid][SetupTX];
HouseInfo[h][TY] = SetupHouseInfo[giveplayerid][SetupTY];
HouseInfo[h][TZ] = SetupHouseInfo[giveplayerid][SetupTZ];
HouseInfo[h][TA] = SetupHouseInfo[giveplayerid][SetupTA];
HouseInfo[h][Int] = SetupHouseInfo[giveplayerid][SetupInt];
HouseInfo[h][Vir] = SetupHouseInfo[giveplayerid][SetupVir];
HouseInfo[h][Locked] = 0;
HouseInfo[h][Rentable] = SetupHouseInfo[giveplayerid][SetupRentable];
HouseInfo[h][RentPrice] = SetupHouseInfo[giveplayerid][SetupRentPrice];
HouseInfo[h][CarModel] = SetupHouseInfo[giveplayerid][SetupCarModel];
HouseInfo[h][CarX] = SetupHouseInfo[giveplayerid][SetupCarX];
HouseInfo[h][CarY] = SetupHouseInfo[giveplayerid][SetupCarY];
HouseInfo[h][CarZ] = SetupHouseInfo[giveplayerid][SetupCarZ];
HouseInfo[h][CarRot] = SetupHouseInfo[giveplayerid][SetupCarRot];
PlayerPlaySound(giveplayerid, 1149, 0.0, 0.0, 0.0);
format(str, sizeof(str), "Congratulations! You have bought a house for $%i.", SetupHouseInfo[giveplayerid][SetupPrice]);
SendClientMessage(giveplayerid, 0xFFFF00FF, str);
GivePlayerMoney(giveplayerid, -HouseInfo[h][Price]);
HouseOwner[giveplayerid] = true;
IsSettingUpHouse[giveplayerid] = false; SettingUpEntrance[giveplayerid] = false;
HasAlreadySetupName[giveplayerid] = false; HasAlreadySetupDesc[giveplayerid] = false;
HasAlreadySetupEntrance[giveplayerid] = false; HasAlreadySetupInterior[giveplayerid] = false;
SetupHouseInfo[giveplayerid][SetupName] = 0; SetupHouseInfo[giveplayerid][SetupDesc] = 0;
SetupHouseInfo[giveplayerid][SetupOwner] = 0; SetupHouseInfo[giveplayerid][SetupPrice] = 0;
SetupHouseInfo[giveplayerid][SetupPX] = 0.0; SetupHouseInfo[giveplayerid][SetupPY] = 0.0;
SetupHouseInfo[giveplayerid][SetupPZ] = 0.0; SetupHouseInfo[giveplayerid][SetupTX] = 0.0;
SetupHouseInfo[giveplayerid][SetupTY] = 0.0; SetupHouseInfo[giveplayerid][SetupTZ] = 0.0;
SetupHouseInfo[giveplayerid][SetupTA] = 0.0; SetupHouseInfo[giveplayerid][SetupInt] = 0;
SetupHouseInfo[giveplayerid][SetupVir] = 0; HasAlreadySetupRentable[giveplayerid] = false;
SetupHouseInfo[giveplayerid][SetupRentable] = 0; HasAlreadySetupCar[giveplayerid] = false;
SetupHouseInfo[giveplayerid][SetupRentable] = 0;
SetupHouseInfo[giveplayerid][SetupRentPrice] = 0; SetupHouseInfo[giveplayerid][SetupCarX] = 0.0;
SetupHouseInfo[giveplayerid][SetupCarY] = 0.0; SetupHouseInfo[giveplayerid][SetupCarZ] = 0.0;
SetupHouseInfo[giveplayerid][SetupCarRot] = 0.0; SetupHouseInfo[giveplayerid][SetupCarModel] = 0;
HasAlreadySetupRentPrice[giveplayerid] = false;
IsApprovalPending[giveplayerid] = false;
new pname[MAX_PLAYER_NAME];
new name[256], desc[256];
new file[100];
GetPlayerName(giveplayerid, pname, sizeof(pname));
format(file, sizeof(file), "Houses/%s.ini", pname);
name = dini_Get(file, "Name");
desc = dini_Get(file, "Description");
format(str2, sizeof(str2), "Name: %s\n\nDescription: %s\n\nOwner: %s", name, desc, pname);
HouseLabel[giveplayerid] = Create3DTextLabel(str2, 0xF97804FF, HouseInfo[h][PX], HouseInfo[h][PY], HouseInfo[h][PZ], 20.0, 0);
for(new i; i<MAX_PLAYERS; i++)
{
SetPlayerMapIcon(i, HouseUser[playerid], HouseInfo[h][CarX], HouseInfo[h][CarY], HouseInfo[h][CarZ], 31, MAPICON_GLOBAL);
}
return 1;
}
}
}
}
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "That player didn't create a house yet!");
}
return 1;
}
if(strcmp(cmd, "/denyhouse", true) == 0)
{ // Deny house.
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: Unknown command.");
new tmp[128], giveplayerid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, 0xE21F1FFF, "USAGE: /denyhouse [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid)) {
if(giveplayerid != INVALID_PLAYER_ID) {
if(IsApprovalPending[giveplayerid] == true) {
SendClientMessage(giveplayerid, 0xE21F1FFF, "Your house request was denied.");
IsSettingUpHouse[giveplayerid] = false; SettingUpEntrance[giveplayerid] = false;
HasAlreadySetupName[giveplayerid] = false; HasAlreadySetupDesc[giveplayerid] = false;
HasAlreadySetupEntrance[giveplayerid] = false; HasAlreadySetupInterior[giveplayerid] = false;
SetupHouseInfo[giveplayerid][SetupName] = 0; SetupHouseInfo[giveplayerid][SetupDesc] = 0;
SetupHouseInfo[giveplayerid][SetupOwner] = 0; SetupHouseInfo[giveplayerid][SetupPrice] = 0;
SetupHouseInfo[giveplayerid][SetupPX] = 0.0; SetupHouseInfo[giveplayerid][SetupPY] = 0.0;
SetupHouseInfo[giveplayerid][SetupPZ] = 0.0; SetupHouseInfo[giveplayerid][SetupTX] = 0.0;
SetupHouseInfo[giveplayerid][SetupTY] = 0.0; SetupHouseInfo[giveplayerid][SetupTZ] = 0.0;
SetupHouseInfo[giveplayerid][SetupTA] = 0.0; SetupHouseInfo[giveplayerid][SetupInt] = 0;
SetupHouseInfo[giveplayerid][SetupVir] = 0; SetupHouseInfo[giveplayerid][SetupRentable] = 0;
SetupHouseInfo[giveplayerid][SetupRentPrice] = 0;
IsApprovalPending[giveplayerid] = false;
DestroyPickup(HousePickup[giveplayerid]);
Delete3DTextLabel(HouseLabel[giveplayerid]);
PlayerPlaySound(giveplayerid, 1085, 0.0, 0.0, 0.0);
new file[100], pname[24];
GetPlayerName(giveplayerid, pname, 24);
format(file, sizeof(file), "Houses/%s.ini", pname);
dini_Remove(file);
return 1;
}
}
}
else
{
SendClientMessage(playerid, 0xE21F1FFF, "That player didn't create a house yet!");
}
return 1;
}
return 0;
}