Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function LoadBizz() {
- new result[100],index = 0;
- mysql_query(SQL,"SELECT * FROM `bizz` ORDER BY `bizz`.`ID` ASC");
- mysql_store_result();
- while(mysql_retrieve_row()) {
- bussines++;
- index++;
- new i = index;
- mysql_get_field("ID", result); BizzInfo[i][bID] = strval(result);
- mysql_get_field("Owned", result); BizzInfo[i][bOwned] = strval(result);
- mysql_get_field("Owner", result); strmid(BizzInfo[i][bOwner], result, 0, 32, 32);
- mysql_get_field("Message", result); strmid(BizzInfo[i][bMessage], result, 0, 100, 100);
- mysql_get_field("EntranceX", result); BizzInfo[i][bEntranceX] = floatstr(result);
- mysql_get_field("EntranceY", result); BizzInfo[i][bEntranceY] = floatstr(result);
- mysql_get_field("EntranceZ", result); BizzInfo[i][bEntranceZ] = floatstr(result);
- mysql_get_field("ExitX", result); BizzInfo[i][bExitX] = floatstr(result);
- mysql_get_field("ExitY", result); BizzInfo[i][bExitY] = floatstr(result);
- mysql_get_field("ExitZ", result); BizzInfo[i][bExitZ] = floatstr(result);
- mysql_get_field("LevelNeeded", result); BizzInfo[i][bLevel] = strval(result);
- mysql_get_field("BuyPrice", result); BizzInfo[i][bBuyPrice] = strval(result);
- mysql_get_field("EntranceCost", result); BizzInfo[i][bFee] = strval(result);
- mysql_get_field("Till", result); BizzInfo[i][bBalance] = strval(result);
- mysql_get_field("Locked", result); BizzInfo[i][bLocked] = strval(result);
- mysql_get_field("Interior", result); BizzInfo[i][bInterior] = strval(result);
- mysql_get_field("Virtual", result); BizzInfo[i][bVirtual] = strval(result);
- mysql_get_field("Radio", result); BizzInfo[i][bRadio] = strval(result);
- mysql_get_field("Static", result); BizzInfo[i][bStatic] = strval(result);
- mysql_get_field("Gas", result); BizzInfo[i][bGas] = strval(result);
- mysql_get_field("Type", result); BizzInfo[i][bType] = strval(result);
- BizzInfo[i][bPickup] = CreateDynamicPickup(1239, 23, BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]);
- UpdateLabel(2,BizzInfo[i][bID]);
- switch(BizzInfo[i][bType]) {
- case 1: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],52,0,0,0,-1,500.0); // banca
- case 2: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],6,0,0,0,-1,500.0); // gun shop
- case 3: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],49,0,0,0,-1,500.0); // club
- case 4: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],50,0,0,0,-1,500.0); // restaurant
- case 5: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],38,0,0,0,-1,500.0); // sexshop
- case 6: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],17,0,0,0,-1,500.0); // 24/7
- case 7: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],45,0,0,0,-1,500.0); // binco
- case 8: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],10,0,0,0,-1,500.0); // burger
- case 9: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],25,0,0,0,-1,500.0); // casino
- case 10: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],16,0,0,0,-1,500.0); // cnn
- //case 11: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],16,0,0,0,-1,500.0); // moto
- case 12: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],55,0,0,0,-1,500.0); // car
- case 13: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],23,0,0,0,-1,500.0); // cs
- //case 14: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],23,0,0,0,-1,500.0); // furniture
- case 15: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],63,0,0,0,-1,500.0); // car color
- case 16: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],23,0,0,0,-1,500.0); // paint
- case 17: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],51,0,0,0,-1,500.0); // gas station
- case 18: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],53,0,0,0,-1,500.0); // race
- case 19: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],63,0,0,0,-1,500.0); // pns
- case 20: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],9,0,0,0,-1,500.0); // pescarie
- case 21: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],29,0,0,0,-1,500.0); // pizza
- case 27: CreateDynamicMapIcon(BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ],29,0,0,0,-1,500.0); // tuning
- }
- }
- mysql_free_result();
- printf("Bussines: %d", index);
- return 1;
- }
- function LoadFactions() {
- new result[100],index = 0;
- mysql_query(SQL,"SELECT * FROM `factions` ORDER BY `factions`.`ID` ASC");
- mysql_store_result();
- new label[128];
- while(mysql_retrieve_row()) {
- index++;
- new i = index;
- mysql_get_field("ID", result); DynamicFactions[i][fID] = strval(result);
- mysql_get_field("Name", result); strmid(DynamicFactions[i][fName], result, 0, 100, 100);
- mysql_get_field("IntX", result); DynamicFactions[i][fcX] = floatstr(result);
- mysql_get_field("IntY", result); DynamicFactions[i][fcY] = floatstr(result);
- mysql_get_field("IntZ", result); DynamicFactions[i][fcZ] = floatstr(result);
- mysql_get_field("X", result); DynamicFactions[i][extX] = floatstr(result);
- mysql_get_field("Y", result); DynamicFactions[i][extY] = floatstr(result);
- mysql_get_field("Z", result); DynamicFactions[i][extZ] = floatstr(result);
- mysql_get_field("VW", result); DynamicFactions[i][fVW] = strval(result);
- mysql_get_field("Interior", result); DynamicFactions[i][fInterior] = strval(result);
- mysql_get_field("Mats", result); DynamicFactions[i][fMats] = strval(result);
- mysql_get_field("Drugs", result); DynamicFactions[i][fDrugs] = strval(result);
- mysql_get_field("Bank", result); DynamicFactions[i][fBank] = strval(result);
- mysql_get_field("Anunt", result); strmid(DynamicFactions[i][fAnn], result, 0, 100, 100);
- mysql_get_field("App", result); DynamicFactions[i][fApp] = strval(result);
- mysql_get_field("Lock", result); DynamicFactions[i][fLock] = strval(result);
- mysql_get_field("Name1", result); strmid(fRankNames[i][0], result, 0, 100, 100);
- mysql_get_field("Name2", result); strmid(fRankNames[i][1], result, 0, 100, 100);
- mysql_get_field("Name3", result); strmid(fRankNames[i][2], result, 0, 100, 100);
- mysql_get_field("Name4", result); strmid(fRankNames[i][3], result, 0, 100, 100);
- mysql_get_field("Name5", result); strmid(fRankNames[i][4], result, 0, 100, 100);
- mysql_get_field("Name6", result); strmid(fRankNames[i][5], result, 0, 100, 100);
- mysql_get_field("Name7", result); strmid(fRankNames[i][6], result, 0, 100, 100);
- new x = i;
- if(DynamicFactions[i][fLock] == 0) format(label, sizeof(label), "%s's HQ\n(locked)", DynamicFactions[i][fName]);
- else format(label, sizeof(label), "%s's HQ\n(unlocked)", DynamicFactions[i][fName]);
- DynamicFactions[i][fLabel] = Create3DTextLabel(label,COLOR_WHITE,DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ],20.0, 0, 1);
- if(x == 1 || x == 2 || x == 3) CreatePickup(1247, 23, DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ]);
- else if(x == 4 || x == 5 || x == 6 || x == 10) CreatePickup(1313, 23, DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ]);
- else CreatePickup(1314, 23, DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ]);
- if(x == 4) CreateDynamicMapIcon(DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ],62,0,0,0,-1,500.0);
- if(x == 5) CreateDynamicMapIcon(DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ],58,0,0,0,-1,500.0);
- if(x == 6) CreateDynamicMapIcon(DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ],60,0,0,0,-1,500.0);
- if(x == 10) CreateDynamicMapIcon(DynamicFactions[x][extX], DynamicFactions[x][extY], DynamicFactions[x][extZ],59,0,0,0,-1,500.0);
- }
- mysql_free_result();
- printf("Factions: %d", index);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement