Advertisement
Guest User

CMD: bizpay

a guest
Jul 19th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. CMD:bizpay(playerid, params[])
  2. {
  3. new amount;
  4. new businessid = GetInsideBusiness(playerid), amount;
  5.  
  6. if(businessid == -1 || !IsBusinessOwner(playerid, businessid))
  7. {
  8. return SendClientMessage(playerid, COLOR_GREY, "You can't use this command as you aren't a business owner or you're not in a business.");
  9. }
  10. if(sscanf(params, "i", amount))
  11. {
  12. return SendClientMessageEx(playerid, COLOR_SYNTAX, "USAGE: /bizpay [amount]");
  13. }
  14. if(amount < 1 || amount > PlayerData[playerid][pCash])
  15. {
  16. return SendClientMessage(playerid, COLOR_GREY, "Insufficient amount.");
  17. }
  18.  
  19. AddToTaxVault(amount);
  20. GivePlayerCash(playerid, -amount);
  21.  
  22. SendClientMessageEx(playerid, COLOR_AQUA, "* You have paid $%i in debt to the Government (( Business Tax )).", amount);
  23. SendAdminMessage(COLOR_YELLOW, "AdmWarning: %s has paid $%i in debt to the Government (( Business Tax )).", GetRPName(playerid), amount);
  24. return 1;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement