17.03.2013, 09:41
I made cmd for seting bizz and when i type it it wan't work
here is cmd:
sry for my bad english
here is cmd:
Код:
CMD:setbizz(playerid, params[]) { if(IsPlayerConnected(playerid)) { new sendername[MAX_PLAYER_NAME]; new idx; new string[128]; new tmp[128]; GetPlayerName(playerid, sendername, sizeof(sendername)); new idbiza = -1; new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X,Y,Z); if (PlayerInfo[playerid][pAdmin] == 1) { for(new h = 0; h < sizeof(BizzInfo); h++) { if(BizzInfo[h][bPostavljen] == 1) { idbiza = h + 1; } } if(BizzInfo[idbiza][bPostavljen] == 0) { new string2[256]; format(string, sizeof(string),"Biznisi/%d.ini",idbiza); dini_Create(string); tmp = strtok(params, idx); if(!strlen(tmp)) { SendClientMessage(playerid, -1, "POMOC: /setbizz [type]"); SendClientMessage(playerid, -1, "TYPES: 0 - CLuckin | 1 - Burg | 2 - Pizza | 3 - Dounat | 4 - 24-7 | 5 - Strip Klub | 6 - Bar | 7 - Teretana"); SendClientMessage(playerid, -1, "TYPES: 8 - Sex Shop | 9 - Binco | 10 - Ammu | 11 - Disco | 12 - Restoran | 13 - ZIP | 14 - Victim | 15 - Sub Urban"); SendClientMessage(playerid, -1, "TYPES: 16 - Frizerski Salon | 17 - Frizerski Salon 2 | 18 - Frizerski Salon 3"); return 1; } new type; type = strval(tmp); if(type == 0) // Cluckin { BizzInfo[idbiza][bIzlaZx] = 365.779296; BizzInfo[idbiza][bIzlaZy] = -9.169898; BizzInfo[idbiza][bIzlaZz] = 1001.851623; BizzInfo[idbiza][bCena] = 47000; BizzInfo[idbiza][bLevel] = 5; BizzInfo[idbiza][bInterior] = 9; strmid(BizzInfo[idbiza][bPoruka],"Cluckin' Bell",0,strlen("Cluckin' Bell"),255); } else if(type == 1) // Burger { BizzInfo[idbiza][bIzlaZx] = 366.032409; BizzInfo[idbiza][bIzlaZy] = -72.639999; BizzInfo[idbiza][bIzlaZz] = 1001.507812; BizzInfo[idbiza][bCena] = 60000; BizzInfo[idbiza][bLevel] = 6; BizzInfo[idbiza][bInterior] = 10; strmid(BizzInfo[idbiza][bPoruka],"Burger Shoot",0,strlen("Burger Shoot"),255); } else if(type == 2) // Pizza { BizzInfo[idbiza][bIzlaZx] = 372.411712; BizzInfo[idbiza][bIzlaZy] = -130.457702; BizzInfo[idbiza][bIzlaZz] = 1001.492187; BizzInfo[idbiza][bCena] = 47000; BizzInfo[idbiza][bLevel] = 5; BizzInfo[idbiza][bInterior] = 5; strmid(BizzInfo[idbiza][bPoruka],"Pizza Stack",0,strlen("Pizza Stack"),255); } else if(type == 3) // Donut { BizzInfo[idbiza][bIzlaZx] = 377.172393; BizzInfo[idbiza][bIzlaZy] = -193.304504; BizzInfo[idbiza][bIzlaZz] = 1000.632812; BizzInfo[idbiza][bCena] = 34000; BizzInfo[idbiza][bLevel] = 3; BizzInfo[idbiza][bInterior] = 17; strmid(BizzInfo[idbiza][bPoruka],"Donut Shop",0,strlen("Donut Shop"),255); } else if(type == 4) // 24-7 { if(nextshop == 1) { BizzInfo[idbiza][bIzlaZx] = -25.132600; BizzInfo[idbiza][bIzlaZy] = -139.067001; BizzInfo[idbiza][bIzlaZz] = 1003.546875; BizzInfo[idbiza][bInterior] = 16; nextshop ++; } else if(nextshop == 2) { BizzInfo[idbiza][bIzlaZx] = -28.261899; BizzInfo[idbiza][bIzlaZy] = -31.767400; BizzInfo[idbiza][bIzlaZz] = 1003.546875; BizzInfo[idbiza][bInterior] = 4; nextshop ++; } else if(nextshop == 3) { BizzInfo[idbiza][bIzlaZx] = -27.391899; BizzInfo[idbiza][bIzlaZy] = -58.252899; BizzInfo[idbiza][bIzlaZz] = 1003.546875; BizzInfo[idbiza][bInterior] = 6; nextshop ++; } else if(nextshop == 4) { BizzInfo[idbiza][bIzlaZx] = -30.929899; BizzInfo[idbiza][bIzlaZy] = -92.011398; BizzInfo[idbiza][bIzlaZz] = 1003.546875; BizzInfo[idbiza][bInterior] = 18; nextshop = 1; } BizzInfo[idbiza][bCena] = 45500; BizzInfo[idbiza][bLevel] = 5; strmid(BizzInfo[idbiza][bPoruka],"24-7",0,strlen("24-7"),255); } else if(type == 5) // Pig Pen { BizzInfo[idbiza][bIzlaZx] = 1204.846191; BizzInfo[idbiza][bIzlaZy] = -13.852100; BizzInfo[idbiza][bIzlaZz] = 1000.921875; BizzInfo[idbiza][bCena] = 33500; BizzInfo[idbiza][bLevel] = 6; BizzInfo[idbiza][bInterior] = 2; strmid(BizzInfo[idbiza][bPoruka],"Strip Club",0,strlen("Strip Club"),255); } else if(type == 6) // Bar { BizzInfo[idbiza][bIzlaZx] = 501.870788; BizzInfo[idbiza][bIzlaZy] = -67.582000; BizzInfo[idbiza][bIzlaZz] = 998.757812; BizzInfo[idbiza][bCena] = 36000; BizzInfo[idbiza][bLevel] = 3; BizzInfo[idbiza][bInterior] = 11; strmid(BizzInfo[idbiza][bPoruka],"Bar",0,strlen("Bar"),255); } else if(type == 7) // Gym { BizzInfo[idbiza][bIzlaZx] = 772.359375; BizzInfo[idbiza][bIzlaZy] = -5.515697; BizzInfo[idbiza][bIzlaZz] = 1000.728576; BizzInfo[idbiza][bCena] = 400000; BizzInfo[idbiza][bLevel] = 8; BizzInfo[idbiza][bInterior] = 5; strmid(BizzInfo[idbiza][bPoruka],"Gym",0,strlen("Gym"),255); } else if(type == 8) // Sex Shop { BizzInfo[idbiza][bIzlaZx] = -100.295700; BizzInfo[idbiza][bIzlaZy] = -24.654399; BizzInfo[idbiza][bIzlaZz] = 1000.718811; BizzInfo[idbiza][bCena] = 38200; BizzInfo[idbiza][bLevel] = 3; BizzInfo[idbiza][bInterior] = 3; strmid(BizzInfo[idbiza][bPoruka],"Sex Shop",0,strlen("Sex Shop"),255); } else if(type == 9) // Binco { BizzInfo[idbiza][bIzlaZx] = 207.766204; BizzInfo[idbiza][bIzlaZy] = -111.266296; BizzInfo[idbiza][bIzlaZz] = 1005.132812; BizzInfo[idbiza][bCena] = 48500; BizzInfo[idbiza][bLevel] = 4; BizzInfo[idbiza][bInterior] = 15; strmid(BizzInfo[idbiza][bPoruka],"Binco",0,strlen("Binco"),255); } else if(type == 10) // Ammunation { BizzInfo[idbiza][bIzlaZx] = 315.762786; BizzInfo[idbiza][bIzlaZy] = -143.661193; BizzInfo[idbiza][bIzlaZz] = 999.601623; BizzInfo[idbiza][bCena] = 75000; BizzInfo[idbiza][bLevel] = 10; BizzInfo[idbiza][bInterior] = 7; strmid(BizzInfo[idbiza][bPoruka],"Ammunation",0,strlen("Ammunation"),255); } else if(type == 11) // Disco { BizzInfo[idbiza][bIzlaZx] = 493.439300; BizzInfo[idbiza][bIzlaZy] = -24.916900; BizzInfo[idbiza][bIzlaZz] = 1000.671875; BizzInfo[idbiza][bCena] = 58000; BizzInfo[idbiza][bLevel] = 5; BizzInfo[idbiza][bInterior] = 17; strmid(BizzInfo[idbiza][bPoruka],"Disko",0,strlen("Disko"),255); } else if(type == 12) // Restaurant { BizzInfo[idbiza][bIzlaZx] = 460.265411; BizzInfo[idbiza][bIzlaZy] = -88.611503; BizzInfo[idbiza][bIzlaZz] = 999.554687; BizzInfo[idbiza][bCena] = 33500; BizzInfo[idbiza][bLevel] = 3; BizzInfo[idbiza][bInterior] = 4; strmid(BizzInfo[idbiza][bPoruka],"Restoran",0,strlen("Restoran"),255); } else if(type == 13) // ZIP { BizzInfo[idbiza][bIzlaZx] = 161.410293; BizzInfo[idbiza][bIzlaZy] = -96.687202; BizzInfo[idbiza][bIzlaZz] = 1001.804687; BizzInfo[idbiza][bCena] = 48500; BizzInfo[idbiza][bLevel] = 5; BizzInfo[idbiza][bInterior] = 18; strmid(BizzInfo[idbiza][bPoruka],"ZIP",0,strlen("ZIP"),255); } else if(type == 14) // Victim { BizzInfo[idbiza][bIzlaZx] = 227.342803; BizzInfo[idbiza][bIzlaZy] = -8.243800; BizzInfo[idbiza][bIzlaZz] = 1002.210876; BizzInfo[idbiza][bCena] = 48500; BizzInfo[idbiza][bLevel] = 4; BizzInfo[idbiza][bInterior] = 5; strmid(BizzInfo[idbiza][bPoruka],"Victim",0,strlen("Victim"),255); } else if(type == 15) // Suburban { BizzInfo[idbiza][bIzlaZx] = 203.895294; BizzInfo[idbiza][bIzlaZy] = -50.656700; BizzInfo[idbiza][bIzlaZz] = 1001.804687; BizzInfo[idbiza][bCena] = 48500; BizzInfo[idbiza][bLevel] = 4; BizzInfo[idbiza][bInterior] = 1; strmid(BizzInfo[idbiza][bPoruka],"Sub urban",0,strlen("Sub urban"),255); } BizzInfo[idbiza][bUlaZx] = X; BizzInfo[idbiza][bUlaZy] = Y; BizzInfo[idbiza][bUlaZz] = Z; BizzInfo[idbiza][bVirWorld] = idbiza; BizzInfo[idbiza][bPostavljen] = 1; BizzInfo[idbiza][bMaxProdukta] = 500; BizzInfo[idbiza][bProdukti] = 500; strmid(BizzInfo[idbiza][bVlasnik],"Drzava",0,strlen("Drzava"),255); format(string, sizeof(string),"* Postavio si %s ID: %d",BizzInfo[idbiza][bPoruka],idbiza); SendClientMessage(playerid, ZZUTA, string); format(string,sizeof(string),"%s je postavio %s ID: [%d]",sendername,BizzInfo[idbiza][bPoruka],idbiza); AdminPoruka(ZZUTA,string); format(string2,sizeof(string2),"Na prodaju \n %s \n Bizz ID: %d \n Cena: $%d \n Level: %d \n Da bi kupio, kucaj /buybiz",BizzInfo[idbiza][bPoruka],idbiza, BizzInfo[idbiza][bCena],BizzInfo[idbiza][bLevel]); TextBiznisa[idbiza] = Create3DTextLabel(string2 ,0x00FF00AA,X,Y,Z,50, 0, 1); BizzPickup[idbiza] = CreateDynamicPickup(1272,1,X,Y,Z,-1); SacuvajImovinu(1,idbiza); TDUpdejt(1, idbiza); SendClientMessage(playerid, -1,""SIVA"* Uspesno si postavio biznis"); } else { SendClientMessage(playerid, -1, ""SIVA"* ERROR: Automatic detected Bizzid already setted!"); return 1; } } else { SendClientMessage(playerid, -1, ""SIVA"Ukucao si nepoznatu komandu!"); } } return 1; }