Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum hitem
- {
- setting,
- nkaina,
- owner_name[MAX_PLAYER_NAME]
- }
- new houseDB[256][hitem];
- enum settings
- {
- interior,
- Float:enter_pos[3]
- }
- new houseSETTINGS[5][settings];
- stock PrepareHouseSystem()
- {
- houseSETTINGS[0][interior]=10;
- houseSETTINGS[1][interior]=7;
- houseSETTINGS[2][interior]=15;
- houseSETTINGS[3][interior]=5;
- houseSETTINGS[4][interior]=9;
- houseSETTINGS[0][enter_pos][0]=2260.76;
- houseSETTINGS[0][enter_pos][1]=-1210.45;
- houseSETTINGS[0][enter_pos][2]=1049.02;
- houseSETTINGS[1][enter_pos][0]=225.4974;
- houseSETTINGS[1][enter_pos][1]=1023.3127;
- houseSETTINGS[1][enter_pos][2]=1084.0122;
- houseSETTINGS[2][enter_pos][0]=373.2839;
- houseSETTINGS[2][enter_pos][1]=1417.5103;
- houseSETTINGS[2][enter_pos][2]=1081.3281;
- houseSETTINGS[3][enter_pos][0]=230.9863;
- houseSETTINGS[3][enter_pos][1]=1114.4048;
- houseSETTINGS[3][enter_pos][2]=1080.9922;
- houseSETTINGS[4][enter_pos][0]=261.1820;
- houseSETTINGS[4][enter_pos][1]=1239.1514;
- houseSETTINGS[4][enter_pos][2]=1084.2578;
- new file[128], text[53]; print("Kraunami namai");
- for(new house=0; house<pickups[1][namai]+1; house++)
- {
- format(file,sizeof(file),"saves/house/%i",house);
- houseDB[house][nkaina]=100000+random(500000);
- if(!fexist(file))
- {
- format(text,sizeof(text),"Namas parduodamas! Kaina: %i LT",houseDB[house][nkaina]);
- Update3DTextLabelText(houseDB2[house][housetext],TEXTCOL_WHITE,text);
- strmid(houseDB[house][owner_name],"no",0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
- continue;
- }
- strmid(houseDB[house][owner_name],dini_Get(file,"owner"),0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
- format(text,sizeof(text),"Turtas priklauso: %s",houseDB[house][owner_name]);
- Update3DTextLabelText(houseDB2[house][housetext],TEXTCOL_GOLD,text);
- houseDB[house][setting]=dini_Int(file,"setting");
- printf("Namas %i priklauso %s (vidaus ID: %i)",house,houseDB[house][owner_name],houseDB[house][setting]);
- }
- print("Kraunami bizniai");
- for(new house=pickups[0][bizniss]; house<pickups[1][bizniss]+1; house++)
- {
- format(file,sizeof(file),"saves/bussines/%i",house);
- if(!fexist(file))
- {
- strmid(bussinesDB[house][own_name],"no",0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
- continue;
- }
- strmid(bussinesDB[house][own_name],dini_Get(file,"owner"),0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
- printf("Biznis %i priklauso %s",house,bussinesDB[house][own_name]);
- format(text,sizeof(text),"Turtas priklauso: %s",house,bussinesDB[house][own_name]);
- Update3DTextLabelText(bussinesDB[house][housetext],TEXTCOL_GOLD,text);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement