Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function OnPropTextdrawUpdate(update, h)
- {
- new i = h;
- new PropertyString[256];
- if(update == 1)
- {
- new type[10],locked[20];
- if(HouseInfo[h][hInteriorType] == 0) format(type, sizeof(type),"Small");
- if(HouseInfo[h][hInteriorType] == 1) format(type, sizeof(type),"Medium");
- if(HouseInfo[h][hInteriorType] == 2) format(type, sizeof(type),"Big");
- if(HouseInfo[h][hLock] == 1) format(locked, sizeof(locked), "\n(locked)");
- HouseIcon[h] = CreateDynamicMapIcon(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 31, -1, 0, 0, -1, 50.0);
- if(HouseInfo[h][hOwned] == 0)
- {
- DestroyDynamic3DTextLabel(HouseLabel[h]);
- format(PropertyString, sizeof(PropertyString),"{FFFFFF}House {BA3434}%d \n{BA3434}%s \n{FFFFFF}Size: {BA3434}%s \n{FFFFFF}Price: {BA3434}$%s (/buyhouse) \n{FFFFFF}Level: {BA3434}%d %s",h,HouseInfo[h][hDiscription],type,FormatNumber(HouseInfo[h][hValue]),HouseInfo[h][hLevel],locked);
- HouseLabel[h] = CreateDynamic3DTextLabel(PropertyString, 0xFFFFFFFF, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
- DestroyDynamicPickup(HousePickup[h]);
- HousePickup[h] = CreateDynamicPickup(1273, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
- }
- else if(HouseInfo[h][hOwned] == 1)
- {
- new tenants=0,query[256],selltext[64];
- format(query, sizeof(query), "SELECT * FROM `users` WHERE `Rented` = '%d' AND `Status`='1'", h);
- new Cache: membresult = mysql_query(SQL, query);
- for(new ii, j = cache_get_row_count (); ii != j; ++ii)
- {
- tenants++;
- }
- cache_delete(membresult);
- if(HouseInfo[h][hPrice] > 0)
- {
- format(selltext, sizeof(selltext),"\n{FFFFFF}Price: {BA3434}$%s (/buyhouse)",FormatNumber(HouseInfo[h][hPrice]));
- }
- if(HouseInfo[h][hRentabil] == 1)
- {
- DestroyDynamic3DTextLabel(HouseLabel[h]);
- format(PropertyString, sizeof(PropertyString),"{FFFFFF}House {BA3434}%d \n{BA3434}%s \n{FFFFFF}Owner: {BA3434}%s \n{FFFFFF}Tenants: {BA3434}%d \n{FFFFFF}Size: {BA3434}%s \n{FFFFFF}Rent: {BA3434}$%d (/rentroom) %s %s",h,HouseInfo[h][hDiscription],HouseInfo[h][hOwner],tenants,type,HouseInfo[h][hRent],selltext,locked);
- HouseLabel[h] = CreateDynamic3DTextLabel(PropertyString, 0xFFFFFFFF, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
- DestroyDynamicPickup(HousePickup[h]);
- HousePickup[h] = CreateDynamicPickup(1272, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
- }
- else
- {
- DestroyDynamic3DTextLabel(HouseLabel[h]);
- format(PropertyString, sizeof(PropertyString),"{FFFFFF}House {BA3434}%d \n{BA3434}%s \n{FFFFFF}Owner: {BA3434}%s \n{FFFFFF}Tenants: {BA3434}%d \n{FFFFFF}Size: {BA3434}%s %s %s",h,HouseInfo[h][hDiscription],HouseInfo[h][hOwner], tenants, type, selltext, locked);
- HouseLabel[h] = CreateDynamic3DTextLabel(PropertyString, 0xFFFFFFFF, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
- DestroyDynamicPickup(HousePickup[h]);
- HousePickup[h] = CreateDynamicPickup(1272, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
- }
- }
- }
- else if(update == 2)
- {
- if(BizzInfo[h][bOwned] == 0)
- {
- DestroyDynamic3DTextLabel(BizzLabel[h]);
- if(BizzInfo[h][bLocked] == 0) format(PropertyString, sizeof(PropertyString),"{52A3F2}%s \n{EEEEEE}Business {52A3F2}#%d \n {EEEEEE}Price: {52A3F2}$%s (/buybusiness) \n{EEEEEE}Level: {52A3F2}%d",BizzInfo[h][bMessage],h,FormatNumber(BizzInfo[h][bBuyPrice]),BizzInfo[h][bLevelNeeded]);
- else format(PropertyString, sizeof(PropertyString),"{52A3F2}%s \n{EEEEEE}Business {52A3F2}#%d \n {EEEEEE}Price: {52A3F2}$%s (/buybusiness) \n{EEEEEE}Level: {52A3F2}%d \n(locked)",BizzInfo[h][bMessage],h,FormatNumber(BizzInfo[h][bBuyPrice]),BizzInfo[h][bLevelNeeded]);
- BizzLabel[h] = CreateDynamic3DTextLabel(PropertyString, 0xFFFFFFFF, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ], 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
- DestroyDynamicPickup(BizzPickup[h]);
- BizzPickup[i] = CreateDynamicPickup(19134, 1, BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]);
- }
- else if(BizzInfo[h][bOwned] == 1)
- {
- DestroyDynamic3DTextLabel(BizzLabel[h]);
- if(BizzInfo[h][bPrice] > 0)
- {
- if(BizzInfo[h][bLocked] == 0) format(PropertyString, sizeof(PropertyString),"{52A3F2}%s \n{EEEEEE}Business {52A3F2}#%d \n{EEEEEE}Owner: {52A3F2}%s \n{EEEEEE}Fee: {52A3F2}$%s \n{EEEEEE}Price: {52A3F2}$%s (/buybusiness)",BizzInfo[h][bMessage],h,BizzInfo[h][bOwner],FormatNumber(BizzInfo[h][bEntranceCost]), FormatNumber(BizzInfo[h][bPrice]));
- else format(PropertyString, sizeof(PropertyString),"{52A3F2}%s \n{EEEEEE}Business {52A3F2}#%d \n{EEEEEE}Owner: {52A3F2}%s \n{EEEEEE}Fee: {52A3F2}$%s \n{EEEEEE}Price: {52A3F2}$%s (/buybusiness) \n(locked)",BizzInfo[h][bMessage],h,BizzInfo[h][bOwner],FormatNumber(BizzInfo[h][bEntranceCost]), FormatNumber(BizzInfo[h][bPrice]));
- }
- else
- {
- if(BizzInfo[h][bLocked] == 0) format(PropertyString, sizeof(PropertyString),"{52A3F2}%s \n{EEEEEE}Business {52A3F2}#%d \n{EEEEEE}Owner: {52A3F2}%s \n{EEEEEE}Fee: {52A3F2}$%s",BizzInfo[h][bMessage],h,BizzInfo[h][bOwner],FormatNumber(BizzInfo[h][bEntranceCost]));
- else format(PropertyString, sizeof(PropertyString),"{52A3F2}%s \n{EEEEEE}Business {52A3F2}#%d \n{EEEEEE}Owner: {52A3F2}%s \n{EEEEEE}Fee: {52A3F2}$%s \n(locked)",BizzInfo[h][bMessage],h,BizzInfo[h][bOwner],FormatNumber(BizzInfo[h][bEntranceCost]));
- }
- BizzLabel[h] = CreateDynamic3DTextLabel(PropertyString, 0xFFFFFFFF, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ], 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);
- DestroyDynamicPickup(BizzPickup[h]);
- BizzPickup[i] = CreateDynamicPickup(19134, 1, BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement