Score_

Untitled

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