Score_

Untitled

Aug 9th, 2018
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. YCMD:asellhouse(playerid, params[], help) {
  2. new house, string[180], query[180];
  3. if(sscanf(params, "d", house)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/asellhouse <House 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][pHouse] == house) {
  7. PlayerInfo[i][pHouse] = 999;
  8. PlayerInfo[i][pRented] = -1;
  9. Update(i, pHousex);
  10. }
  11. }
  12. HouseInfo[house][hHel] = 0;
  13. HouseInfo[house][hArm] = 0;
  14. HouseInfo[house][hLock] = 0;
  15. HouseInfo[house][hOwned] = 1;
  16. HouseInfo[house][hValue] = 0;
  17. format(query,sizeof(query),"UPDATE `houses` SET `Hel`='0',`Arm`='0',`Lockk`='0',`Owned`='1',`Owner`='The State',`Value`='0' WHERE `ID`='%d'",house);
  18. mysql_query(SQL,query);
  19. format(query,sizeof(query),"UPDATE users SET `House`='999' WHERE `name`='%s'",HouseInfo[house][hOwner]);
  20. mysql_query(SQL,query);
  21. strmid(HouseInfo[house][hOwner], "The State", 0, strlen("The State"), 255);
  22. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  23. format(string, sizeof(string), "* Casa %d a fost vandut cu succes la stat!", house);
  24. SCM(playerid, COLOR_YELLOW, string);
  25. UpdateLabel(1, house);
  26. return 1;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment