Advertisement
Guest User

Untitled

a guest
Nov 29th, 2015
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. CMD:hdelete(playerid, params[])
  2. {
  3. if(PlayerInfo[playerid][pAdmin] < 4)
  4. {
  5. SendClientMessageEx(playerid, COLOR_GRAD2, "Ban khong du kha nang de su dung lenh nay`!");
  6. return 1;
  7. }
  8. new h, string[128];
  9. if(sscanf(params,"d",h)) return SendClientMessage(playerid, COLOR_WHITE,"USAGE: /hdelete [HouseID]");
  10. if(!IsValidDynamicPickup(HouseInfo[h][hPickupID])) return SendClientMessage(playerid, COLOR_WHITE,"Khong co can nha do de xoa.");
  11. HouseInfo[h][hLevel] = 0;
  12. HouseInfo[h][hIntIW] = 0;
  13. HouseInfo[h][hCustomInterior] = 0;
  14. HouseInfo[h][hDescription] = 0;
  15. format(HouseInfo[h][hOwnerName],MAX_PLAYER_NAME, "Nobody");
  16. HouseInfo[h][hExteriorX] = 0;
  17. HouseInfo[h][hExteriorY] = 0;
  18. HouseInfo[h][hExteriorZ] = 0;
  19. HouseInfo[h][hExteriorR] = 0;
  20. HouseInfo[h][hExteriorA] = 0;
  21. HouseInfo[h][hInteriorX] = 0;
  22. HouseInfo[h][hInteriorY] = 0;
  23. HouseInfo[h][hInteriorZ] = 0;
  24. HouseInfo[h][hInteriorR] = 0;
  25. HouseInfo[h][hInteriorA] = 0;
  26. HouseInfo[h][hLock] = 0;
  27. HouseInfo[h][hRentable] = 0;
  28. HouseInfo[h][hRentFee] = 0;
  29. HouseInfo[h][hValue] = 0;
  30. ClearHouse(h);
  31. DestroyDynamicPickup(HouseInfo[h][hPickupID]);
  32. DestroyDynamic3DTextLabel(HouseInfo[h][hTextID]);
  33. HouseInfo[h][hCustomExterior] = 0;
  34. SaveHouses();
  35. format(string, sizeof(string), "Ban da xoa can nha ID %d.", h);
  36. SendClientMessageEx(playerid, COLOR_WHITE, string);
  37. format(string, sizeof(string), "%s de xoa can nha ID %d.", GetPlayerNameEx(playerid), h);
  38. Log("logs/hedit.log", string);
  39. return 1;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement