Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ===== onCheckpointEntered ======
- case 6:
- status[ player.ID ].CheckpointEntered = true;
- SendMessage( "Wanna buy some drinks? Use /products for available product list", player );
- break;
- // ===== onCheckpointExited =======
- function onCheckpointExited( player, checkpoint )
- {
- switch( checkpoint )
- {
- case 6:
- status[ player.ID ].CheckpointEntered = false;
- break;
- case 7:
- status[ player.ID ].CheckpointEntered = false;
- break;
- }
- }
- // ===== COMMAND ======
- else if ( cmd == "buydrink" )
- {
- if ( status[ player.ID ].Registered == false ) ErrorMessage( "[#FFFFFF]You need to be a part of our community to use this command.", player );
- else if ( status[ player.ID ].Logged == false ) ErrorMessage( "[#FFFFFF]You need to be identified to use this command.", player );
- else if (!text) ErrorMessage( "/"+cmd+" <Product name>, use /products for available products list.", player );
- else if ( status[ player.ID ].CheckpointEntered == false ) ErrorMessage( "You must be at pole position or malibu club checkpoints to buy some drinks", player );
- else
- {
- if ( text == "beer" )
- {
- MessagePlayer( GREEN+"You have drank a glass of beer for $50 and now you're drunk walk/drive carefully.", player );
- player.SetDrunkLevel( 30, 30 );
- DecCash( player, 50 );
- }
- else if ( text == "vodka" )
- {
- MessagePlayer( GREEN+"You have drank a vodka botel for $30 and now you're drunk walk/drive carefully.", player );
- player.SetDrunkLevel( 20, 20 );
- DecCash( player, 30 );
- }
- else if ( text == "whisky" )
- {
- MessagePlayer( GREEN+"You have drank a glass of whisky for $100 and now you're drunk walk/drive carefully.", player );
- player.SetDrunkLevel( 50, 50 );
- DecCash( player, 100 );
- }
- else if ( text == "goldslick" )
- {
- MessagePlayer( GREEN+"You have drank a botel of goldslick for $110 and now you're drunk walk/drive carefully.", player );
- player.SetDrunkLevel( 60, 60 );
- DecCash( player, 110 );
- }
- else if ( text == "colddrink" )
- {
- MessagePlayer( GREEN+"You have drank a botel of Cold drink for $25 and your health has increased by +1.", player );
- player.Health += 1;
- DecCash( player, 25 );
- }
- else ErrorMessage( "The product you want is not available here. Use /products for available product list.", player );
- }
- }
Add Comment
Please, Sign In to add comment