Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock PrekesPirkimas( playerid, bool:type, price, business, productID, amount )
- {
- if( !type )
- {
- if( bInfo[ business ][ Product ][ productID ] > amount )
- {
- if( GetPlayerMoney( playerid ) > price )
- {
- GivePlayerMoneyA( playerid, -price );
- bInfo[ business ][ profit ] += floatround( price/2 );
- }
- else
- SendClientMessage(playerid, WHITE, "[ > ]{FF7E7E} Atsiprašome, jums neužtenka pinigų.");
- }
- else
- SendClientMessage(playerid, WHITE, "[ > ]{FF7E7E} Prekės(-ių) šiuo metu nėra.");
- }
- else
- {
- if( pDB[ playerid ][ bankok ] )
- {
- if( bInfo[ business ][ Product ][ productID ] > amount )
- {
- if( pDB[ playerid ][ bankas ] > price )
- {
- pDB[ playerid ][ bankas ] -= price;
- bInfo[ business ][ profit ] += floatround( price/2 );
- }
- else
- SendClientMessage(playerid, WHITE, "[ > ]{FF7E7E} Atsiprašome, jūs banke tiek neturite.");
- }
- else
- SendClientMessage(playerid, WHITE, "[ > ]{FF7E7E} Prekės(-ių) šiuo metu nėra.");
- }
- else
- SendClientMessage( playerid, WHITE, "[ > ]{FF7E7E} Atsiprašome, jūs neturite banko sąskaitos." );
- }
- }
Add Comment
Please, Sign In to add comment