Guest User

Untitled

a guest
Jan 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. stock PrekesPirkimas( playerid, bool:type, price, business, productID, amount )
  2. {
  3. if( !type )
  4. {
  5. if( bInfo[ business ][ Product ][ productID ] > amount )
  6. {
  7. if( GetPlayerMoney( playerid ) > price )
  8. {
  9. GivePlayerMoneyA( playerid, -price );
  10. bInfo[ business ][ profit ] += floatround( price/2 );
  11. }
  12. else
  13. SendClientMessage(playerid, WHITE, "[ > ]{FF7E7E} Atsiprašome, jums neužtenka pinigų.");
  14. }
  15. else
  16. SendClientMessage(playerid, WHITE, "[ > ]{FF7E7E} Prekės(-ių) šiuo metu nėra.");
  17. }
  18. else
  19. {
  20. if( pDB[ playerid ][ bankok ] )
  21. {
  22. if( bInfo[ business ][ Product ][ productID ] > amount )
  23. {
  24. if( pDB[ playerid ][ bankas ] > price )
  25. {
  26. pDB[ playerid ][ bankas ] -= price;
  27. bInfo[ business ][ profit ] += floatround( price/2 );
  28. }
  29. else
  30. SendClientMessage(playerid, WHITE, "[ > ]{FF7E7E} Atsiprašome, jūs banke tiek neturite.");
  31. }
  32. else
  33. SendClientMessage(playerid, WHITE, "[ > ]{FF7E7E} Prekės(-ių) šiuo metu nėra.");
  34. }
  35. else
  36. SendClientMessage( playerid, WHITE, "[ > ]{FF7E7E} Atsiprašome, jūs neturite banko sąskaitos." );
  37. }
  38. }
Add Comment
Please, Sign In to add comment