SHARE
TWEET

CMD: bizpay

a guest Jul 19th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top