rendered paste body//I would like this develop this into a working property system. I already have the checkpoints and their areas set and i think the files are created (how i made them are below somewhere). I got a file for each property which will hold the property id and cost. But i would like to link the individual files to the checkpoints so that when a player enters it tells them whether the house is for sale and how much or whether its owned and who owns it etc and then for the /buyprop command to reconize the checkpoint the player is in and also get the property id and cost which is why when a player enters the checkpoint that data needs to be given. If you could rewrite this for mer please and it shouldnt take too long as most of it is here then that would be great, here is what i got so far:
//command to buy a property
if(strcmp(cmd, "/buyprop", true) == 0)
{
new filename[256];
GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
proptemp[playerid] = dini_Int(udb_encode(sendername), "propowned");
format(filename, sizeof(filename), "%d", PROP_AMOUNT);
tmp = dini_Get(filename, "owner");
if(Logged[playerid] != 1) {
SendClientMessage(playerid, COLOR_RED, "You must be logged in to purchase a property!");
return 1;
}
if (Prop[playerid] == 0 && Logged[playerid] == 1) {
SendClientMessage(playerid, COLOR_RED, "You must be at a property to buy it!");
return 1;
}
if (strcmp(tmp, sendername,false) == 0) {
SendClientMessage(playerid, COLOR_WHITE, "You already own this property");
return 1;
}
format(filename, sizeof(filename), "%d", PROP_AMOUNT);
bought[playerid] = dini_Int(filename, "bought");
if(proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "This property is owned by %s and is not for sale!", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
if(proptemp[playerid] > 0) {
SendClientMessage(playerid, COLOR_RED, "You can only own ONE vehicle at a time! You must sell your other vehicle first!");
return 1;
}
if(Logged[playerid] == 1 && Prop[playerid] != 0) {
new cash[MAX_PLAYERS];
cash[playerid] = GetPlayerMoney(playerid);
if(cash[playerid] >= propcost[playerid]) {
new stringa[256];
format(stringa, sizeof(stringa), "-%d", propcost[playerid]);
GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
format(filename, sizeof(filename), "%d", PROP_AMOUNT);
dini_Set(filename, "owner", sendername);
dini_IntSet(filename, "bought", 1);
GivePlayerMoney(playerid, -propcost[playerid]);
new string5[256];
format(string5, sizeof(string5), "You just bought this property for $%d, Welcome to your new home.", propcost[playerid]);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string5);
return 1;
}
if(cash[playerid] < propcost[playerid]) {
new string6[256];
format(string6, sizeof(string6), "You do not have $%d and therefore cannot purchase this property!", propcost[playerid]);
SendClientMessage(playerid, COLOR_RED, string6);
return 1;
}
}
return 1;
}
//OnPlayerEnter/LeaveCheckpoint checkpoints for each property
public OnPlayerEnterCheckpoint(playerid) {
new string[256];
new tmp[256];
new filename[256];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
proptemp[playerid] = dini_Int(udb_encode(sendername), "propowned");
format(filename, sizeof(filename), "%d", PROP_AMOUNT);
tmp = dini_Get(filename, "owner");
bought[playerid] = dini_Int(filename, "bought");
switch (gPlayerCheckpointStatus[playerid]) {
case CP_PROP1: {
Prop[playerid] = 1;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP2: {
Prop[playerid] = 2;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP3: {
Prop[playerid] = 3;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP4: {
Prop[playerid] = 4;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP5: {
Prop[playerid] = 5;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP6: {
Prop[playerid] = 6;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP7: {
Prop[playerid] = 7;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP8: {
Prop[playerid] = 8;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP9: {
Prop[playerid] = 9;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP10: {
Prop[playerid] = 10;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP11: {
Prop[playerid] = 11;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP12: {
Prop[playerid] = 12;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP13: {
Prop[playerid] = 13;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP14: {
Prop[playerid] = 14;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP15: {
Prop[playerid] = 15;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP16: {
Prop[playerid] = 16;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP17: {
Prop[playerid] = 17;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP18: {
Prop[playerid] = 18;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP19: {
Prop[playerid] = 19;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP20: {
Prop[playerid] = 20;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP21: {
Prop[playerid] = 21;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP22: {
Prop[playerid] = 22;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP23: {
Prop[playerid] = 23;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP24: {
Prop[playerid] = 24;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP25: {
Prop[playerid] = 25;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP26: {
Prop[playerid] = 26;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP27: {
Prop[playerid] = 27;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP28: {
Prop[playerid] = 28;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP29: {
Prop[playerid] = 29;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP30: {
Prop[playerid] = 30;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
case CP_PROP31: {
Prop[playerid] = 31;
if (bought[playerid] != 1) {
format(string, sizeof(string), "This property costs %d, type /buyprop to purchase it", propcost);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (strcmp(tmp, sendername, false) == 0) {
format(string, sizeof(string), "Welcome home %s", sendername);
SendClientMessage(playerid, COLOR_YELLOW, string); }
else
if (proptemp[playerid] == 0 && bought[playerid] == 1) {
format(string, sizeof(string), "Welcome to %s's home", tmp);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
}
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
if (Prop[playerid] != 0)
{
Prop[playerid] = 0;
}
return 1;
}
//creates a file for each property, is in OnGameModeInit
for (new temp = 1; temp < PROP_AMOUNT; temp++)
{
if(temp == 1) {
Prop[temp] = 1;
propcost[temp] = 80000;
}
if(temp == 2) {
Prop[temp] = 2;
propcost[temp] = 110000;
}
if(temp == 3) {
Prop[temp] = 3;
propcost[temp] = 160000;
}
if(temp == 4) {
Prop[temp] = 4;
propcost[temp] = 160000;
}
if(temp == 5) {
Prop[temp] = 5;
propcost[temp] = 110000;
}
if(temp == 6) {
Prop[temp] = 6;
propcost[temp] = 425000;
}
if(temp == 7) {
Prop[temp] = 7;
propcost[temp] = 190000;
}
if(temp == 8) {
Prop[temp] = 8;
propcost[temp] = 220000;
}
if(temp == 9) {
Prop[temp] = 9;
propcost[temp] = 160000;
}
if(temp == 10) {
Prop[temp] = 10;
propcost[temp] = 80000;
}
if(temp == 11) {
Prop[temp] = 11;
propcost[temp] = 120000;
}
if(temp == 12) {
Prop[temp] = 12;
propcost[temp] = 350000;
}
if(temp == 13) {
Prop[temp] = 13;
propcost[temp] = 110000;
}
if(temp == 14) {
Prop[temp] = 14;
propcost[temp] = 280000;
}
if(temp == 15) {
Prop[temp] = 15;
propcost[temp] = 280000;
}
if(temp == 16) {
Prop[temp] = 16;
propcost[temp] = 60000;
}
if(temp == 17) {
Prop[temp] = 17;
propcost[temp] = 220000;
}
if(temp == 18) {
Prop[temp] = 18;
propcost[temp] = 190000;
}
if(temp == 19) {
Prop[temp] = 19;
propcost[temp] = 320000;
}
if(temp == 20) {
Prop[temp] = 20;
propcost[temp] = 110000;
}
if(temp == 21) {
Prop[temp] = 21;
propcost[temp] = 80000;
}
if(temp == 22) {
Prop[temp] = 22;
propcost[temp] = 110000;
}
if(temp == 23) {
Prop[temp] = 23;
propcost[temp] = 70000;
}
if(temp == 24) {
Prop[temp] = 24;
propcost[temp] = 220000;
}
if(temp == 25) {
Prop[temp] = 25;
propcost[temp] = 220000;
}
if(temp == 26) {
Prop[temp] = 26;
propcost[temp] = 320000;
}
if(temp == 27) {
Prop[temp] = 27;
propcost[temp] = 70000;
}
if(temp == 28) {
Prop[temp] = 28;
propcost[temp] = 190000;
}
if(temp == 29) {
Prop[temp] = 29;
propcost[temp] = 60000;
}
if(temp == 30) {
Prop[temp] = 30;
propcost[temp] = 60000;
}
if(temp == 31) {
Prop[temp] = 31;
propcost[temp] = 220000;
}
new tmpname[PROP_AMOUNT];
format(tmpname,sizeof(tmpname),"%d",temp);
if (!dini_Exists(tmpname)) {
dini_Create(tmpname);
dini_Set(tmpname, "owner", "server");
dini_IntSet(tmpname, "propid", Prop[temp]);
dini_IntSet(tmpname, "propcost", propcost[temp]);
dini_IntSet(tmpname, "bought", 0);
}
}