Advertisement
Guest User

Untitled

a guest
Mar 1st, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. CMD:bizfee(playerid,params[])
  2. {
  3. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
  4. if(IsPlayerConnected(playerid))
  5. {
  6. new bouse = PlayerInfo[playerid][pPbiskey];
  7. if (bouse == 255) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You don't own a business.");
  8. new fee,string[64];
  9. if(sscanf(params, "d",fee)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}Syntax: {FFFFFF}/bizfee <Money>");
  10. if(fee < 1 || fee > 5000) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}Minimum fee is $1, maximum fee is $5,000.");
  11. BizzInfo[bouse][bEntranceCost] = fee;
  12. format(string, sizeof(string), "{FFFF00}Entrance fee set to $%s.", FormatNumber(BizzInfo[bouse][bEntranceCost]));
  13. new str1[184];
  14. mysql_format(SQL,str1,sizeof(str1),"UPDATE `bizz` SET `EntranceCost`='%d' WHERE `ID`='%d'",BizzInfo[bouse][bEntranceCost],bouse);
  15. mysql_tquery(SQL,str1,"","");
  16. OnPropTextdrawUpdate(2,bouse);
  17. SendClientMessage(playerid, COLOR_WHITE, string);
  18. }
  19. return 1;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement