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 ][ Product ][ productID ] -= amount;
- bInfo[ business ][ profit ] += floatround( price/2 );
- }
- else
- {
- SendClientMessage(playerid, WHITE, "[ > ]{FF7E7E} Atsipraðome, jums neuþtenka pinigø.");
- return false;
- }
- }
- else
- {
- SendClientMessage(playerid, WHITE, "[ > ]{FF7E7E} Prekës(-iø) ðiuo metu nëra.");
- return false;
- }
- }
- else
- {
- if( pDB[ playerid ][ bankok ] )
- {
- if( bInfo[ business ][ Product ][ productID ] > amount )
- {
- if( pDB[ playerid ][ bankas ] > price )
- {
- pDB[ playerid ][ bankas ] -= price;
- bInfo[ business ][ Product ][ productID ] -= amount;
- bInfo[ business ][ profit ] += floatround( price/2 );
- }
- else
- {
- SendClientMessage(playerid, WHITE, "[ > ]{FF7E7E} Atsipraðome, jûs banke tiek neturite.");
- return false;
- }
- }
- else
- {
- SendClientMessage(playerid, WHITE, "[ > ]{FF7E7E} Prekës(-iø) ðiuo metu nëra.");
- return false;
- }
- }
- else
- {
- SendClientMessage( playerid, WHITE, "[ > ]{FF7E7E} Atsipraðome, jûs neturite banko sàskaitos." );
- return false;
- }
- }
- return true;
- }
Add Comment
Please, Sign In to add comment