Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- YCMD:asellbiz(playerid, params[], help) {
- new house, string[180], query[180];
- if(sscanf(params, "d", house)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/asellbiz <Biz ID>");
- if(PlayerInfo[playerid][pAdmin] < 5) return SCM(playerid, COLOR_GREY, "Nu ai nivelul necesar de admin pentru a face asta.");
- foreach(Player, i) {
- if(IsPlayerConnected(i) && PlayerInfo[i][pBizz] == house) {
- PlayerInfo[i][pBizz] = 255;
- Update(i, pBizzx);
- }
- }
- BizzInfo[house][bLocked] = 0;
- BizzInfo[house][bOwned] = 1;
- BizzInfo[house][bBuyPrice] = 0;
- format(query,sizeof(query),"UPDATE `bizz` SET `Locked`='0',`Owned`='1',`Owner`='The State',`BuyPrice`='0' WHERE `ID`='%d'",house);
- mysql_query(SQL,query);
- format(query,sizeof(query),"UPDATE users SET `Bizz`='255' WHERE `name`='%s'",BizzInfo[house][bOwner]);
- mysql_query(SQL,query);
- strmid(BizzInfo[house][bOwner], "The State", 0, strlen("The State"), 255);
- format(string, sizeof(string), "* Bizz-ul %d a fost vandut cu succes la stat!", house);
- SCM(playerid, COLOR_YELLOW, string);
- UpdateLabel(2, house);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment